From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shiju Date: Thu, 19 Apr 2007 12:51:36 -0400 Subject: [U-Boot-Users] Spansion flash not detected by CFI driver In-Reply-To: <1176997602.23147.13.camel@localhost> References: <4626CE9C.4000709@orkun.us> <1176997602.23147.13.camel@localhost> Message-ID: <1177001496.23147.23.camel@localhost> 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, 2007-19-04 at 11:46 -0400, Shiju wrote: > > > #define CFG_MAX_FLASH_BANKS 1 > > > #define CFG_MAX_FLASH_SECT 128 > > This is not correct for your chip. You should have this set not less > > than the total number of ease units (blocks) on your chip. > > > > For what I could find on the net this chip seems to have the following > > interesting geometry: > > > > 4 x 32kB > > 254 x 128kB > > 4 x 32kB > > > > So, the total should be at least 4 + 254 + 4 = 262 > > > > Please fix this and provide the logs again... > Thanks Tolunay, > I could fix the flash detection after changing the total no: of sector > to 262. But the flash unprotect sector always times out.The first 4 > sectors are protected when uboot comes up. I am not able to update uboot > from within uboot since unprotect sectors always fails on these(all) > sector. Should I need to change any timeout values.The log is as below. > > ### main_loop: bootcmd="run bootcmd_net" > Hit any key to stop autoboot: 0 > uboot> > uboot> protect off a0000000 +100000 > Flash unprotect timeout at address a0000000 data c68686c6 > .Flash unprotect timeout at address a0008000 data c68686c6 > .Flash unprotect timeout at address a0010000 data c68686c6 > .Flash unprotect timeout at address a0018000 data c68686c6 > .Flash unprotect timeout at address a0020000 data c68686c6 > .Flash unprotect timeout at address a0040000 data c68686c6 > .Flash unprotect timeout at address a0060000 data c68686c6 > .Flash unprotect timeout at address a0080000 data c68686c6 > .Flash unprotect timeout at address a00a0000 data c68686c6 > .Flash unprotect timeout at address a00c0000 data c68686c6 > .Flash unprotect timeout at address a00e0000 data c68686c6 > . done > Un-Protected 11 sectors > uboot> I have another update. THe protect/unprotect failure was happening only when I was using h/w protect enable. I disabled h/w protect to see whether everything else goes well. But timeout happens on write as well. Below is the log message. uboot> cp.b 0x80000000 0xa0000000 $(filesize) Copy to Flash... Flash buffer write timeout at address a0000000 data c68686c6 Timeout writing to Flash uboot> Thanks, Shiju