[U-Boot] SDRAM controller initialization code

Stefan Roese sr at denx.de
Wed Oct 8 07:17:02 CEST 2008


On Tuesday 07 October 2008, Muzammil Ahmed wrote:
> I'm using Yosemite board (PPC440EP) for my development with U-Boot firmware
> version 1.3.4.
>
> Where in source code, I can find code regarding 'initializaiton of SDRAM
> controller'?

Its the function initdram() in board/amcc/yosemite/yosemite.c. Please note 
that I'm not referring to v1.3.4 but to the latest version.

Also I recommend not to use this code for a custom board but to use the code 
available in cpu/ppc4xx/sdram.c. A good example is the p4p440 board support. 
Depending on the SDRAM configuration you have you only need to configure this 
(or similar) in your board config header:

#define CONFIG_SDRAM_BANK0      1       /* init onboard DDR SDRAM bank 0*/
#define CFG_SDRAM_TABLE { \
                {(256 << 20), 13, 0x000C4001}, /* 256MB mode 3, 13x10(4)*/ \
                {(64 << 20),  12, 0x00082001}} /* 64MB mode 2, 12x9(4)  */

> Also, code regarding 'initialization of EBC'?

The EBC init code is in cpu/ppc4xx/cpu_init.c: cpu_init_f(). But you don't 
need to change this code for your board but only define the correct 
CFG_EBC_PBxAB/CR values in your board config header.

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