]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - arch/blackfin/mach-bf537/boards/cm_bf537u.c
Blackfin: add UART/SPORT early platform resources
[net-next-2.6.git] / arch / blackfin / mach-bf537 / boards / cm_bf537u.c
index c6802be65fb1dc73ce9a369af924eb3068bfdb5a..18daacb00b2c0d965865bbbf34143b71bd488d3d 100644 (file)
@@ -725,6 +725,33 @@ static int __init cm_bf537u_init(void)
 
 arch_initcall(cm_bf537u_init);
 
+static struct platform_device *cm_bf537u_early_devices[] __initdata = {
+#if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK)
+#ifdef CONFIG_SERIAL_BFIN_UART0
+       &bfin_uart0_device,
+#endif
+#ifdef CONFIG_SERIAL_BFIN_UART1
+       &bfin_uart1_device,
+#endif
+#endif
+
+#if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE)
+#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
+       &bfin_sport0_uart_device,
+#endif
+#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
+       &bfin_sport1_uart_device,
+#endif
+#endif
+};
+
+void __init native_machine_early_platform_add_devices(void)
+{
+       printk(KERN_INFO "register early platform devices\n");
+       early_platform_add_devices(cm_bf537u_early_devices,
+               ARRAY_SIZE(cm_bf537u_early_devices));
+}
+
 void bfin_get_ether_addr(char *addr)
 {
        random_ether_addr(addr);