From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bertrand BAUDET Date: Fri, 7 Jan 2005 12:03:38 +0000 Subject: [U-Boot-Users] mpc5200 relocation problem In-Reply-To: <7cc0170405010702323cf9f0bf@mail.gmail.com> References: <7cc0170405010702323cf9f0bf@mail.gmail.com> Message-ID: <200501071203.38268.bbaudet@lacie.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 MPC5XXX_SDRAM_CTRL register. /* find RAM size using SDRAM CS1 only */ sdram_start(0); test1 = get_ram_size((ulong *)(CFG_SDRAM_BASE + dramsize), 0x80000000); sdram_start(1); test2 = get_ram_size((ulong *)(CFG_SDRAM_BASE + dramsize), 0x80000000); if (test1 > test2) { sdram_start(0); 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) ) { sdram_start(0); } else if( dramsize==(64*1024*1024) ) { sdram_start(1); } printf("SDRAM_CTRL=0x%x\n",*(vu_long *)MPC5XXX_SDRAM_CTRL); Bertrand 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