From: Wolfgang Denk Date: Thu, 13 May 2004 21:27:37 +0200 Subject: [U-Boot-Users] A question about sdram_init In-Reply-To: Your message of "Thu, 13 May 2004 14:54:30 EDT." Message-ID: <20040513192742.76444C108D@atlas.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de In message you wrote: > To explain the problem easier, I stripped down the sdram_init() to three DCR > instructions: I guess this is on a MIPS64 system? Or ARM9? Or x86, or what? > 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. How did you know where it hangs? Did you use a debugger? > 2. If the 1st line is commented, i.e. not disable everything, sdram() could > return. How do you know your code is correct? > 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. There is no difference between C code and assembly - unless you wrote different code. 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 If you think the problem is bad now, just wait until we've solved it. Epstein's Law