[U-Boot-Users] A question about sdram_init

Frank Young young726 at hotmail.com
Thu May 13 20:54:30 CEST 2004


To explain the problem easier, I stripped down the sdram_init() to three DCR 
instructions:

void sdram(void) {
  /*1st*/ mtsdram0(mem_mcopt1, 0x00000000);
  /*2nd*/ mtsdram0(mem_mb0cf, 0x00008001);
  /*3rd*/ mtsdram0(mem_mcopt1, 0x80800000);
  return;
}

These three instructions is used to initialize 4MB sdram. But the phenomenon 
I had is:
1. The sdram() hanged after 2nd line, i.e. after set up 4MB. But it didn't 
go through 3rd line and didn't return.
2. If the 1st line is commented, i.e. not disable everything, sdram() could 
return.
3. Since sdram() is called from start.S, I rewrote all these code in start.S 
in assembly language and let them run in start.S (commented out "bl 
sdram_init"), these three lines can run without any problem. They didn't 
interfere each other.

So what could be a cause of this problem?

Thanks!

Frank

_________________________________________________________________
Express yourself with the new version of MSN Messenger! Download today - 
it's FREE! http://messenger.msn.com/go/onm00200471ave/direct/01/





More information about the U-Boot mailing list