public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] Dynamic SDRAM Config on MPC8245
@ 2003-02-06 15:21 Chris Hallinan
  0 siblings, 0 replies; 5+ messages in thread
From: Chris Hallinan @ 2003-02-06 15:21 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot-Users] Dynamic SDRAM Config on MPC8245
       [not found] <0000B2F9.C22236@net1plus.com>
@ 2003-02-06 15:38 ` diekema_jon
  0 siblings, 0 replies; 5+ messages in thread
From: diekema_jon @ 2003-02-06 15:38 UTC (permalink / raw)
  To: u-boot

> Has anyone looked at this on 8245 or like processors/SDRAM
> controllers?  We'd like to hear comments/opinions.

We havn't done this for the MPC8245, however we did this for the
MPC8260.  Perhaps you can use this code or ideas on the MPC8245.  This
can be found in the U-Boot tree as boards/sacsng/sacsng.c.  Look for
the initdram() routine.



**********************************************************************
This e-mail and any files transmitted with it are confidential and may
be legally privileged or otherwise exempt from disclosure under
applicable law. This e-mail and its files are intended solely for
the individual or entity to whom they are addressed and their content
is the property of Smiths Aerospace.  If you are not the intended
recipient, please do not read, copy, use or disclose this communication.
If you have received this e-mail in error please notify the e-mail 
administrator at postmaster at si.com and then delete this e-mail, its
files and any copies.

This footnote also confirms that this e-mail message has been scanned
for the presence of known computer viruses.
***********************************************************************

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot-Users] Dynamic SDRAM Config on MPC8245
@ 2003-02-06 21:41 Ken Chou
  0 siblings, 0 replies; 5+ messages in thread
From: Ken Chou @ 2003-02-06 21:41 UTC (permalink / raw)
  To: u-boot

> -----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.

Ken

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot-Users] Dynamic SDRAM Config on MPC8245
@ 2003-02-06 22:07 Ken Chou
  2003-02-06 23:13 ` Wolfgang Denk
  0 siblings, 1 reply; 5+ messages in thread
From: Ken Chou @ 2003-02-06 22:07 UTC (permalink / raw)
  To: u-boot

> -----Original Message-----
> From: diekema_jon [mailto:diekema at lucky.si.com]
> Sent: Thursday, February 06, 2003 7:39 AM
> To: clh at net1plus.com; u-boot-users at lists.sourceforge.net
> Subject: Re: [U-Boot-Users] Dynamic SDRAM Config on MPC8245
> 
> > Has anyone looked at this on 8245 or like processors/SDRAM
> > controllers?  We'd like to hear comments/opinions.
> 
> We havn't done this for the MPC8245, however we did this for the
> MPC8260.  Perhaps you can use this code or ideas on the MPC8245.  This
> can be found in the U-Boot tree as boards/sacsng/sacsng.c.  Look for
> the initdram() routine.
> 

I looked at boards/sacsng/sacsng.c and wondering how can i2c_read() be
used?

After looking at lib_ppc/board.c, I realized the U-Boot has the
init_fnc_t *init_sequence[] array.

The i2c is initialized before the dram in the U-Boot.

#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C)
	init_func_i2c,
#endif
#if defined(CONFIG_DTT)		/* Digital Thermometers and Thermostats
*/
	dtt_init,
#endif
	INIT_FUNC_WATCHDOG_RESET
	init_func_ram,
 
We might need to move to U-Boot instead of using PPCBOOT.

Ken

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot-Users] Dynamic SDRAM Config on MPC8245
  2003-02-06 22:07 Ken Chou
@ 2003-02-06 23:13 ` Wolfgang Denk
  0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Denk @ 2003-02-06 23:13 UTC (permalink / raw)
  To: u-boot

In message <7D036BD3216A084DB1BD9D62BCEAF290089C77@mail1irv.inside.istor.com> you wrote:
> 
> We might need to move to U-Boot instead of using PPCBOOT.

Right so :-)

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
There is is no reason for any individual to have a computer in  their
home.      -- Ken Olsen (President of Digital Equipment Corporation),
              Convention of the World Future Society, in Boston, 1977

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-02-06 23:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <0000B2F9.C22236@net1plus.com>
2003-02-06 15:38 ` [U-Boot-Users] Dynamic SDRAM Config on MPC8245 diekema_jon
2003-02-06 22:07 Ken Chou
2003-02-06 23:13 ` Wolfgang Denk
  -- strict thread matches above, loose matches on Subject: below --
2003-02-06 21:41 Ken Chou
2003-02-06 15:21 Chris Hallinan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox