aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf548
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-bf548
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-bf548')
-rw-r--r--arch/blackfin/mach-bf548/boards/cm_bf548.c39
-rw-r--r--arch/blackfin/mach-bf548/boards/ezkit.c39
2 files changed, 78 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf548/boards/cm_bf548.c b/arch/blackfin/mach-bf548/boards/cm_bf548.c
index cb7458792196..f60c333fec66 100644
--- a/arch/blackfin/mach-bf548/boards/cm_bf548.c
+++ b/arch/blackfin/mach-bf548/boards/cm_bf548.c
@@ -1165,3 +1165,42 @@ static int __init cm_bf548_init(void)
1165} 1165}
1166 1166
1167arch_initcall(cm_bf548_init); 1167arch_initcall(cm_bf548_init);
1168
1169static struct platform_device *cm_bf548_early_devices[] __initdata = {
1170#if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK)
1171#ifdef CONFIG_SERIAL_BFIN_UART0
1172 &bfin_uart0_device,
1173#endif
1174#ifdef CONFIG_SERIAL_BFIN_UART1
1175 &bfin_uart1_device,
1176#endif
1177#ifdef CONFIG_SERIAL_BFIN_UART2
1178 &bfin_uart2_device,
1179#endif
1180#ifdef CONFIG_SERIAL_BFIN_UART3
1181 &bfin_uart3_device,
1182#endif
1183#endif
1184
1185#if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE)
1186#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
1187 &bfin_sport0_uart_device,
1188#endif
1189#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
1190 &bfin_sport1_uart_device,
1191#endif
1192#ifdef CONFIG_SERIAL_BFIN_SPORT2_UART
1193 &bfin_sport2_uart_device,
1194#endif
1195#ifdef CONFIG_SERIAL_BFIN_SPORT3_UART
1196 &bfin_sport3_uart_device,
1197#endif
1198#endif
1199};
1200
1201void __init native_machine_early_platform_add_devices(void)
1202{
1203 printk(KERN_INFO "register early platform devices\n");
1204 early_platform_add_devices(cm_bf548_early_devices,
1205 ARRAY_SIZE(cm_bf548_early_devices));
1206}
diff --git a/arch/blackfin/mach-bf548/boards/ezkit.c b/arch/blackfin/mach-bf548/boards/ezkit.c
index 97033fea102e..b5d8ea187735 100644
--- a/arch/blackfin/mach-bf548/boards/ezkit.c
+++ b/arch/blackfin/mach-bf548/boards/ezkit.c
@@ -1390,3 +1390,42 @@ static int __init ezkit_init(void)
1390} 1390}
1391 1391
1392arch_initcall(ezkit_init); 1392arch_initcall(ezkit_init);
1393
1394static struct platform_device *ezkit_early_devices[] __initdata = {
1395#if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK)
1396#ifdef CONFIG_SERIAL_BFIN_UART0
1397 &bfin_uart0_device,
1398#endif
1399#ifdef CONFIG_SERIAL_BFIN_UART1
1400 &bfin_uart1_device,
1401#endif
1402#ifdef CONFIG_SERIAL_BFIN_UART2
1403 &bfin_uart2_device,
1404#endif
1405#ifdef CONFIG_SERIAL_BFIN_UART3
1406 &bfin_uart3_device,
1407#endif
1408#endif
1409
1410#if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE)
1411#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
1412 &bfin_sport0_uart_device,
1413#endif
1414#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
1415 &bfin_sport1_uart_device,
1416#endif
1417#ifdef CONFIG_SERIAL_BFIN_SPORT2_UART
1418 &bfin_sport2_uart_device,
1419#endif
1420#ifdef CONFIG_SERIAL_BFIN_SPORT3_UART
1421 &bfin_sport3_uart_device,
1422#endif
1423#endif
1424};
1425
1426void __init native_machine_early_platform_add_devices(void)
1427{
1428 printk(KERN_INFO "register early platform devices\n");
1429 early_platform_add_devices(ezkit_early_devices,
1430 ARRAY_SIZE(ezkit_early_devices));
1431}