X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=board%2Fmotionpro%2Fmotionpro.c;h=3b340622266f5f2df8caf57e1cc2fdf69b114292;hb=ab4860b255239dbaecccdd002c8d11f4ef54dd75;hp=f83998e5aa05c9970ff1cf844e38d483c3b72e29;hpb=f930922f061ea7bf585296859d1c14194c24b840;p=u-boot diff --git a/board/motionpro/motionpro.c b/board/motionpro/motionpro.c index f83998e5aa..3b34062226 100644 --- a/board/motionpro/motionpro.c +++ b/board/motionpro/motionpro.c @@ -132,12 +132,18 @@ static void sdram_start(int hi_addr) /* * Initalize SDRAM - configure SDRAM controller, detect memory size. */ -long int initdram(int board_type) +phys_size_t initdram(int board_type) { ulong dramsize = 0; #ifndef CFG_RAMBOOT ulong test1, test2; + /* According to AN3221 (MPC5200B SDRAM Initialization and + * Configuration), the SDelay register must be written a value of + * 0x00000004 as the first step of the SDRAM contorller configuration. + */ + *(vu_long *)MPC5XXX_SDRAM_SDELAY = 0x04; + /* configure SDRAM start/end for detection */ *(vu_long *)MPC5XXX_SDRAM_CS0CFG = 0x0000001e; /* 2G at 0x0 */ *(vu_long *)MPC5XXX_SDRAM_CS1CFG = 0x80000000; /* disabled */