[U-Boot-Users] SDRAM init, and Chip Selects

Jerry Walden jwalden at digitalatlantic.com
Thu Feb 13 21:15:49 CET 2003


So to be more clear at the start of our custom 405GPr SDRAM init routine we
had to

addi    r4,0,mem_mcopt1
mtdcr   memcfga,r4
addis   r4,0,0x00E0 -------------> this was reading back as 0x80E0
ori     r4,r4,0x0000
mtdcr   memcfgd,r4

Jerry Walden
Program Manager
Digital Atlantic Inc
http://www.digitalatlantic.com
jwalden at digitalatlantic.com
1-877-494-6073 x407
cell - 703-431-2413

-----Original Message-----
From: Jerry Walden [mailto:jwalden at digitalatlantic.com]
Sent: Thursday, February 13, 2003 3:11 PM
To: U-Boot-Users at Lists. Sourceforge. Net
Subject: RE: [U-Boot-Users] SDRAM init, and Chip Selects



We have memory working!

The problem was that the SDRAM_OPT mem_mcopt1 - the high order bit after a
reset
is supposed to reset (go to a zero) in order to allow you to program the
SDRAM
controller.  We found that upon entry to our sdram_init code that that bit
was
still a one, hence all the writes that we were doing to the SDRAM controller
to
set up memory banks etc. were not actually getting written to the register.
We discovered
this by attempting to read back the values that we were attempting to write,
and
we found that the registers did not reflect what we were writing to them.
So
we explicity zero'ed out the high order bit of mem_mcopt1, and found that we
could read back what we wrote, and now SDRAM behave great.

Now I just need to go through and look at how the UART is initialized etc to
get the
BIOS up and running.

Jerry Walden
Program Manager
Digital Atlantic Inc
http://www.digitalatlantic.com
jwalden at digitalatlantic.com
1-877-494-6073 x407
cell - 703-431-2413

-----Original Message-----
From: Laurent Mohin [mailto:laurent.mohin at acterna.com]
Sent: Wednesday, February 12, 2003 2:51 AM
To: jwalden at digitalatlantic.com
Cc: U-Boot-Users at Lists. Sourceforge. Net
Subject: Re: [U-Boot-Users] SDRAM init, and Chip Selects



Jerry,

How do you initialize the SDRAM controller of the 405GPr?

In board_init_f function, there's a call to an initdram function. In this
function, you can choose between explicitely initializing the SDRAM
controller from fixed values or read SDRAM information (from an I2C EEprom
or another device depending on your board) and calculate the values (as
that was done for the Walnut board for example).

Hope this helps,

Laurent








More information about the U-Boot mailing list