diff options
author | Sonic Zhang <sonic.zhang@analog.com> | 2009-09-23 05:37:46 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2010-03-09 00:30:45 -0500 |
commit | c13ce9fd26c3a0e32b3bf0b00929181e66114ed2 (patch) | |
tree | 2f7093e48f93dfdea691b057d9a7ded6fddedc07 /arch/blackfin/mach-bf548/boards/cm_bf548.c | |
parent | b635f1912da764c960c044ffd58ba27157aa2c85 (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/boards/cm_bf548.c')
-rw-r--r-- | arch/blackfin/mach-bf548/boards/cm_bf548.c | 39 |
1 files changed, 39 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 | ||
1167 | arch_initcall(cm_bf548_init); | 1167 | arch_initcall(cm_bf548_init); |
1168 | |||
1169 | static 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 | |||
1201 | void __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 | } | ||