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-bf533/boards/blackstamp.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-bf533/boards/blackstamp.c')
-rw-r--r-- | arch/blackfin/mach-bf533/boards/blackstamp.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf533/boards/blackstamp.c b/arch/blackfin/mach-bf533/boards/blackstamp.c index 4d9294642f10..842b4fa76ea9 100644 --- a/arch/blackfin/mach-bf533/boards/blackstamp.c +++ b/arch/blackfin/mach-bf533/boards/blackstamp.c | |||
@@ -486,3 +486,27 @@ static int __init blackstamp_init(void) | |||
486 | } | 486 | } |
487 | 487 | ||
488 | arch_initcall(blackstamp_init); | 488 | arch_initcall(blackstamp_init); |
489 | |||
490 | static struct platform_device *stamp_early_devices[] __initdata = { | ||
491 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) | ||
492 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
493 | &bfin_uart0_device, | ||
494 | #endif | ||
495 | #endif | ||
496 | |||
497 | #if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE) | ||
498 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
499 | &bfin_sport0_uart_device, | ||
500 | #endif | ||
501 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
502 | &bfin_sport1_uart_device, | ||
503 | #endif | ||
504 | #endif | ||
505 | }; | ||
506 | |||
507 | void __init native_machine_early_platform_add_devices(void) | ||
508 | { | ||
509 | printk(KERN_INFO "register early platform devices\n"); | ||
510 | early_platform_add_devices(stamp_early_devices, | ||
511 | ARRAY_SIZE(stamp_early_devices)); | ||
512 | } | ||