
On Wed, 2007-18-04 at 21:06 -0500, Tolunay Orkun wrote:
Shiju Mathew wrote:
I have a spansion flash (S71WS256ND0BFWEP) on my board (Freescale imx31 ADS).I use CFI driver with the below configuration. But I get the following error(debug message). Could someone help me to resolve the problem.
#define CFG_FLASH_BASE 0xa0000000 #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.
U-Boot 1.2.0 (Apr 19 2007 - 10:59:05)
U-Boot code: 87D00000 -> 87D1BDD0 BSS: -> 87D22698 CPU: Freescale i.MX31 at 398 MHz Board: i.MX31 Litekit RAM Configuration: Bank #0: 80000000 128 MB flash detect cfi fwc addr a0000000 cmd 0 0 8bit x 8 bit fwc addr a0000055 cmd 98 98 8bit x 8 bit is= cmd 51(Q) addr a0000010 is= 14 51 fwc addr a0000555 cmd 98 98 8bit x 8 bit is= cmd 51(Q) addr a0000010 is= 14 51 fwc addr a0000000 cmd 0 0000 16bit x 8 bit fwc addr a00000aa cmd 98 9898 16bit x 8 bit is= cmd 51(Q) addr a0000020 is= 0100 5151 fwc addr a0000aaa cmd 98 9898 16bit x 8 bit is= cmd 51(Q) addr a0000020 is= 0051 5151 fwc addr a0000000 cmd 0 0000 16bit x 16 bit fwc addr a00000aa cmd 98 0098 16bit x 16 bit is= cmd 51(Q) addr a0000020 is= 0100 0051 fwc addr a0000aaa cmd 98 0098 16bit x 16 bit is= cmd 51(Q) addr a0000020 is= 0051 0051 is= cmd 52(R) addr a0000022 is= 0052 0052 is= cmd 59(Y) addr a0000024 is= 0059 0059 ushort addr is at a0000050 info->portwidth = 2 addr[0] = 0x1 addr[1] = 0x0 addr[2] = 0x0 addr[3] = 0x0 retval = 0x1 device interface is 1 found port 2 chip 2 port 16 bits chip 16 bits ushort addr is at a0000026 info->portwidth = 2 addr[0] = 0x2 addr[1] = 0x0 addr[2] = 0x0 addr[3] = 0x0 retval = 0x2 fwc addr a0000000 cmd f0 00f0 16bit x 16 bit fwc addr a0000aaa cmd aa 00aa 16bit x 16 bit fwc addr a0000554 cmd 55 0055 16bit x 16 bit fwc addr a0000aaa cmd 90 0090 16bit x 16 bit fwc addr a0000000 cmd f0 00f0 16bit x 16 bit fwc addr a0000aaa cmd 98 0098 16bit x 16 bit ushort addr is at a000002a info->portwidth = 2 addr[0] = 0x40 addr[1] = 0x0 addr[2] = 0x0 addr[3] = 0x0 retval = 0x40 a0000020 : 51 00 52 00 59 00 02 00 00 00 40 00 00 00 00 00 Q.R.Y.....@..... a0000030 : 00 00 00 00 00 00 17 00 19 00 00 00 00 00 06 00 ................ a0000040 : 09 00 0a 00 00 00 04 00 04 00 03 00 00 00 19 00 ................ a0000050 : 01 00 00 00 06 00 00 00 03 00 03 00 00 00 80 00 ................ a0000060 : 00 00 fd 00 00 00 00 00 02 00 03 00 00 00 80 00 ................ a0000070 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ a0000080 : 50 00 52 00 49 00 31 00 34 00 10 00 02 00 01 00 P.R.I.1.4....... a0000090 : 00 00 08 00 f3 00 01 00 00 00 85 00 95 00 01 00 ................ manufacturer is 2 manufacturer id is 0x1 device id is 0x7e device id2 is 0x3000 cfi version is 0x3134 size_ratio 1 port 16 bits chip 16 bits found 3 erase regions long addr is at a000005a info->portwidth = 2 addr[0] = 0x3 addr[1] = 0x0 addr[2] = 0x0 addr[3] = 0x0 addr[4] = 0x80 addr[5] = 0x0 addr[6] = 0x0 addr[7] = 0x0 erase_region_count = 4 erase_region_size = 32768 long addr is at a0000062 info->portwidth = 2 addr[0] = 0xfd addr[1] = 0x0 addr[2] = 0x0 addr[3] = 0x0 addr[4] = 0x0 addr[5] = 0x0 addr[6] = 0x2 addr[7] = 0x0 erase_region_count = 254 erase_region_size = 131072 long addr is at a000006a info->portwidth = 2 addr[0] = 0x3 addr[1] = 0x0 addr[2] = 0x0 addr[3] = 0x0 addr[4] = 0x80 addr[5] = 0x0 addr[6] = 0x0 addr[7] = 0x0 erase_region_count = 4 erase_region_size = 32768 ushort addr is at a0000054 info->portwidth = 2 addr[0] = 0x6 addr[1] = 0x0 addr[2] = 0x0 addr[3] = 0x0 retval = 0x6 fwc addr a0000000 cmd f0 00f0 16bit x 16 bit flash_protect ON: from 0xA0000000 to 0xA001BDCF fwc addr a0000000 cmd 50 0050 16bit x 16 bit fwc addr a0000000 cmd 60 0060 16bit x 16 bit fwc addr a0000000 cmd 1 0001 16bit x 16 bit flash_is_busy: 0 protect on 0 fwc addr a0008000 cmd 50 0050 16bit x 16 bit fwc addr a0008000 cmd 60 0060 16bit x 16 bit fwc addr a0008000 cmd 1 0001 16bit x 16 bit flash_is_busy: 0 protect on 1 fwc addr a0010000 cmd 50 0050 16bit x 16 bit fwc addr a0010000 cmd 60 0060 16bit x 16 bit fwc addr a0010000 cmd 1 0001 16bit x 16 bit flash_is_busy: 0 protect on 2 fwc addr a0018000 cmd 50 0050 16bit x 16 bit fwc addr a0018000 cmd 60 0060 16bit x 16 bit fwc addr a0018000 cmd 1 0001 16bit x 16 bit flash_is_busy: 0 protect on 3 flash_protect ON: from 0xA01E0000 to 0xA01FFFFF fwc addr a01e0000 cmd 50 0050 16bit x 16 bit fwc addr a01e0000 cmd 60 0060 16bit x 16 bit fwc addr a01e0000 cmd 1 0001 16bit x 16 bit flash_is_busy: 0 protect on 18 Flash: 32 MB *** Warning - bad CRC, using default environment
In: serial Out: serial Err: serial ### Set environment from HW MAC addr = "FF:FF:FF:FF:FF:FF" ### main_loop entered: bootdelay=3
### 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>
Thanks, Shiju