]> git.sur5r.net Git - u-boot/commitdiff
lib_ppc: make board_add_ram_info weak
authorKim Phillips <kim.phillips@freescale.com>
Fri, 17 Aug 2007 03:52:39 +0000 (22:52 -0500)
committerWolfgang Denk <wd@denx.de>
Sat, 18 Aug 2007 19:39:46 +0000 (21:39 +0200)
platforms wishing to display RAM diagnostics in addition to size,
can do so, on one line, in their own board_add_ram_info()
implementation.

this consequently eliminates CONFIG_ADD_RAM_INFO.

Thanks to Stefan for the hint.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
board/lwmon5/sdram.c
board/netstal/hcu5/sdram.c
cpu/ppc4xx/44x_spd_ddr2.c
include/configs/TQM85xx.h
include/configs/hcu5.h
include/configs/katmai.h
include/configs/luan.h
include/configs/lwmon5.h
include/configs/p3mx.h
include/configs/yucca.h
lib_ppc/board.c

index f906b859a312b51dd51b52c27d918d8daaa12cc1..d4547e24cf1abed9f2b068a1b2ad86b79944201c 100644 (file)
@@ -57,7 +57,6 @@
 void dcbz_area(u32 start_address, u32 num_bytes);
 void dflush(void);
 
-#ifdef CONFIG_ADD_RAM_INFO
 static u32 is_ecc_enabled(void)
 {
        u32 val;
@@ -87,7 +86,6 @@ void board_add_ram_info(int use_default)
        val = DDR0_03_CASLAT_DECODE(val);
        printf(", CL%d)", val);
 }
