Commit b9153fe3088a4ea295d6cd23dd44bed51224679a
1 parent
c761a7e29d
Exists in
smarc_8mq_lf_v2020.04
and in
17 other branches
common/board_f.c: align m68k arch to use CONFIG_DISPLAY_CPUINFO
Change all coldfire arch files to use CONFIG_DISPLAY_CPUINFO. Signed-off-by: Angelo Dureghello <angelo@sysam.it> Reviewed-by: Tom Rini <trini@konsulko.com> --- Changes for v2: - update common/Kconfig to add M68K to the default y list
Showing 9 changed files with 41 additions and 17 deletions Side-by-side Diff
arch/m68k/cpu/mcf5227x/cpu.c
... | ... | @@ -28,7 +28,8 @@ |
28 | 28 | return 0; |
29 | 29 | }; |
30 | 30 | |
31 | -int checkcpu(void) | |
31 | +#if defined(CONFIG_DISPLAY_CPUINFO) | |
32 | +int print_cpuinfo(void) | |
32 | 33 | { |
33 | 34 | ccm_t *ccm = (ccm_t *) MMAP_CCM; |
34 | 35 | u16 msk; |
... | ... | @@ -60,4 +61,5 @@ |
60 | 61 | |
61 | 62 | return 0; |
62 | 63 | } |
64 | +#endif /* CONFIG_DISPLAY_CPUINFO */ |
arch/m68k/cpu/mcf523x/cpu.c
... | ... | @@ -28,7 +28,8 @@ |
28 | 28 | return 0; |
29 | 29 | } |
30 | 30 | |
31 | -int checkcpu(void) | |
31 | +#if defined(CONFIG_DISPLAY_CPUINFO) | |
32 | +int print_cpuinfo(void) | |
32 | 33 | { |
33 | 34 | ccm_t *ccm = (ccm_t *) MMAP_CCM; |
34 | 35 | u16 msk; |
... | ... | @@ -56,6 +57,7 @@ |
56 | 57 | |
57 | 58 | return 0; |
58 | 59 | }; |
60 | +#endif /* CONFIG_DISPLAY_CPUINFO */ | |
59 | 61 | |
60 | 62 | #if defined(CONFIG_WATCHDOG) |
61 | 63 | /* Called by macro WATCHDOG_RESET */ |
arch/m68k/cpu/mcf52x2/cpu.c
... | ... | @@ -37,7 +37,8 @@ |
37 | 37 | return 0; |
38 | 38 | }; |
39 | 39 | |
40 | -int checkcpu(void) | |
40 | +#if defined(CONFIG_DISPLAY_CPUINFO) | |
41 | +int print_cpuinfo(void) | |
41 | 42 | { |
42 | 43 | char buf1[32], buf2[32]; |
43 | 44 | |
... | ... | @@ -47,6 +48,7 @@ |
47 | 48 | strmhz(buf2, gd->bus_clk)); |
48 | 49 | return 0; |
49 | 50 | }; |
51 | +#endif /* CONFIG_DISPLAY_CPUINFO */ | |
50 | 52 | |
51 | 53 | #if defined(CONFIG_WATCHDOG) |
52 | 54 | /* Called by macro WATCHDOG_RESET */ |
53 | 55 | |
... | ... | @@ -94,12 +96,13 @@ |
94 | 96 | #endif /* #ifdef CONFIG_M5208 */ |
95 | 97 | |
96 | 98 | #ifdef CONFIG_M5271 |
99 | +#if defined(CONFIG_DISPLAY_CPUINFO) | |
97 | 100 | /* |
98 | 101 | * Both MCF5270 and MCF5271 are members of the MPC5271 family. Try to |
99 | 102 | * determine which one we are running on, based on the Chip Identification |
100 | 103 | * Register (CIR). |
101 | 104 | */ |
102 | -int checkcpu(void) | |
105 | +int print_cpuinfo(void) | |
103 | 106 | { |
104 | 107 | char buf[32]; |
105 | 108 | unsigned short cir; /* Chip Identification Register */ |
... | ... | @@ -133,6 +136,7 @@ |
133 | 136 | |
134 | 137 | return 0; |
135 | 138 | } |
139 | +#endif /* CONFIG_DISPLAY_CPUINFO */ | |
136 | 140 | |
137 | 141 | int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) |
138 | 142 | { |
... | ... | @@ -184,7 +188,8 @@ |
184 | 188 | return 0; |
185 | 189 | }; |
186 | 190 | |
187 | -int checkcpu(void) | |
191 | +#if defined(CONFIG_DISPLAY_CPUINFO) | |
192 | +int print_cpuinfo(void) | |
188 | 193 | { |
189 | 194 | sysctrl_t *sysctrl = (sysctrl_t *) (MMAP_CFG); |
190 | 195 | uchar msk; |
... | ... | @@ -209,6 +214,7 @@ |
209 | 214 | printf("Freescale MCF5272 %s\n", suf); |
210 | 215 | return 0; |
211 | 216 | }; |
217 | +#endif /* CONFIG_DISPLAY_CPUINFO */ | |
212 | 218 | |
213 | 219 | #if defined(CONFIG_WATCHDOG) |
214 | 220 | /* Called by macro WATCHDOG_RESET */ |
... | ... | @@ -268,7 +274,8 @@ |
268 | 274 | return 0; |
269 | 275 | }; |
270 | 276 | |
271 | -int checkcpu(void) | |
277 | +#if defined(CONFIG_DISPLAY_CPUINFO) | |
278 | +int print_cpuinfo(void) | |
272 | 279 | { |
273 | 280 | char buf[32]; |
274 | 281 | |
275 | 282 | |
... | ... | @@ -276,8 +283,8 @@ |
276 | 283 | strmhz(buf, CONFIG_SYS_CLK)); |
277 | 284 | return 0; |
278 | 285 | }; |
286 | +#endif /* CONFIG_DISPLAY_CPUINFO */ | |
279 | 287 | |
280 | - | |
281 | 288 | #if defined(CONFIG_WATCHDOG) |
282 | 289 | /* Called by macro WATCHDOG_RESET */ |
283 | 290 | void watchdog_reset(void) |
... | ... | @@ -326,7 +333,8 @@ |
326 | 333 | #endif /* #ifdef CONFIG_M5275 */ |
327 | 334 | |
328 | 335 | #ifdef CONFIG_M5282 |
329 | -int checkcpu(void) | |
336 | +#if defined(CONFIG_DISPLAY_CPUINFO) | |
337 | +int print_cpuinfo(void) | |
330 | 338 | { |
331 | 339 | unsigned char resetsource = MCFRESET_RSR; |
332 | 340 | |
... | ... | @@ -342,6 +350,7 @@ |
342 | 350 | (resetsource & MCFRESET_RSR_LVD) ? " Low Voltage" : ""); |
343 | 351 | return 0; |
344 | 352 | } |
353 | +#endif /* CONFIG_DISPLAY_CPUINFO */ | |
345 | 354 | |
346 | 355 | int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) |
347 | 356 | { |
... | ... | @@ -351,7 +360,8 @@ |
351 | 360 | #endif |
352 | 361 | |
353 | 362 | #ifdef CONFIG_M5249 |
354 | -int checkcpu(void) | |
363 | +#if defined(CONFIG_DISPLAY_CPUINFO) | |
364 | +int print_cpuinfo(void) | |
355 | 365 | { |
356 | 366 | char buf[32]; |
357 | 367 | |
... | ... | @@ -359,6 +369,7 @@ |
359 | 369 | strmhz(buf, CONFIG_SYS_CLK)); |
360 | 370 | return 0; |
361 | 371 | } |
372 | +#endif /* CONFIG_DISPLAY_CPUINFO */ | |
362 | 373 | |
363 | 374 | int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) |
364 | 375 | { |
... | ... | @@ -372,7 +383,8 @@ |
372 | 383 | #endif |
373 | 384 | |
374 | 385 | #ifdef CONFIG_M5253 |
375 | -int checkcpu(void) | |
386 | +#if defined(CONFIG_DISPLAY_CPUINFO) | |
387 | +int print_cpuinfo(void) | |
376 | 388 | { |
377 | 389 | char buf[32]; |
378 | 390 | |
... | ... | @@ -389,6 +401,7 @@ |
389 | 401 | } |
390 | 402 | return 0; |
391 | 403 | } |
404 | +#endif /* CONFIG_DISPLAY_CPUINFO */ | |
392 | 405 | |
393 | 406 | int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) |
394 | 407 | { |
arch/m68k/cpu/mcf530x/cpu.c
... | ... | @@ -25,7 +25,8 @@ |
25 | 25 | return 0; |
26 | 26 | } |
27 | 27 | |
28 | -int checkcpu(void) | |
28 | +#if defined(CONFIG_DISPLAY_CPUINFO) | |
29 | +int print_cpuinfo(void) | |
29 | 30 | { |
30 | 31 | char buf[32]; |
31 | 32 | |
... | ... | @@ -33,5 +34,6 @@ |
33 | 34 | strmhz(buf, CONFIG_SYS_CPU_CLK)); |
34 | 35 | return 0; |
35 | 36 | } |
37 | +#endif /* CONFIG_DISPLAY_CPUINFO */ | |
36 | 38 | #endif |
arch/m68k/cpu/mcf532x/cpu.c
... | ... | @@ -30,7 +30,8 @@ |
30 | 30 | return 0; |
31 | 31 | }; |
32 | 32 | |
33 | -int checkcpu(void) | |
33 | +#if defined(CONFIG_DISPLAY_CPUINFO) | |
34 | +int print_cpuinfo(void) | |
34 | 35 | { |
35 | 36 | ccm_t *ccm = (ccm_t *) MMAP_CCM; |
36 | 37 | u16 msk; |
... | ... | @@ -95,6 +96,7 @@ |
95 | 96 | |
96 | 97 | return 0; |
97 | 98 | }; |
99 | +#endif /* CONFIG_DISPLAY_CPUINFO */ | |
98 | 100 | |
99 | 101 | #if defined(CONFIG_WATCHDOG) |
100 | 102 | /* Called by macro WATCHDOG_RESET */ |
arch/m68k/cpu/mcf5445x/cpu.c
... | ... | @@ -31,7 +31,8 @@ |
31 | 31 | return 0; |
32 | 32 | }; |
33 | 33 | |
34 | -int checkcpu(void) | |
34 | +#if defined(CONFIG_DISPLAY_CPUINFO) | |
35 | +int print_cpuinfo(void) | |
35 | 36 | { |
36 | 37 | ccm_t *ccm = (ccm_t *) MMAP_CCM; |
37 | 38 | u16 msk; |
... | ... | @@ -100,6 +101,7 @@ |
100 | 101 | |
101 | 102 | return 0; |
102 | 103 | } |
104 | +#endif /* CONFIG_DISPLAY_CPUINFO */ | |
103 | 105 | |
104 | 106 | #if defined(CONFIG_MCFFEC) |
105 | 107 | /* Default initializations for MCFFEC controllers. To override, |
arch/m68k/cpu/mcf547x_8x/cpu.c
... | ... | @@ -34,7 +34,8 @@ |
34 | 34 | return 1; |
35 | 35 | }; |
36 | 36 | |
37 | -int checkcpu(void) | |
37 | +#if defined(CONFIG_DISPLAY_CPUINFO) | |
38 | +int print_cpuinfo(void) | |
38 | 39 | { |
39 | 40 | siu_t *siu = (siu_t *) MMAP_SIU; |
40 | 41 | u16 id = 0; |
... | ... | @@ -91,6 +92,7 @@ |
91 | 92 | |
92 | 93 | return 0; |
93 | 94 | }; |
95 | +#endif /* CONFIG_DISPLAY_CPUINFO */ | |
94 | 96 | |
95 | 97 | #if defined(CONFIG_HW_WATCHDOG) |
96 | 98 | /* Called by macro WATCHDOG_RESET */ |
common/Kconfig
... | ... | @@ -533,7 +533,7 @@ |
533 | 533 | |
534 | 534 | config DISPLAY_CPUINFO |
535 | 535 | bool "Display information about the CPU during start up" |
536 | - default y if ARM || NIOS2 || X86 || XTENSA | |
536 | + default y if ARM || NIOS2 || X86 || XTENSA || M68K | |
537 | 537 | help |
538 | 538 | Display information about the CPU that U-Boot is running on |
539 | 539 | when U-Boot starts up. The function print_cpuinfo() is called |
common/board_f.c
... | ... | @@ -780,8 +780,7 @@ |
780 | 780 | console_init_f, /* stage 1 init of console */ |
781 | 781 | display_options, /* say that we are here */ |
782 | 782 | display_text_info, /* show debugging info if required */ |
783 | -#if defined(CONFIG_PPC) || defined(CONFIG_M68K) || defined(CONFIG_SH) || \ | |
784 | - defined(CONFIG_X86) | |
783 | +#if defined(CONFIG_PPC) || defined(CONFIG_SH) || defined(CONFIG_X86) | |
785 | 784 | checkcpu, |
786 | 785 | #endif |
787 | 786 | #if defined(CONFIG_DISPLAY_CPUINFO) |