[U-Boot-Users] Dynamic SDRAM Config on MPC8245

Ken Chou kchou at istor.com
Thu Feb 6 22:41:28 CET 2003

> -----Original Message-----
> From: Chris Hallinan [mailto:clh at net1plus.com]
> Sent: Thursday, February 06, 2003 7:22 AM
> To: u-boot-users at lists.sourceforge.net
> Subject: [U-Boot-Users] Dynamic SDRAM Config on MPC8245
> Hi all,
> We have a request to support dynamic SDRAM detection and
> configuration on an MPC8245-based custom board.  We are currently
> running PPCBoot-1.2.0 on the board (haven't had time to upgrade)
> though we have a reasonably recent U-Boot source tree for reference.
> Basically, we want to be able to drop in different SDRAM SODIMM
> modules and have the integrated SDRAM controller set up correctly on
> boot, much like a PC does.
> We have I2C enabled, and we can read the Serial Presence Detect
> EEPROM on the SODIMM, but this code in U-Boot requires SDRAM already
> running.  The difficulty on 8245 is the MEMGO bit, which the way I
> read it, you risk losing SDRAM data when you change SDRAM
> configuration on the fly.
> There are 2 options which come to mind:
> 1) Write a simple I2C read routine in assembler capable of running
> without DRAM to read Presence Detect EEPROM, decode and apply
> settings (moderate effort) or
> 2) Change the settings on the fly after booting and setting SDRAM
> for 'worst case' timings and bank settings.  (much easier effort, as
> much of the code exists in U-Boot to do this.
> Not sure if 2 will corrupt SDRAM or not.
> Has anyone looked at this on 8245 or like processors/SDRAM
> controllers?  We'd like to hear comments/opinions.
> Thanks,
> Chris Hallinan
> DS4.COM, Inc

I used item 1).
It is not so pretty yet works fine for me on UBOOT, PPCBOOT 116 and 200.
The code is in C (using stack on the cache, the trick Wolfgang used).

The code is under board/myboard/myboard.c 
The function is initdram (int board_type).

I will send you the source so that you can improve it.
It used hard coded value that I don't want to post it.


More information about the U-Boot mailing list