Commit 365475e6d14bc1ea9d218c0fd1fe96878a9db94e
Committed by
Tom Rini
1 parent
2f13363b09
Exists in
master
and in
49 other branches
Move #ifdef(CONFIG_DISPLAY_CPUINFO) from caller to callee
- When CONFIG_DISPLAY_CPUINFO is not enabled, print_cpuinfo() should be defined as an empty function in a header, include/common.h - Remove #ifdef CONFIG_DISPLAY_CPUINFO .. #endif from caller, common/board_f.c and arch/arm/lib/board.c - Remove redundant prototypes in arch/arm/lib/board.c, arch/arm/include/asm/arch-am33x/sys_proto.h and board/nokia/rx51/rx51.h, keeping the one in include/common.h - Add #ifdef CONFIG_DISPLAY_CPUINFO to the func definition where it is missing Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Showing 8 changed files with 14 additions and 12 deletions Side-by-side Diff
arch/arm/cpu/armv7/omap-common/hwinit-common.c
... | ... | @@ -248,6 +248,7 @@ |
248 | 248 | (DEVICE_TYPE_MASK)) >> DEVICE_TYPE_SHIFT; |
249 | 249 | } |
250 | 250 | |
251 | +#if defined(CONFIG_DISPLAY_CPUINFO) | |
251 | 252 | /* |
252 | 253 | * Print CPU information |
253 | 254 | */ |
... | ... | @@ -258,6 +259,8 @@ |
258 | 259 | |
259 | 260 | return 0; |
260 | 261 | } |
262 | +#endif | |
263 | + | |
261 | 264 | #ifndef CONFIG_SYS_DCACHE_OFF |
262 | 265 | void enable_caches(void) |
263 | 266 | { |
arch/arm/include/asm/arch-am33xx/sys_proto.h
arch/arm/lib/board.c
... | ... | @@ -197,8 +197,6 @@ |
197 | 197 | */ |
198 | 198 | typedef int (init_fnc_t) (void); |
199 | 199 | |
200 | -int print_cpuinfo(void); | |
201 | - | |
202 | 200 | void __dram_init_banksize(void) |
203 | 201 | { |
204 | 202 | gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE; |
205 | 203 | |
... | ... | @@ -250,9 +248,7 @@ |
250 | 248 | serial_init, /* serial communications setup */ |
251 | 249 | console_init_f, /* stage 1 init of console */ |
252 | 250 | display_banner, /* say that we are here */ |
253 | -#if defined(CONFIG_DISPLAY_CPUINFO) | |
254 | 251 | print_cpuinfo, /* display cpu info (and speed) */ |
255 | -#endif | |
256 | 252 | #if defined(CONFIG_DISPLAY_BOARDINFO) |
257 | 253 | checkboard, /* display board info */ |
258 | 254 | #endif |
board/altera/socfpga/socfpga_cyclone5.c
... | ... | @@ -12,6 +12,7 @@ |
12 | 12 | |
13 | 13 | DECLARE_GLOBAL_DATA_PTR; |
14 | 14 | |
15 | +#if defined(CONFIG_DISPLAY_CPUINFO) | |
15 | 16 | /* |
16 | 17 | * Print CPU information |
17 | 18 | */ |
... | ... | @@ -20,6 +21,7 @@ |
20 | 21 | puts("CPU : Altera SOCFPGA Platform\n"); |
21 | 22 | return 0; |
22 | 23 | } |
24 | +#endif | |
23 | 25 | |
24 | 26 | /* |
25 | 27 | * Print Board information |
board/freescale/mx53loco/mx53loco.c
... | ... | @@ -343,6 +343,7 @@ |
343 | 343 | return 0; |
344 | 344 | } |
345 | 345 | |
346 | +#if defined(CONFIG_DISPLAY_CPUINFO) | |
346 | 347 | int print_cpuinfo(void) |
347 | 348 | { |
348 | 349 | u32 cpurev; |
... | ... | @@ -356,6 +357,7 @@ |
356 | 357 | printf("Reset cause: %s\n", get_reset_cause()); |
357 | 358 | return 0; |
358 | 359 | } |
360 | +#endif | |
359 | 361 | |
360 | 362 | /* |
361 | 363 | * Do not overwrite the console |
board/nokia/rx51/rx51.h
common/board_f.c
include/common.h
... | ... | @@ -304,7 +304,14 @@ |
304 | 304 | int mac_read_from_eeprom(void); |
305 | 305 | extern u8 __dtb_dt_begin[]; /* embedded device tree blob */ |
306 | 306 | int set_cpu_clk_info(void); |
307 | +#if defined(CONFIG_DISPLAY_CPUINFO) | |
307 | 308 | int print_cpuinfo(void); |
309 | +#else | |
310 | +static inline int print_cpuinfo(void) | |
311 | +{ | |
312 | + return 0; | |
313 | +} | |
314 | +#endif | |
308 | 315 | int update_flash_size(int flash_size); |
309 | 316 | |
310 | 317 | /** |