-#endif
 
 static int wait_for_dlllock(void)
 {
index 40391958d21c51f7318a37c47226cd01e01ebc56..c5be8b9258d5ed841f364b84ff45e656d3c3157c 100644 (file)
@@ -70,7 +70,6 @@ void dflush(void);
 
 void program_tlb(u32 phys_addr, u32 virt_addr, u32 size, u32 tlb_word2_i_value);
 
-#ifdef CONFIG_ADD_RAM_INFO
 void board_add_ram_info(int use_default)
 {
        PPC440_SYS_INFO board_cfg;
@@ -99,7 +98,6 @@ void board_add_ram_info(int use_default)
        val = DDR0_03_CASLAT_DECODE(val);
        printf(", CL%d)", val);
 }
-#endif
 
 /*--------------------------------------------------------------------
  * wait_for_dlllock.
index 18b90ba5ac630b14a35f1ef7ab05f0b0535b9cc6..67ba5bdef24f76716ee817e1d7b382c2ce91840f 100644 (file)
@@ -621,7 +621,6 @@ static void get_spd_info(unsigned long *dimm_populated,
        }
 }
 
-#ifdef CONFIG_ADD_RAM_INFO
 void board_add_ram_info(int use_default)
 {
        PPC440_SYS_INFO board_cfg;
@@ -642,7 +641,6 @@ void board_add_ram_info(int use_default)
        val = (val & SDRAM_MMODE_DCL_MASK) >> 4;
        printf(", CL%d)", val);
 }
-#endif
 
 /*------------------------------------------------------------------
  * For the memory DIMMs installed, this routine verifies that they
index cb9bf5492950eb89e186b95704cc9d3534af0177..9beb0bacf8bf2436bd4d6f5fa42d42ea9f2fc3c5 100644 (file)
@@ -94,7 +94,6 @@
  */
 #define CFG_DDR_SDRAM_BASE     0x00000000      /* DDR is system memory */
 #define CFG_SDRAM_BASE         CFG_DDR_SDRAM_BASE
-#define CONFIG_ADD_RAM_INFO    1               /* print additional info*/
 
 #if defined(CONFIG_TQM8540) || defined(CONFIG_TQM8560)
 /* TQM8540 & 8560 need DLL-override */
index d0bf2516edc1423206034bd36a638d32e0893928..f95d78ec1670d80d18b6ad97456a965cdb4d0683 100644 (file)
@@ -43,7 +43,6 @@
 
 #define CONFIG_BOARD_EARLY_INIT_F 1            /* Call board_early_init_f */
 #define CONFIG_MISC_INIT_R     1               /* Call misc_init_r     */
-#define CONFIG_ADD_RAM_INFO    1       /* Print additional info        */
 
 /*-----------------------------------------------------------------------
  * Base addresses -- Note these are effective addresses where the
index 110ad44ee1bc5fc115a6332893fd715bc8e42de1..b6d0f519a829acf1f6b9071cbf27a2a22a978db6 100644 (file)
@@ -42,7 +42,6 @@
 
 #define CONFIG_BOARD_EARLY_INIT_F 1    /* Call board_pre_init          */
 #define        CONFIG_MISC_INIT_F      1       /* Use misc_init_f()            */
-#define CONFIG_ADD_RAM_INFO    1       /* Print additional info        */
 #undef  CONFIG_SHOW_BOOT_PROGRESS
 
 /*-----------------------------------------------------------------------
index 26dbec92e97c3a61238213c261535dd1fc18f662..a09dd74733e2d048e187f573011e6e369066e675 100644 (file)
@@ -39,7 +39,6 @@
 
 #define CONFIG_BOARD_EARLY_INIT_F 1    /* call board_early_init_f()    */
 #define CONFIG_MISC_INIT_R     1       /* call misc_init_r()           */
-#define CONFIG_ADD_RAM_INFO    1       /* Print additional info        */
 
 /*-----------------------------------------------------------------------
  * Base addresses -- Note these are effective addresses where the
index 604b7d12f8321848650ecc93c217c4b0d79bb6fc..7116c49c772669de7690da3d2de84ff115ec4bfa 100644 (file)
@@ -35,7 +35,6 @@
 
 #define CONFIG_BOARD_EARLY_INIT_F 1    /* Call board_early_init_f      */
 #define CONFIG_MISC_INIT_R     1       /* Call misc_init_r             */
-#define CONFIG_ADD_RAM_INFO    1       /* Print additional info        */
 
 /*-----------------------------------------------------------------------
  * Base addresses -- Note these are effective addresses where the
index 8ae38cb27754035d0210373bb1cc9a279d4562da..bec442d9839b1b3a7c61605fea6328e97a6da634 100644 (file)
@@ -60,7 +60,6 @@
 #define CONFIG_BOARD_EARLY_INIT_F 1     /* Call board_early_init_f     */
 #define CONFIG_BOARD_EARLY_INIT_R 1     /* Call board_early_init_f     */
 #define CONFIG_MISC_INIT_R      1      /* Call misc_init_r()           */
-#define CONFIG_ADD_RAM_INFO    1       /* Print additional info        */
 
 /*-----------------------------------------------------------------------
  * Base addresses -- Note these are effective addresses where the
index 9c536fd12da9cd17a5a185a7670d63351c520cbd..906f046fa7aa66da11a4199e696e5d62dcc20194 100644 (file)
@@ -46,7 +46,6 @@
 #define EXTCLK_83              83333333
 
 #define        CONFIG_MISC_INIT_F      1       /* Use misc_init_f()            */
-#define CONFIG_ADD_RAM_INFO    1       /* Print additional info        */
 #undef  CONFIG_SHOW_BOOT_PROGRESS
 #undef  CONFIG_STRESS
 
index c87d46c3d626a1b00bb06fc373aaf6f1dcc24001..9aa67f93c0f66a6e5764cc1ee31a856da701f924 100644 (file)
@@ -209,9 +209,12 @@ static int init_baudrate (void)
 
 /***********************************************************************/
 
-#ifdef CONFIG_ADD_RAM_INFO
-void board_add_ram_info(int);
-#endif
+void __board_add_ram_info(int use_default)
+{
+       /* please define platform specific board_add_ram_info() */
+}
+void board_add_ram_info(int) __attribute__((weak, alias("__board_add_ram_info")));
+
 
 static int init_func_ram (void)
 {
@@ -224,9 +227,7 @@ static int init_func_ram (void)
 
        if ((gd->ram_size = initdram (board_type)) > 0) {
                print_size (gd->ram_size, "");
-#ifdef CONFIG_ADD_RAM_INFO
                board_add_ram_info(0);
-#endif
                putc('\n');
                return (0);
        }