All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] Problem with SDRAM on my board.
@ 2009-11-23 11:14 Lasse Skov
  2009-11-23 12:38 ` Detlev Zundel
  2009-11-23 14:29 ` Gutierrez Gomez Jesus-B16947
  0 siblings, 2 replies; 5+ messages in thread
From: Lasse Skov @ 2009-11-23 11:14 UTC (permalink / raw)
  To: u-boot

Hello

I have ported the uboot for my own board.
But something is going wrong when uboot try to relocate itself to ram. But it is only sometimes its fail.
Often it work but i then do a mtest in uboot it goes down.

I used the mpc837xerdb as a reference. When it fails it look likes it is when it try to cmp (from the start.s file) the copyed data to the ram.

Anyone had any idea ther maybe could help me a little bit?

/Lasse Skov

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

* [U-Boot] Problem with SDRAM on my board.
  2009-11-23 11:14 [U-Boot] Problem with SDRAM on my board Lasse Skov
@ 2009-11-23 12:38 ` Detlev Zundel
  2009-11-23 14:29 ` Gutierrez Gomez Jesus-B16947
  1 sibling, 0 replies; 5+ messages in thread
From: Detlev Zundel @ 2009-11-23 12:38 UTC (permalink / raw)
  To: u-boot

Hi Lasse,

> I have ported the uboot for my own board.  But something is going
> wrong when uboot try to relocate itself to ram. But it is only
> sometimes its fail.  Often it work but i then do a mtest in uboot it
> goes down.
>
> I used the mpc837xerdb as a reference. When it fails it look likes it
> is when it try to cmp (from the start.s file) the copyed data to the
> ram.
>
> Anyone had any idea ther maybe could help me a little bit?

Well I'm perfectly in line with your observation that you have problems
with your DRAM setup.  So why not check out the DRAM initialization?
Very likely you copied the initialization from the reference board but
use different physical chips.

If you search the mailing list, you will find the same answer again and
again: Take a good look at the datasheet of your DRAM, your DRAM
controller and the initialization in U-Boot.  Find discrepancies and fix
them until your system works.

It is well known that this is a tedious job, so usually nobody
volunteers to do this for free on the mailing list, but hey, maybe you
are lucky?

Cheers
  Detlev

-- 
C hasn't changed much since the 1970s. And let's face it it's ugly.
Can't we do better? C++? (Sorry, never mind.)
                                    -- Rob Pike
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de

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

* [U-Boot] Problem with SDRAM on my board.
  2009-11-23 11:14 [U-Boot] Problem with SDRAM on my board Lasse Skov
  2009-11-23 12:38 ` Detlev Zundel
@ 2009-11-23 14:29 ` Gutierrez Gomez Jesus-B16947
  2009-11-23 19:53   ` Wolfgang Denk
  1 sibling, 1 reply; 5+ messages in thread
From: Gutierrez Gomez Jesus-B16947 @ 2009-11-23 14:29 UTC (permalink / raw)
  To: u-boot

Hi Lasse Skov,

Are you 100% sure the timing setup of your board's SDRAM are okay? If you copied the setup from another board (with another SDRAM chip), it might be the case where you're not meeting the timing characteristics of the new SDRAM chip and therefore SDRAM will have problems when more transactions are demanded (for example, U-boot relocation, or mtest).

Please double check the timing spec of your SDRAM chip (or perhaps the whole configuration) and adjust U-boot accordingly to set them up.

Saludos!

Jes?s Guti?rrez.

-----Original Message-----
From: u-boot-bounces@lists.denx.de [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Lasse Skov
Sent: Lunes, 23 de Noviembre de 2009 05:14 a.m.
To: u-boot at lists.denx.de
Subject: [U-Boot] Problem with SDRAM on my board.

Hello

I have ported the uboot for my own board.
But something is going wrong when uboot try to relocate itself to ram. But it is only sometimes its fail.
Often it work but i then do a mtest in uboot it goes down.

I used the mpc837xerdb as a reference. When it fails it look likes it is when it try to cmp (from the start.s file) the copyed data to the ram.

Anyone had any idea ther maybe could help me a little bit?

/Lasse Skov

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

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

* [U-Boot] Problem with SDRAM on my board.
  2009-11-23 14:29 ` Gutierrez Gomez Jesus-B16947
@ 2009-11-23 19:53   ` Wolfgang Denk
       [not found]     ` <4F4169B21905494EBD47A304F02192C92772357B69@XCH-HQ-01.kk.local>
  0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Denk @ 2009-11-23 19:53 UTC (permalink / raw)
  To: u-boot

