From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerry Van Baren Date: Thu, 22 Mar 2007 17:25:59 -0400 Subject: [U-Boot-Users] Flash vs DataFlash vs NAND Flash In-Reply-To: <131AF8573CF31945B5B11E4201D3F1E142BB86@mail3.Avidyne.com> References: <131AF8573CF31945B5B11E4201D3F1E142BB86@mail3.Avidyne.com> Message-ID: <4602F467.40507@smiths-aerospace.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Matt Gessner wrote: > Hi, all, > > On my AT91RM9200 board, I have an Atmel DataFlash for booting off my > SPI, and I have a NAND flash. > > I do not, however, have any other kind of flash. > > My 128K DataFlash address is 0xc0000000, and my 128MB of RAM is at > 0x20000000. > > When I do > > cp.b 20200000 c0000000 2c60 > > Copy to DataFlash... done > > it works just fine. > > When I do > > cp.b c0000000 20200000 2c60 > > the system crashes with a data abort, but before the crash, it reports > > Copy to Flash... > > Well, I'm quite confused how to set the various flash flags to make all > this work. > > If I try to set CFG_NO_FLASH, the system won't compile. > > But there is no "conventional" flash on the board... just the nand > (8-bit port) and dataflash (spi). > > Would someone kindly point me to a reference that explains how I can set > up u-boot 1.2.0 to make this work? Or just come straight out and tell > me? > > Thanks in advance, > > Regards, > > Matt Gessner From the last message before the crash, it looks like you have non-existent "flash" configured in the memory space where your RAM resides, so the second cp.b tries to do the NOR flash "song & dance" to "unlock" it. Of course, this writes trash into your SDRAM which crashes your program. 1) Find where NOR flash in configured for your board/cpu/system and fix it. 2) Figure out why CFG_NO_FLASH causes your compile to break. You apparently have an inadvertent dependency, or NAND flash requires it (I don't have any experience with NAND flash or ARM(r) processors) Fixing #1 may fix #2. Finding #2 may point to where #1 is broken. HTH, gvb