diff options
Diffstat (limited to 'arch/mips/sibyte/sb1250/setup.c')
-rw-r--r-- | arch/mips/sibyte/sb1250/setup.c | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/arch/mips/sibyte/sb1250/setup.c b/arch/mips/sibyte/sb1250/setup.c index df2e266c700c..fde4751c84fe 100644 --- a/arch/mips/sibyte/sb1250/setup.c +++ b/arch/mips/sibyte/sb1250/setup.c | |||
@@ -16,6 +16,7 @@ | |||
16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
17 | */ | 17 | */ |
18 | #include <linux/config.h> | 18 | #include <linux/config.h> |
19 | #include <linux/init.h> | ||
19 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
20 | #include <linux/reboot.h> | 21 | #include <linux/reboot.h> |
21 | #include <linux/string.h> | 22 | #include <linux/string.h> |
@@ -42,7 +43,7 @@ static inline int setup_bcm112x(void); | |||
42 | 43 | ||
43 | /* Setup code likely to be common to all SiByte platforms */ | 44 | /* Setup code likely to be common to all SiByte platforms */ |
44 | 45 | ||
45 | static inline int sys_rev_decode(void) | 46 | static int __init sys_rev_decode(void) |
46 | { | 47 | { |
47 | int ret = 0; | 48 | int ret = 0; |
48 | 49 | ||
@@ -74,7 +75,7 @@ static inline int sys_rev_decode(void) | |||
74 | return ret; | 75 | return ret; |
75 | } | 76 | } |
76 | 77 | ||
77 | static inline int setup_bcm1250(void) | 78 | static int __init setup_bcm1250(void) |
78 | { | 79 | { |
79 | int ret = 0; | 80 | int ret = 0; |
80 | 81 | ||
@@ -120,7 +121,7 @@ static inline int setup_bcm1250(void) | |||
120 | return ret; | 121 | return ret; |
121 | } | 122 | } |
122 | 123 | ||
123 | static inline int setup_bcm112x(void) | 124 | static int __init setup_bcm112x(void) |
124 | { | 125 | { |
125 | int ret = 0; | 126 | int ret = 0; |
126 | 127 | ||
@@ -146,7 +147,7 @@ static inline int setup_bcm112x(void) | |||
146 | return ret; | 147 | return ret; |
147 | } | 148 | } |
148 | 149 | ||
149 | void sb1250_setup(void) | 150 | void __init sb1250_setup(void) |
150 | { | 151 | { |
151 | uint64_t sys_rev; | 152 | uint64_t sys_rev; |
152 | int plldiv; | 153 | int plldiv; |
@@ -169,31 +170,42 @@ void sb1250_setup(void) | |||
169 | soc_str, pass_str, zbbus_mhz * 2, sb1_pass); | 170 | soc_str, pass_str, zbbus_mhz * 2, sb1_pass); |
170 | prom_printf("Board type: %s\n", get_system_type()); | 171 | prom_printf("Board type: %s\n", get_system_type()); |
171 | 172 | ||
172 | switch(war_pass) { | 173 | switch (war_pass) { |
173 | case K_SYS_REVISION_BCM1250_PASS1: | 174 | case K_SYS_REVISION_BCM1250_PASS1: |
174 | #ifndef CONFIG_SB1_PASS_1_WORKAROUNDS | 175 | #ifndef CONFIG_SB1_PASS_1_WORKAROUNDS |
175 | prom_printf("@@@@ This is a BCM1250 A0-A2 (Pass 1) board, and the kernel doesn't have the proper workarounds compiled in. @@@@\n"); | 176 | prom_printf("@@@@ This is a BCM1250 A0-A2 (Pass 1) board, " |
177 | "and the kernel doesn't have the proper " | ||
178 | "workarounds compiled in. @@@@\n"); | ||
176 | bad_config = 1; | 179 | bad_config = 1; |
177 | #endif | 180 | #endif |
178 | break; | 181 | break; |
179 | case K_SYS_REVISION_BCM1250_PASS2: | 182 | case K_SYS_REVISION_BCM1250_PASS2: |
180 | /* Pass 2 - easiest as default for now - so many numbers */ | 183 | /* Pass 2 - easiest as default for now - so many numbers */ |
181 | #if !defined(CONFIG_SB1_PASS_2_WORKAROUNDS) || !defined(CONFIG_SB1_PASS_2_1_WORKAROUNDS) | 184 | #if !defined(CONFIG_SB1_PASS_2_WORKAROUNDS) || \ |
182 | prom_printf("@@@@ This is a BCM1250 A3-A10 board, and the kernel doesn't have the proper workarounds compiled in. @@@@\n"); | 185 | !defined(CONFIG_SB1_PASS_2_1_WORKAROUNDS) |
186 | prom_printf("@@@@ This is a BCM1250 A3-A10 board, and the " | ||
187 | "kernel doesn't have the proper workarounds " | ||
188 | "compiled in. @@@@\n"); | ||
183 | bad_config = 1; | 189 | bad_config = 1; |
184 | #endif | 190 | #endif |
185 | #ifdef CONFIG_CPU_HAS_PREFETCH | 191 | #ifdef CONFIG_CPU_HAS_PREFETCH |
186 | prom_printf("@@@@ Prefetches may be enabled in this kernel, but are buggy on this board. @@@@\n"); | 192 | prom_printf("@@@@ Prefetches may be enabled in this kernel, " |
193 | "but are buggy on this board. @@@@\n"); | ||
187 | bad_config = 1; | 194 | bad_config = 1; |
188 | #endif | 195 | #endif |
189 | break; | 196 | break; |
190 | case K_SYS_REVISION_BCM1250_PASS2_2: | 197 | case K_SYS_REVISION_BCM1250_PASS2_2: |
191 | #ifndef CONFIG_SB1_PASS_2_WORKAROUNDS | 198 | #ifndef CONFIG_SB1_PASS_2_WORKAROUNDS |
192 | prom_printf("@@@@ This is a BCM1250 B1/B2. board, and the kernel doesn't have the proper workarounds compiled in. @@@@\n"); | 199 | prom_printf("@@@@ This is a BCM1250 B1/B2. board, and the " |
200 | "kernel doesn't have the proper workarounds " | ||
201 | "compiled in. @@@@\n"); | ||
193 | bad_config = 1; | 202 | bad_config = 1; |
194 | #endif | 203 | #endif |
195 | #if defined(CONFIG_SB1_PASS_2_1_WORKAROUNDS) || !defined(CONFIG_CPU_HAS_PREFETCH) | 204 | #if defined(CONFIG_SB1_PASS_2_1_WORKAROUNDS) || \ |
196 | prom_printf("@@@@ This is a BCM1250 B1/B2, but the kernel is conservatively configured for an 'A' stepping. @@@@\n"); | 205 | !defined(CONFIG_CPU_HAS_PREFETCH) |
206 | prom_printf("@@@@ This is a BCM1250 B1/B2, but the kernel is " | ||
207 | "conservatively configured for an 'A' stepping. " | ||
208 | "@@@@\n"); | ||
197 | #endif | 209 | #endif |
198 | break; | 210 | break; |
199 | default: | 211 | default: |