Dear "Gutierrez Gomez Jesus-B16947",

please restrict the line length of your postings to some 70 characters
or so. Thanks.

In message <F433001A73130B4C92788BA2D371731D070C27CF@az33exm20.fsl.freescale.net> you wrote:
> 
> Are you 100% sure the timing setup of your board's SDRAM are okay? If you c
> opied the setup from another board (with another SDRAM chip), it might be t
> he case where you're not meeting the timing characteristics of the new SDRA
> M chip and therefore SDRAM will have problems when more transactions are de
> manded (for example, U-boot relocation, or mtest).
> 
> Please double check the timing spec of your SDRAM chip (or perhaps the whol
> e configuration) and adjust U-boot accordingly to set them up.

And note that timing is just one thing, but strictly adhering to the
required initialization sequence (including any delays, dummy reads or
writes etc.) is at least as important, if not more.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A princess should not be afraid -- not with a brave knight to protect
her.
	-- McCoy, "Shore Leave", stardate 3025.3

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

* [U-Boot] Problem with SDRAM on my board.
       [not found]     ` <4F4169B21905494EBD47A304F02192C92772357B69@XCH-HQ-01.kk.local>
@ 2009-11-24 19:55       ` Wolfgang Denk
  0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Denk @ 2009-11-24 19:55 UTC (permalink / raw)
  To: u-boot

Dear Lasse Skov,

please keep the list on Cc:

In message <4F4169B21905494EBD47A304F02192C92772357B69@XCH-HQ-01.kk.local> you wrote:
> 
> I had now fixed some settings on the DDR2 timing, found something with the ODT and other timing specific for the timing_cfg register.

Will you *please* keep your line length below some 70 charactes or so?
Thanks.

> And included some sync for the cache, but here im not quite sure on that this is correct.
> 
> I had also let my board test the all the address range for my ram from 0x0x20000000 (512MB)
> With the following code.
> 
> int testdram(void)
> {
> 	uint *pstart = (uint *) CONFIG_SYS_MEMTEST_START;
> 	uint *pend = (uint *) CONFIG_SYS_MEMTEST_END;
> 	uint *p;
> 	printf("Testing DRAM from 0x%08x to 0x%08x\n",
> 	       CONFIG_SYS_MEMTEST_START,
> 	       CONFIG_SYS_MEMTEST_END);
> 
> 	printf("DRAM test phase 1:\n");
> 	for (p = pstart; p < pend; p++)
> 		*p = (uint)p%8?0x5A5A5A5A:0xA5A5A5A5;
> 
> 	for (p = pstart; p < pend; p++) {
> 		if (*p !=  ((uint)p%8?0x5A5A5A5A:0xA5A5A5A5)) {
> 			printf("DRAM test fails at: %08x\n", (uint) p);
> 			return 1;
> 		}
> 	}
> 	printf("DRAM test phase 2:\n");
> 	for (p = pstart; p < pend; p++)
> 		*p = (uint)p%8?0xA5A5A5A5:0x5A5A5A5A;
> 	for (p = pstart; p < pend; p++) {
> 		if (*p !=  ((uint)p%8?0xA5A5A5A5:0xA5A5A5A5A)) {
> 			printf("DRAM test fails at: %08x\n", (uint) p);
> 			return 1;
> 		}
> 	}
> 	printf("DRAM test passed.\n");
> 	return 0;
> }
> 
> Just some testcode i found and modified it a little bit. But the thing is that this completes with succes.

This is a really braindead test. And like almost all memory tests it
will only exercise simple read and write accesses on the bus - it
cannot test burst mode accesses. Please see the FAQ:
http://www.denx.de/wiki/view/DULG/UBootCrashAfterRelocation

> I know that this is only running from flash and takes a lot of time to test the 512Mb.
> 
> So because this is only running from Flash, I cannot be sure on that my SDRAM configurations is correct?
> Or is this not a right conclusion?

Let's rephrase this: you can be pretty sure that your SDRAM
initialization is _not_ correct.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A mouse is an elephant built by the Japanese.

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

end of thread, other threads:[~2009-11-24 19:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-23 11:14 [U-Boot] Problem with SDRAM on my board Lasse Skov
2009-11-23 12:38 ` Detlev Zundel
2009-11-23 14:29 ` Gutierrez Gomez Jesus-B16947
2009-11-23 19:53   ` Wolfgang Denk
     [not found]     ` <4F4169B21905494EBD47A304F02192C92772357B69@XCH-HQ-01.kk.local>
2009-11-24 19:55       ` Wolfgang Denk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.