ppc4xx: Add SDRAM detection for PMC440 boards
PATCH v2 1/1 ppc4xx: Add SDRAM detection for PMC440 boards
This patch adds support to detect the amount of DDR2 SDRAM on PMC440 modules. Detection is done by probing through a list of available and supported hardware configurations from 1GByte down to 256MB.
The static TLB entry is replaced by dynamically created entries.
---
V2: - remove duplicate comment
- fix commit message
- coding style cleanup
board/esd/pmc440/init.S | 11 ++---- board/esd/pmc440/sdram.c | 82 ++++++++++++++++++++++++++++++++------------- include/configs/PMC440.h | 1 - 3 files changed, 61 insertions(+), 33 deletions(-)
board/esd/pmc440/init.S +3 -8
@@ -23,7 +23,7 @@ #include <asm-ppc/mmu.h> #include <config.h> -/************************************************************************** +/* * TLB TABLE * * This table is used by the cpu boot code to setup the initial tlb
@@ -32,7 +32,7 @@ * * Pointer to the table is returned in r1 * - *************************************************************************/ + */ .section .bootpg,"ax" .globl tlbtab
@@ -49,12 +49,7 @@ tlbtab: tlbentry( CONFIG_SYS_NAND_BOOT_SPL_SRC, SZ_4K, CONFIG_SYS_NAND_BOOT_SPL_SRC, 1, AC_R|AC_W|AC_X|SA_G ) #endif - /* TLB-entry for DDR SDRAM (Up to 2GB) */ -#ifdef CONFIG_4xx_DCACHE - tlbentry( CONFIG_SYS_SDRAM_BASE, SZ_256M, CONFIG_SYS_SDRAM_BASE, 0, AC_R|AC_W|AC_X|SA_G) -#else - tlbentry( CONFIG_SYS_SDRAM_BASE, SZ_256M, CONFIG_SYS_SDRAM_BASE, 0, AC_R|AC_W|AC_X|SA_G|SA_I ) -#endif + /* TLB entries for DDR2 SDRAM are generated dynamically */ #ifdef CONFIG_SYS_INIT_RAM_DCACHE /* TLB-entry for init-ram in dcache (SA_I must be turned off!) */
board/esd/pmc440/sdram.c +58 -24
121 lines not on this page · raw message
include/configs/PMC440.h +0 -1
@@ -215,7 +215,6 @@/*----------------------------------------------------------------------- * DDR SDRAM *----------------------------------------------------------------------*/ -#define CONFIG_SYS_MBYTES_SDRAM (256)/* 256MB */ #if !defined(CONFIG_NAND_U_BOOT ) && !defined(CONFIG_NAND_SPL )#define CONFIG_DDR_DATA_EYE /* use DDR2 optimization */ #endif
Signature · 1 line
1.6.1
PATCH v2 1/1 ppc4xx: Add SDRAM detection for PMC440 boards
Quoted 6 lines · On Wednesday 30 September 2009 11:55:04 Matthias Fuchs wrote:
This patch adds support to detect the amount of DDR2 SDRAM on PMC440 modules. Detection is done by probing through a list of available and supported hardware configurations from 1GByte down to 256MB.
The static TLB entry is replaced by dynamically created entries.
Applied to u-boot-ppc4xx/master. Thanks.
Cheers,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de