|
@@ -1496,3 +1496,48 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
|
|
|
configure_usart1_pins(pins);
|
|
|
break;
|
|
|
case AT91SAM9263_ID_US2:
|
|
|
+ pdev = &at91sam9263_uart2_device;
|
|
|
+ configure_usart2_pins(pins);
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ pdata = pdev->dev.platform_data;
|
|
|
+ pdata->num = portnr; /* update to mapped ID */
|
|
|
+
|
|
|
+ if (portnr < ATMEL_MAX_UART)
|
|
|
+ at91_uarts[portnr] = pdev;
|
|
|
+}
|
|
|
+
|
|
|
+void __init at91_add_device_serial(void)
|
|
|
+{
|
|
|
+ int i;
|
|
|
+
|
|
|
+ for (i = 0; i < ATMEL_MAX_UART; i++) {
|
|
|
+ if (at91_uarts[i])
|
|
|
+ platform_device_register(at91_uarts[i]);
|
|
|
+ }
|
|
|
+}
|
|
|
+#else
|
|
|
+void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}
|
|
|
+void __init at91_add_device_serial(void) {}
|
|
|
+#endif
|
|
|
+
|
|
|
+
|
|
|
+/* -------------------------------------------------------------------- */
|
|
|
+/*
|
|
|
+ * These devices are always present and don't need any board-specific
|
|
|
+ * setup.
|
|
|
+ */
|
|
|
+static int __init at91_add_standard_devices(void)
|
|
|
+{
|
|
|
+ if (of_have_populated_dt())
|
|
|
+ return 0;
|
|
|
+
|
|
|
+ at91_add_device_rtt();
|
|
|
+ at91_add_device_watchdog();
|
|
|
+ at91_add_device_tc();
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
+arch_initcall(at91_add_standard_devices);
|