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/stamp.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/stamp.c')
-rw-r--r-- | arch/blackfin/mach-bf537/boards/stamp.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c index df4b6b5c08d4..3cb20d7efbdb 100644 --- a/arch/blackfin/mach-bf537/boards/stamp.c +++ b/arch/blackfin/mach-bf537/boards/stamp.c | |||
@@ -1969,6 +1969,34 @@ static int __init stamp_init(void) | |||
1969 | 1969 | ||
1970 | arch_initcall(stamp_init); | 1970 | arch_initcall(stamp_init); |
1971 | 1971 | ||
1972 | |||
1973 | static struct platform_device *stamp_early_devices[] __initdata = { | ||
1974 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) | ||
1975 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
1976 | &bfin_uart0_device, | ||
1977 | #endif | ||
1978 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
1979 | &bfin_uart1_device, | ||
1980 | #endif | ||
1981 | #endif | ||
1982 | |||
1983 | #if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE) | ||
1984 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
1985 | &bfin_sport0_uart_device, | ||
1986 | #endif | ||
1987 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
1988 | &bfin_sport1_uart_device, | ||
1989 | #endif | ||
1990 | #endif | ||
1991 | }; | ||
1992 | |||
1993 | void __init native_machine_early_platform_add_devices(void) | ||
1994 | { | ||
1995 | printk(KERN_INFO "register early platform devices\n"); | ||
1996 | early_platform_add_devices(stamp_early_devices, | ||
1997 | ARRAY_SIZE(stamp_early_devices)); | ||
1998 | } | ||
1999 | |||
1972 | void native_machine_restart(char *cmd) | 2000 | void native_machine_restart(char *cmd) |
1973 | { | 2001 | { |
1974 | /* workaround reboot hang when booting from SPI */ | 2002 | /* workaround reboot hang when booting from SPI */ |