From: agraham at amcc.com Date: Tue, 26 Aug 2008 22:51:48 -0700 Subject: [U-Boot] [PATCH] ppc4xx: For the Kilauea board include the new PPC4xx SDRAM Controller DDR autocalibration routine. Message-ID: <1219816308-9501-1-git-send-email-agraham@amcc.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Adam Graham Signed-off-by: Adam Graham --- cpu/ppc4xx/44x_spd_ddr2.c | 58 ++++++++++++++++++++++++++++++--------- cpu/ppc4xx/Makefile | 1 + include/asm-ppc/ppc4xx-sdram.h | 2 +- include/configs/kilauea.h | 15 ++++++++++ 4 files changed, 61 insertions(+), 15 deletions(-) diff --git a/cpu/ppc4xx/44x_spd_ddr2.c b/cpu/ppc4xx/44x_spd_ddr2.c index 001f2c1..fc1ae5f 100644 --- a/cpu/ppc4xx/44x_spd_ddr2.c +++ b/cpu/ppc4xx/44x_spd_ddr2.c @@ -60,7 +60,8 @@ "SDRAM_" #mnemonic, SDRAM_##mnemonic, data); \ } while (0) -static inline void ppc4xx_ibm_ddr2_register_dump(void); +inline void ppc4xx_ibm_ddr2_register_dump(void); +void blank_string(int); #if defined(CONFIG_SPD_EEPROM) @@ -2291,18 +2292,6 @@ static unsigned long is_ecc_enabled(void) return ecc; } -static void blank_string(int size) -{ - int i; - - for (i=0; i>2) +#if !defined(CONFIG_405EX) /* * Memory queue defines */ @@ -293,7 +294,6 @@ #define SDRAM_PLBADDUHB (SDRAMQ_DCR_BASE+0x10) /* PLB base address upper 32 LL */ -#if !defined(CONFIG_405EX) /* * Memory Bank 0-7 configuration */ diff --git a/include/configs/kilauea.h b/include/configs/kilauea.h index a475f97..e417295 100644 --- a/include/configs/kilauea.h +++ b/include/configs/kilauea.h @@ -222,6 +222,18 @@ * DDR SDRAM *----------------------------------------------------------------------*/ #define CFG_MBYTES_SDRAM (256) /* 256MB */ +#define CONFIG_PPC4xx_DDR_AUTOCALIBRATION /* IBM DDR autocalibration */ + +/* + * DDR Autocalibration Method_B is the default. + * Note: DDR Autocalibration Method_A scans the full range of possible PPC4xx + * SDRAM Controller DDR autocalibration values and takes a lot longer + * to run than Method_B. + * (See the Method_A and Method_B algorithm discription in the file: + * cpu/ppc4xx/4xx_ddr2.c) + * Define to use DDR autocalibration Method_A + */ +#undef CONFIG_PPC4xx_DDR_METHOD_A #define CFG_SDRAM0_MB0CF_BASE (( 0 << 20) + CFG_SDRAM_BASE) @@ -386,6 +398,9 @@ #define CONFIG_HAS_ETH1 1 /* add support for "eth1addr" */ #define CONFIG_PHY1_ADDR 2 +/* Debug messages for the DDR autocalibration */ +#define CONFIG_AUTOCALIB "silent\0" /* default is non-verbose */ + /* * Default environment variables */ -- 1.5.5