[U-Boot-Users] mpc5200 relocation problem

Bertrand BAUDET bbaudet at lacie.com
Fri Jan 7 13:03:38 CET 2005

I don't know if it's related, but I had an issue with the u-boot-1.1.1 when 
using 32MB SDRAM with a MPC5200.

In the initdram function in icecube.c, the sdram_start is properly set to 0
after detection 32MB for CS0. 
But when trying to detect mem with CS1, and if there is no mem, the 
sdram_start is set to 1 and then improperly set the high_bit to 1 in the 

        /* find RAM size using SDRAM CS1 only */
        test1 = get_ram_size((ulong *)(CFG_SDRAM_BASE + dramsize), 
        test2 = get_ram_size((ulong *)(CFG_SDRAM_BASE + dramsize), 
        if (test1 > test2) {
                dramsize2 = test1;
        } else {
                dramsize2 = test2;

if no mem, test1==test2 and then sdram_start(1) is kept set.
Or the previous test for CS0, which properly detected 32MB,
set up sdram_start(0) correctly.

I haven't had time to figure a clean fix, so I did a dirty hack:

       // FIXME
        if( dramsize==(32*1024*1024) ) {
        } else if( dramsize==(64*1024*1024) ) {
printf("SDRAM_CTRL=0x%x\n",*(vu_long *)MPC5XXX_SDRAM_CTRL);


Le Vendredi 07 Janvier 2005 10:32, Giorgio Delmondo a écrit :
> Hi,
> I designed an MPC5200 with 256MB RAM (4 x 512Mb chips; MT48LC32M16A2,
> 8x16bitx4banks). When I force U-boot to just use the first 128 MB,
> everything  is ok (I force the return value from the routine exploring
> the RAM size).
> If I try to use the full 256 MB it crashes in the relocation phase
> (not always at the same point). I'm quite sure the RAM is working, as
> a test RAM program, residing in the low RAM and testing the full
> memory from 0x08000000 to 0x0fffffff, always gives result ok (it's
> started from U-boot running in low memory).
> I'm using u-boot 1.1.1
> Any suggestion?
> Many thanks
> -------------------------------------------------------
> The SF.Net email is sponsored by: Beat the post-holiday blues
> Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
> It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
> _______________________________________________
> U-Boot-Users mailing list
> U-Boot-Users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/u-boot-users

More information about the U-Boot mailing list