aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf533/boards/cm_bf533.c
diff options
context:
space:
mode:
authorSonic Zhang <sonic.zhang@analog.com>2009-09-23 05:37:46 -0400
committerMike Frysinger <vapier@gentoo.org>2010-03-09 00:30:45 -0500
commitc13ce9fd26c3a0e32b3bf0b00929181e66114ed2 (patch)
tree2f7093e48f93dfdea691b057d9a7ded6fddedc07 /arch/blackfin/mach-bf533/boards/cm_bf533.c
parentb635f1912da764c960c044ffd58ba27157aa2c85 (diff)
Blackfin: add UART/SPORT early platform resources
This lets people easily select the UART/SPORT consoles for early printk while leveraging the pins declared in the boards file. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin/mach-bf533/boards/cm_bf533.c')
-rw-r--r--arch/blackfin/mach-bf533/boards/cm_bf533.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf533/boards/cm_bf533.c b/arch/blackfin/mach-bf533/boards/cm_bf533.c
index 33ff27a4a474..0592fe0bb8af 100644
--- a/arch/blackfin/mach-bf533/boards/cm_bf533.c
+++ b/arch/blackfin/mach-bf533/boards/cm_bf533.c
@@ -580,3 +580,27 @@ static int __init cm_bf533_init(void)
580} 580}
581 581
582arch_initcall(cm_bf533_init); 582arch_initcall(cm_bf533_init);
583
584static struct platform_device *cm_bf533_early_devices[] __initdata = {
585#if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK)
586#ifdef CONFIG_SERIAL_BFIN_UART0
587 &bfin_uart0_device,
588#endif
589#endif
590
591#if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE)
592#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
593 &bfin_sport0_uart_device,
594#endif
595#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
596 &bfin_sport1_uart_device,
597#endif
598#endif
599};
600
601void __init native_machine_early_platform_add_devices(void)
602{
603 printk(KERN_INFO "register early platform devices\n");
604 early_platform_add_devices(cm_bf533_early_devices,
605 ARRAY_SIZE(cm_bf533_early_devices));
606}