From: Ben Warren Date: Thu, 05 Oct 2006 17:50:46 -0400 Subject: [U-Boot-Users] Can I write to flash using mw command In-Reply-To: <20061005210314.40270.qmail@web33206.mail.mud.yahoo.com> References: <20061005210314.40270.qmail@web33206.mail.mud.yahoo.com> Message-ID: <1160085046.5553.35.camel@saruman.qstreams.net> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, 2006-10-05 at 14:03 -0700, bilahari akkiraju wrote: > Hi Ben, > > Stuff works fine using U-boot's cfi. I can protect > and erase using appropriate commands (protect and > erase ) provided by the u-boot. I do not know if > there is a u-boot command to write to flash. > > My flinfo command shows this : > > bank # 1: CFI conformant FLASH (32 x 16) Size: 16 MB > in 128 Sectors > Erase timeout 16384 ms, write timeout 0 ms, buffer > write timeout 4096 ms, buffe2 > Sector Start Addresses: > > FF000000 FF020000 FF040000 FF060000 > FF080000 > FF0A0000 FF0C0000 FF0E0000 FF100000 > FF120000 This is odd. The GL064 is either 32x8 or 16x16, and has either 128x64kB or 127x64kB + 8x8kB sector layout. Yours appears to have 128 uniform sectors of 128kB each. Either you're not using the part you think you are or my documentation is out of date. > I am trying low level access because I am writing my > own flash utilities which are independent of U-boot > and hence have to directly deal with right command > sequences. > If your utilities are independent of U-boot then your request is off-topic. Since the CFI driver is working, you're missing something in the sequence of commands being written to flash. I've done it before manually via BDI-2000, and although the Spansion documentation is cryptic, it's technically correct. Sorry I can't help more right now but work beckons... Also, please copy the U-boot mailing list when corresponding. regards, Ben