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-bf537/boards/tcm_bf537.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-bf537/boards/tcm_bf537.c')
-rw-r--r-- | arch/blackfin/mach-bf537/boards/tcm_bf537.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf537/boards/tcm_bf537.c b/arch/blackfin/mach-bf537/boards/tcm_bf537.c index 69a2fb804724..59951cdef588 100644 --- a/arch/blackfin/mach-bf537/boards/tcm_bf537.c +++ b/arch/blackfin/mach-bf537/boards/tcm_bf537.c | |||
@@ -727,6 +727,33 @@ static int __init tcm_bf537_init(void) | |||
727 | 727 | ||
728 | arch_initcall(tcm_bf537_init); | 728 | arch_initcall(tcm_bf537_init); |
729 | 729 | ||
730 | static struct platform_device *cm_bf537_early_devices[] __initdata = { | ||
731 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) | ||
732 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
733 | &bfin_uart0_device, | ||
734 | #endif | ||
735 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
736 | &bfin_uart1_device, | ||
737 | #endif | ||
738 | #endif | ||
739 | |||
740 | #if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE) | ||
741 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
742 | &bfin_sport0_uart_device, | ||
743 | #endif | ||
744 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
745 | &bfin_sport1_uart_device, | ||
746 | #endif | ||
747 | #endif | ||
748 | }; | ||
749 | |||
750 | void __init native_machine_early_platform_add_devices(void) | ||
751 | { | ||
752 | printk(KERN_INFO "register early platform devices\n"); | ||
753 | early_platform_add_devices(cm_bf537_early_devices, | ||
754 | ARRAY_SIZE(cm_bf537_early_devices)); | ||
755 | } | ||
756 | |||
730 | void bfin_get_ether_addr(char *addr) | 757 | void bfin_get_ether_addr(char *addr) |
731 | { | 758 | { |
732 | random_ether_addr(addr); | 759 | random_ether_addr(addr); |