aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf538
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-bf538
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-bf538')
-rw-r--r--arch/blackfin/mach-bf538/boards/ezkit.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf538/boards/ezkit.c b/arch/blackfin/mach-bf538/boards/ezkit.c
index d7c6b9f18b5e..20387fe09c61 100644
--- a/arch/blackfin/mach-bf538/boards/ezkit.c
+++ b/arch/blackfin/mach-bf538/boards/ezkit.c
@@ -956,3 +956,39 @@ static int __init ezkit_init(void)
956} 956}
957 957
958arch_initcall(ezkit_init); 958arch_initcall(ezkit_init);
959
960static struct platform_device *ezkit_early_devices[] __initdata = {
961#if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK)
962#ifdef CONFIG_SERIAL_BFIN_UART0
963 &bfin_uart0_device,
964#endif
965#ifdef CONFIG_SERIAL_BFIN_UART1
966 &bfin_uart1_device,
967#endif
968#ifdef CONFIG_SERIAL_BFIN_UART2
969 &bfin_uart2_device,
970#endif
971#endif
972
973#if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE)
974#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
975 &bfin_sport0_uart_device,
976#endif
977#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
978 &bfin_sport1_uart_device,
979#endif
980#ifdef CONFIG_SERIAL_BFIN_SPORT2_UART
981 &bfin_sport2_uart_device,
982#endif
983#ifdef CONFIG_SERIAL_BFIN_SPORT3_UART
984 &bfin_sport3_uart_device,
985#endif
986#endif
987};
988
989void __init native_machine_early_platform_add_devices(void)
990{
991 printk(KERN_INFO "register early platform devices\n");
992 early_platform_add_devices(ezkit_early_devices,
993 ARRAY_SIZE(ezkit_early_devices));
994}