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-bf527/boards | |
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-bf527/boards')
-rw-r--r-- | arch/blackfin/mach-bf527/boards/cm_bf527.c | 27 | ||||
-rw-r--r-- | arch/blackfin/mach-bf527/boards/ezbrd.c | 27 | ||||
-rw-r--r-- | arch/blackfin/mach-bf527/boards/ezkit.c | 27 |
3 files changed, 81 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf527/boards/cm_bf527.c b/arch/blackfin/mach-bf527/boards/cm_bf527.c index 3543bdf3268e..eaa0131f9605 100644 --- a/arch/blackfin/mach-bf527/boards/cm_bf527.c +++ b/arch/blackfin/mach-bf527/boards/cm_bf527.c | |||
@@ -1014,6 +1014,33 @@ static int __init cm_init(void) | |||
1014 | 1014 | ||
1015 | arch_initcall(cm_init); | 1015 | arch_initcall(cm_init); |
1016 | 1016 | ||
1017 | static struct platform_device *cmbf527_early_devices[] __initdata = { | ||
1018 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) | ||
1019 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
1020 | &bfin_uart0_device, | ||
1021 | #endif | ||
1022 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
1023 | &bfin_uart1_device, | ||
1024 | #endif | ||
1025 | #endif | ||
1026 | |||
1027 | #if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE) | ||
1028 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
1029 | &bfin_sport0_uart_device, | ||
1030 | #endif | ||
1031 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
1032 | &bfin_sport1_uart_device, | ||
1033 | #endif | ||
1034 | #endif | ||
1035 | }; | ||
1036 | |||
1037 | void __init native_machine_early_platform_add_devices(void) | ||
1038 | { | ||
1039 | printk(KERN_INFO "register early platform devices\n"); | ||
1040 | early_platform_add_devices(cmbf527_early_devices, | ||
1041 | ARRAY_SIZE(cmbf527_early_devices)); | ||
1042 | } | ||
1043 | |||
1017 | void native_machine_restart(char *cmd) | 1044 | void native_machine_restart(char *cmd) |
1018 | { | 1045 | { |
1019 | /* workaround reboot hang when booting from SPI */ | 1046 | /* workaround reboot hang when booting from SPI */ |
diff --git a/arch/blackfin/mach-bf527/boards/ezbrd.c b/arch/blackfin/mach-bf527/boards/ezbrd.c index a99955d11391..3ff61e6fbe95 100644 --- a/arch/blackfin/mach-bf527/boards/ezbrd.c +++ b/arch/blackfin/mach-bf527/boards/ezbrd.c | |||
@@ -854,6 +854,33 @@ static int __init ezbrd_init(void) | |||
854 | 854 | ||
855 | arch_initcall(ezbrd_init); | 855 | arch_initcall(ezbrd_init); |
856 | 856 | ||
857 | static struct platform_device *ezbrd_early_devices[] __initdata = { | ||
858 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) | ||
859 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
860 | &bfin_uart0_device, | ||
861 | #endif | ||
862 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
863 | &bfin_uart1_device, | ||
864 | #endif | ||
865 | #endif | ||
866 | |||
867 | #if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE) | ||
868 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
869 | &bfin_sport0_uart_device, | ||
870 | #endif | ||
871 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
872 | &bfin_sport1_uart_device, | ||
873 | #endif | ||
874 | #endif | ||
875 | }; | ||
876 | |||
877 | void __init native_machine_early_platform_add_devices(void) | ||
878 | { | ||
879 | printk(KERN_INFO "register early platform devices\n"); | ||
880 | early_platform_add_devices(ezbrd_early_devices, | ||
881 | ARRAY_SIZE(ezbrd_early_devices)); | ||
882 | } | ||
883 | |||
857 | void native_machine_restart(char *cmd) | 884 | void native_machine_restart(char *cmd) |
858 | { | 885 | { |
859 | /* workaround reboot hang when booting from SPI */ | 886 | /* workaround reboot hang when booting from SPI */ |
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c index f93323dd5b51..6138b47fbbaf 100644 --- a/arch/blackfin/mach-bf527/boards/ezkit.c +++ b/arch/blackfin/mach-bf527/boards/ezkit.c | |||
@@ -1099,6 +1099,33 @@ static int __init ezkit_init(void) | |||
1099 | 1099 | ||
1100 | arch_initcall(ezkit_init); | 1100 | arch_initcall(ezkit_init); |
1101 | 1101 | ||
1102 | static struct platform_device *ezkit_early_devices[] __initdata = { | ||
1103 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) | ||
1104 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
1105 | &bfin_uart0_device, | ||
1106 | #endif | ||
1107 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
1108 | &bfin_uart1_device, | ||
1109 | #endif | ||
1110 | #endif | ||
1111 | |||
1112 | #if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE) | ||
1113 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
1114 | &bfin_sport0_uart_device, | ||
1115 | #endif | ||
1116 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
1117 | &bfin_sport1_uart_device, | ||
1118 | #endif | ||
1119 | #endif | ||
1120 | }; | ||
1121 | |||
1122 | void __init native_machine_early_platform_add_devices(void) | ||
1123 | { | ||
1124 | printk(KERN_INFO "register early platform devices\n"); | ||
1125 | early_platform_add_devices(ezkit_early_devices, | ||
1126 | ARRAY_SIZE(ezkit_early_devices)); | ||
1127 | } | ||
1128 | |||
1102 | void native_machine_restart(char *cmd) | 1129 | void native_machine_restart(char *cmd) |
1103 | { | 1130 | { |
1104 | /* workaround reboot hang when booting from SPI */ | 1131 | /* workaround reboot hang when booting from SPI */ |