[U-Boot-Users] [PATCH] PPC405EX(r) ECC and SDRAM Initialization Clean-ups

Stefan Roese sr at denx.de
Mon Apr 28 17:29:34 CEST 2008


On Monday 28 April 2008, Grant Erickson wrote:
> The primary goal of this patch is to unify some of the low-level SDRAM and
> ECC initialization code for the PPC4xx processors that use a common DDR2
> SDRAM controller.
>
> In particular, in the case of the 405EX[r], it must initialize SDRAM before
> a primordial stack is available since OCM doesn't exist and the data cache
> doesn't work for such a purpose. As a consequence, the ECC (and SDRAM)
> initialization code must be stack-free.

We need to investigate here, why exactly the init-RAM in d-cache is currently 
not working on 405EX. Any ideas on this are very welcome. I'll try to dig 
into this in the a few days too.

> This patch creates such a stack-free ecc_init() routine that should,
> nonetheless, still be compatible from a C runtime environment.
>
> In addition, the patch cleans-up the Kilauea and Makalu SDRAM
> initialization code by polling SDRAM0_MCSTAT[MIC] as recommended by AMCC
> AN2131 rather than just waiting some arbitrary period of time. Also, the
> final controller initialization is generalized by ORing in
> SDRAM_MCOPT2_DCEN_ENABLE rather than just slamming 0x28000000 into the
> register. This is to make way for a future patch that uses CFG_SDRAM0_*
> values for boards that use such low-level initialization so they might
> share this SDRAM init code. Finally, while neither Kilauea nor Makalu have
> ECC memory, code is added to init.S for each to demonstrate how ecc_init()
> would be called if it were available as a reference.
>
> Signed-off-by: Grant Erickson <gerickson at nuovations.com>
>
> ---
>  board/amcc/kilauea/init.S |   53
> +++++++++++++++++++++++++++++++++++++++------

The patch is line-wrapped. Please use git-send-email is possible.

>  board/amcc/makalu/init.S  |   53
> +++++++++++++++++++++++++++++++++++++++------
>  cpu/ppc4xx/Makefile       |    1 +
>  cpu/ppc4xx/sdram.c        |   47 +++------------------------------------
>  4 files changed, 97 insertions(+), 57 deletions(-)

The ECC code seems to be missing.

I'll wait with further review until the missing ECC code is included. :)

Thanks.

Best regards,
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
=====================================================================




More information about the U-Boot mailing list