[U-Boot] Does U-boot supports Spansion S29GL512P NOR Flash?
prakash bedge
prakash.bedge at gmail.com
Tue Apr 13 08:31:59 CEST 2010
Hi All,
I did it. :)
I am now able to detect the flash. So now I can run the uboot commnads i.e
flinfo to check the flash information.
For this I make use of ST fixup code for M29W128GH in which I changed the
codition for chekcing chipwidth.
To detect the flash I used chipwidth 16 Bits and Portwidth 8 Bits.
But now I am getting the problem in erasing on flash. I gave the erase
command to erase the sector but then the sector is not getting erased and I
am getting the message as flash erased. Same is for chip erase command. See
the log below
DRAM: 2 MB
Top of RAM usable for U-Boot at: 00200000
Reserving 177k for U-Boot at: 001d3000
Reserving 1040k for malloc() at: 000cf000
Reserving 128 Bytes for Board Info at: 000cef80
Reserving 56 Bytes for Global Data at: 000cef48
Stack Pointer at: 000cef28
New Stack Pointer is: 000cef28
Now running in RAM - U-Boot at: 001d3000
FLASH: flash detect cfi
fwc addr fc000000 cmd ff ff 8bit x 8 bit
fwc addr fc000000 cmd f0 f0 8bit x 8 bit
total bank size in bytes 0
number of erase units 0
combined device & manufacturer code 65535
maximum block erase timeout 0
maximum write timeout 0
manufacturer_id 0
the width of the port 1
the width of the chip 1
fwc addr fc000055 cmd 98 98 8bit x 8 bit
is= cmd 51(Q) addr fc000010 is= ff 51
is= cmd 52(R) addr fc000011 is= ff 52
is= cmd 59(Y) addr fc000012 is= ff 59
fwc addr fc000555 cmd 98 98 8bit x 8 bit
is= cmd 51(Q) addr fc000010 is= ff 51
is= cmd 52(R) addr fc000011 is= ff 52
is= cmd 59(Y) addr fc000012 is= ff 59
fwc addr fc000000 cmd ff ff00 16bit x 8 bit
fwc addr fc000000 cmd f0 f000 16bit x 8 bit
total bank size in bytes 0
number of erase units 0
combined device & manufacturer code 65535
maximum block erase timeout 0
maximum write timeout 0
manufacturer_id 0
the width of the port 2
the width of the chip 1
*fwc addr fc0000aa cmd 98 9800 16bit x 8 bit*
is= cmd 51(Q) addr fc000020 is= 5100 5100
device interface is 2
*found port 2 chip 1 port 16 bits chip 8 bits
00 : 51 52 59 02 00 40 00 00 00 00 00 27 36 00 00 06
**QRY.. at .....'6*<QRY.. at .....'6>
*...
10 : 06 09 13 03 05 03 02 1a 02 00 06 00 01 ff 01 00 ................
20 : 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20 ...............*
fwc addr fc000000 cmd f0 f000 16bit x 8 bit
fwc addr fc001554 cmd aa aa00 16bit x 8 bit
fwc addr fc000aaa cmd 55 5500 16bit x 8 bit
fwc addr fc001554 cmd 90 9000 16bit x 8 bit
fwc addr fc000000 cmd f0 f000 16bit x 8 bit
fwc addr fc0000aa cmd 98 9800 16bit x 8 bit
manufacturer is 2
manufacturer id is 0xff
device id is 0xff
device id2 is 0x0
cfi version is 0x3133
*size_ratio 1 port 16 bits chip 8 bits
*found 1 erase regions
erase region 0: 0x020001ff
erase_region_count = 512 erase_region_size = 131072
fwc addr fc000000 cmd f0 f0 8bit x 8 bit
flash_protect ON: from 0xFFFC0000 to 0xFFFE89FF
protect on 510
protect on 511
flash_protect ON: from 0xFFFA0000 to 0xFFFBFFFF
protect on 509
*64 MB*
*** Warning - bad CRC, using default environment
In: serial
Out: serial
Err: serial
U-Boot relocated to 001d3000
Install interrupt vector 1
Install interrupt vector 0
Install interrupt vector 3
Install interrupt vector 2
### main_loop entered: bootdelay=5
### main_loop: bootcmd="bootm 0xffdc0000 0xff8c0000 0xff200000"
Hit any key to stop autoboot: 5 0
U-Boot $ flinfo
Bank # 1: CFI conformant FLASH (8 x 8) Size: 64 MB in 512 Sectors
AMD Standard command set, Manufacturer ID: 0xFF, Device ID: 0xFF
Erase timeout: 4096 ms, write timeout: 1 ms
Buffer write timeout: 3 ms, buffer size: 64 bytes
Sector Start Addresses:
FC000000 E FC020000 E FC040000 E FC060000 E FC080000
E
FC0A0000 E FC0C0000 E FC0E0000 E FC100000 E FC120000
E
FC140000 E FC160000 E FC180000 E FC1A0000 E FC1C0000
E
FC1E0000 E FC200000 E FC220000 E FC240000 E FC260000
E
FC280000 E FC2A0000 E FC2C0000 E FC2E0000 E FC300000
E
FC320000 E FC340000 E FC360000 E FC380000 E FC3A0000
E
FC3C0000 E FC3E0000 E FC400000 E FC420000 E FC440000
E
FC460000 E FC480000 E FC4A0000 E FC4C0000 E FC4E0000
E
FC500000 E FC520000 E FC540000 E FC560000 E FC580000
E
FC5A0000 E FC5C0000 E FC5E0000 E FC600000 E FC620000
E
FC640000 E FC660000 E FC680000 E FC6A0000 E FC6C0000
E
FC6E0000 E FC700000 E FC720000 E FC740000 E FC760000
E
FC780000 E FC7A0000 E FC7C0000 FC7E0000 FC800000
E
FC820000 E FC840000 E FC860000 E FC880000 E FC8A0000
E
FC8C0000 E FC8E0000 E FC900000 E FC920000 E FC940000
E
FC960000 E FC980000 E FC9A0000 E FC9C0000 E FC9E0000
E
FCA00000 E FCA20000 E FCA40000 E FCA60000 E FCA80000
E
FCAA0000 E FCAC0000 E FCAE0000 E FCB00000 E FCB20000
E
FCB40000 E FCB60000 E FCB80000 E FCBA0000 E FCBC0000
E
FCBE0000 E FCC00000 E FCC20000 E FCC40000 E FCC60000
E
FCC80000 E FCCA0000 E FCCC0000 E FCCE0000 E FCD00000
E
FCD20000 E FCD40000 E FCD60000 E FCD80000 E FCDA0000
E
FCDC0000 E FCDE0000 E FCE00000 E FCE20000 E FCE40000
E
FCE60000 E FCE80000 E FCEA0000 E FCEC0000 E FCEE0000
E
FCF00000 E FCF20000 E FCF40000 E FCF60000 E FCF80000
E
FCFA0000 E FCFC0000 FCFE0000 FD000000 E FD020000
E
FD040000 E FD060000 E FD080000 E FD0A0000 E FD0C0000
E
FD0E0000 E FD100000 E FD120000 E FD140000 E FD160000
E
FD180000 E FD1A0000 E FD1C0000 E FD1E0000 E FD200000
E
FD220000 E FD240000 E FD260000 E FD280000 E FD2A0000
E
FD2C0000 E FD2E0000 E FD300000 E FD320000 E FD340000
E
FD360000 E FD380000 E FD3A0000 E FD3C0000 E FD3E0000
E
FD400000 E FD420000 E FD440000 E FD460000 E FD480000
E
FD4A0000 E FD4C0000 E FD4E0000 E FD500000 E FD520000
E
FD540000 E FD560000 E FD580000 E FD5A0000 E FD5C0000
E
FD5E0000 E FD600000 E FD620000 E FD640000 E FD660000
E
FD680000 E FD6A0000 E FD6C0000 E FD6E0000 E FD700000
E
FD720000 E FD740000 E FD760000 E FD780000 E FD7A0000
E
FD7C0000 FD7E0000 FD800000 E FD820000 E FD840000
E
FD860000 E FD880000 E FD8A0000 E FD8C0000 E FD8E0000
E
FD900000 E FD920000 E FD940000 E FD960000 E FD980000
E
FD9A0000 E FD9C0000 E FD9E0000 E FDA00000 E FDA20000
E
FDA40000 E FDA60000 E FDA80000 E FDAA0000 E FDAC0000
E
FDAE0000 E FDB00000 E FDB20000 E FDB40000 E FDB60000
E
FDB80000 E FDBA0000 E FDBC0000 E FDBE0000 E FDC00000
E
FDC20000 E FDC40000 E FDC60000 E FDC80000 E FDCA0000
E
FDCC0000 E FDCE0000 E FDD00000 E FDD20000 E FDD40000
E
FDD60000 E FDD80000 E FDDA0000 E FDDC0000 E FDDE0000
E
FDE00000 E FDE20000 E FDE40000 E FDE60000 E FDE80000
E
FDEA0000 E FDEC0000 E FDEE0000 E FDF00000 E FDF20000
E
FDF40000 E FDF60000 E FDF80000 E FDFA0000 E
FDFC0000
FDFE0000 FE000000 E FE020000 E FE040000 E FE060000
E
FE080000 E FE0A0000 E FE0C0000 E FE0E0000 E FE100000
E
FE120000 E FE140000 E FE160000 E FE180000 E FE1A0000
E
FE1C0000 E FE1E0000 E FE200000 E FE220000 E FE240000
E
FE260000 E FE280000 E FE2A0000 E FE2C0000 E FE2E0000
E
FE300000 E FE320000 E FE340000 E FE360000 E FE380000
E
FE3A0000 E FE3C0000 E FE3E0000 E FE400000 E FE420000
E
FE440000 E FE460000 E FE480000 E FE4A0000 E FE4C0000
E
FE4E0000 E FE500000 E FE520000 E FE540000 E FE560000
E
FE580000 E FE5A0000 E FE5C0000 E FE5E0000 E FE600000
E
FE620000 E FE640000 E FE660000 E FE680000 E FE6A0000
E
FE6C0000 E FE6E0000 E FE700000 E FE720000 E FE740000
E
FE760000 E FE780000 E FE7A0000 E FE7C0000
FE7E0000
FE800000 E FE820000 E FE840000 E FE860000 E FE880000
E
FE8A0000 E FE8C0000 E FE8E0000 E FE900000 E FE920000
E
FE940000 E FE960000 E FE980000 E FE9A0000 E FE9C0000
E
FE9E0000 E FEA00000 E FEA20000 E FEA40000 E FEA60000
E
FEA80000 E FEAA0000 E FEAC0000 E FEAE0000 E FEB00000
E
FEB20000 E FEB40000 E FEB60000 E FEB80000 E FEBA0000
E
FEBC0000 E FEBE0000 E FEC00000 E FEC20000 E FEC40000
E
FEC60000 E FEC80000 E FECA0000 E FECC0000 E FECE0000
E
FED00000 E FED20000 E FED40000 E FED60000 E FED80000
E
FEDA0000 E FEDC0000 E FEDE0000 E FEE00000 E FEE20000
E
FEE40000 E FEE60000 E FEE80000 E FEEA0000 E FEEC0000
E
FEEE0000 E FEF00000 E FEF20000 E FEF40000 E FEF60000
E
FEF80000 E FEFA0000 E FEFC0000 FEFE0000 FF000000
E
FF020000 E FF040000 E FF060000 E FF080000 E FF0A0000
E
FF0C0000 E FF0E0000 E FF100000 E FF120000 E FF140000
E
FF160000 E FF180000 E FF1A0000 E FF1C0000 E FF1E0000
E
FF200000 E FF220000 E FF240000 E FF260000 E FF280000
E
FF2A0000 E FF2C0000 E FF2E0000 E FF300000 E FF320000
E
FF340000 E FF360000 E FF380000 E FF3A0000 E FF3C0000
E
FF3E0000 E FF400000 E FF420000 E FF440000 E FF460000
E
FF480000 E FF4A0000 E FF4C0000 E FF4E0000 E FF500000
E
FF520000 E FF540000 E FF560000 E FF580000 E FF5A0000
E
FF5C0000 E FF5E0000 E FF600000 E FF620000 E FF640000
E
FF660000 E FF680000 E FF6A0000 E FF6C0000 E FF6E0000
E
FF700000 E FF720000 E FF740000 E FF760000 E FF780000
E
FF7A0000 E FF7C0000 FF7E0000 FF800000 E FF820000
E
FF840000 E FF860000 E FF880000 E FF8A0000 E FF8C0000
E
FF8E0000 E FF900000 E FF920000 E FF940000 E FF960000
E
FF980000 E FF9A0000 E FF9C0000 E FF9E0000 E FFA00000
E
FFA20000 E FFA40000 E FFA60000 E FFA80000 E FFAA0000
E
FFAC0000 E FFAE0000 E FFB00000 E FFB20000 E FFB40000
E
FFB60000 E FFB80000 E FFBA0000 E FFBC0000 E FFBE0000
E
FFC00000 E FFC20000 E FFC40000 E FFC60000 E FFC80000
E
FFCA0000 E FFCC0000 E FFCE0000 E FFD00000 E FFD20000
E
FFD40000 E FFD60000 E FFD80000 E FFDA0000 E FFDC0000
E
FFDE0000 E FFE00000 E FFE20000 E FFE40000 E FFE60000
E
FFE80000 E FFEA0000 E FFEC0000 E FFEE0000 E FFF00000
E
FFF20000 E FFF40000 E FFF60000 E FFF80000 E FFFA0000 E
RO
FFFC0000 RO FFFE0000 RO
U-Boot $ *saveenv*
Saving Environment to Flash...
copy old content: sect_addr: FFFA0000 env_addr: FFFA0000 offset: 00000000
Protect off FFFA0000 ... FFFBFFFF
Un-Protecting sectors 509..509 in bank 1
Un-Protected 1 sectors
*Erasing Flash...Erase Flash from 0xfffa0000 to 0xfffbffff in Bank # 1*
fwc addr fffa0aaa cmd aa aa 8bit x 8 bit
fwc addr fffa0555 cmd 55 55 8bit x 8 bit
fwc addr fffa0aaa cmd 80 80 8bit x 8 bit
fwc addr fffa0aaa cmd aa aa 8bit x 8 bit
fwc addr fffa0555 cmd 55 55 8bit x 8 bit
fwc addr fffa0000 cmd 30 30 8bit x 8 bit
*flash_is_busy: 0
. done*
*Erased 1 sectors
Writing to Flash... Flash not Erased*
Protecting sectors 509..509 in bank 1
Protected 1 sectors
U-Boot $
Also, even by using BDI 3000 Debugger, I am not able to erase the flash by
giving the proper CFI erase command.
mmb 0xfc000000 0xf0
mmb 0xfc000aaa 0xaa
mmb 0xfc000555 0x55
mmb 0xfc000aaa 0x80
mmb 0xfc000aaa 0xaa
mmb 0xfc000555 0x55
mmb 0xff7c0000 0x30
But the data is still present.
What may be the reason that flash in not getting erased using U-boot as well
as BDI debugger?
Thanks & Regards,
Prakash
On Mon, Apr 12, 2010 at 10:45 PM, Frank Svendsbøe <frank.svendsboe at gmail.com
> wrote:
> > ## Unknown FLASH on Bank 1 - Size = 0x00000000 = 0 MB
> > flash_protect ON: from 0xFFFC0000 to 0xFFFE81FF
> > flash_protect ON: from 0xFFFA0000 to 0xFFFBFFFF
> > *** failed ***
> > ### ERROR ### Please RESET the board ###
> >
>
> This is just a wild guess. Check that your memory controller setup is
> correct. Since you've changed your flash size, you might have a
> corrupt memory controller setup. On our Freescale system, we initially
> had problems when increasing flash size due to where we've decided to
> put the internal space base / memory map (ISB/IMM). When changing the
> size, we had to move the IMM to a lower address (.ie at least a sector
> below 0xfc000000).
>
> Best regards,
> Frank
>
More information about the U-Boot
mailing list