]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Move #ifdef(CONFIG_DISPLAY_CPUINFO) from caller to callee
authorMasahiro Yamada <yamada.m@jp.panasonic.com>
Thu, 13 Feb 2014 09:30:26 +0000 (18:30 +0900)
committerTom Rini <trini@ti.com>
Wed, 19 Feb 2014 16:10:05 +0000 (11:10 -0500)
- 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>
arch/arm/cpu/armv7/omap-common/hwinit-common.c
arch/arm/include/asm/arch-am33xx/sys_proto.h
arch/arm/lib/board.c
board/altera/socfpga/socfpga_cyclone5.c
board/freescale/mx53loco/mx53loco.c
board/nokia/rx51/rx51.h
common/board_f.c
include/common.h

index bf2951031d99c832b298d0bcaaf36ff05e1658c7..ade744e31fe4feff27f266a685d3b87d92df91ff 100644 (file)
@@ -248,6 +248,7 @@ u32 get_device_type(void)
                                      (DEVICE_TYPE_MASK)) >> DEVICE_TYPE_SHIFT;
 }
 
+#if defined(CONFIG_DISPLAY_CPUINFO)
 /*
  * Print CPU information
  */
@@ -258,6 +259,8 @@ int print_cpuinfo(void)
 
        return 0;
 }
+#endif
+
 #ifndef CONFIG_SYS_DCACHE_OFF
 void enable_caches(void)
 {
index 87b7d367b9d881eb4068ef7e1baa606cc5d6990b..2e5c356e448746e225636b920820ffb867a43400 100644 (file)
 u32 get_cpu_rev(void);
 u32 get_sysboot_value(void);
 
-#ifdef CONFIG_DISPLAY_CPUINFO
-int print_cpuinfo(void);
-#endif
-
 extern struct ctrl_stat *cstat;
 u32 get_device_type(void);
 void save_omap_boot_params(void);
index 38b9c7d3c57361b943c5846d8d464334038987a4..c320a35166b82009a7cc623b7460754294bf3ba5 100644 (file)
@@ -197,8 +197,6 @@ static int arm_pci_init(void)
  */
 typedef int (init_fnc_t) (void);
 
-int print_cpuinfo(void);
-
 void __dram_init_banksize(void)
 {
        gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
@@ -250,9 +248,7 @@ init_fnc_t *init_sequence[] = {
        serial_init,            /* serial communications setup */
        console_init_f,         /* stage 1 init of console */
        display_banner,         /* say that we are here */
-#if defined(CONFIG_DISPLAY_CPUINFO)
        print_cpuinfo,          /* display cpu info (and speed) */
-#endif
 #if defined(CONFIG_DISPLAY_BOARDINFO)
        checkboard,             /* display board info */
 #endif
index 576066bef13f3bd06a8b5d93e9206189a0b95462..a960eb60028b52e187ecabf04341e2074de53c38 100644 (file)
@@ -12,6 +12,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
+#if defined(CONFIG_DISPLAY_CPUINFO)
 /*
  * Print CPU information
  */
@@ -20,6 +21,7 @@ int print_cpuinfo(void)
        puts("CPU   : Altera SOCFPGA Platform\n");
        return 0;
 }
+#endif
 
 /*
  * Print Board information
index db0bf17363e17346adc9e1357246595d9576f33c..08dd66fcc6414d8bd7afceb9244861858da34d06 100644 (file)
@@ -343,6 +343,7 @@ int board_early_init_f(void)
        return 0;
 }
 
+#if defined(CONFIG_DISPLAY_CPUINFO)
 int print_cpuinfo(void)
 {
        u32 cpurev;
@@ -356,6 +357,7 @@ int print_cpuinfo(void)
        printf("Reset cause: %s\n", get_reset_cause());
        return 0;
 }
+#endif
 
 /*
  * Do not overwrite the console
index 4a230dd596e8b1662c6e6b4b1e9a49559479ab1e..0d2f0a54c56bdd01f66f27c02160a078878fed47 100644 (file)
@@ -22,8 +22,6 @@ struct emu_hal_params_rx51 {
        u32 param4;
 };
 
-int print_cpuinfo(void);
-
 /*
  * IEN  - Input Enable
  * IDIS - Input Disable
index d0ee6f76566b54001db6331268a81362dd570ca0..02965b0df76a36a2218264d82365d087816d831f 100644 (file)
@@ -887,9 +887,7 @@ static init_fnc_t init_sequence_f[] = {
 #ifdef CONFIG_PPC
        checkcpu,
 #endif
-#if defined(CONFIG_DISPLAY_CPUINFO)
        print_cpuinfo,          /* display cpu info (and speed) */
-#endif
 #if defined(CONFIG_MPC5xxx)
        prt_mpc5xxx_clks,
 #endif /* CONFIG_MPC5xxx */
index 672c0b5c170932dd018aff57eab38b1e661627ba..08b294cfd9124f9bcac11e7fda85163fe60c1a2a 100644 (file)
@@ -304,7 +304,14 @@ extern ulong monitor_flash_len;
 int mac_read_from_eeprom(void);
 extern u8 __dtb_dt_begin[];    /* embedded device tree blob */
 int set_cpu_clk_info(void);
+#if defined(CONFIG_DISPLAY_CPUINFO)
 int print_cpuinfo(void);
+#else
+static inline int print_cpuinfo(void)
+{
+       return 0;
+}
+#endif
 int update_flash_size(int flash_size);
 
 /**