[U-Boot] Problems erasing (and writing) to flash
ffileppo at alice.it
ffileppo at alice.it
Thu Oct 23 12:05:06 CEST 2008
Hi guys,
I'm facing problems when I try to erase flash memory on my embedded board (it's a custom Mainstone board, based on PXA270 ).
I'm using u-boot 1.1.4 (since it is the only version with patch for Mainstone),
"Protect off" seems to work ok:
> protect off 1:7
> Un-Protect Flash Sector 7-7 in Bank # 1 (now I see that sector 7 is no longer RO)
But when I try to erase that sector:
> erase 1:7
> Erase Flash Sectors 7-7 in Bank # 1
> fwc addr 00080000 cmd 50 0050 16bit x 16 bit
> fwc addr 00080000 cmd 20 0020 16bit x 16 bit
> fwc addr 00080000 cmd d0 00d0 16bit x 16 bit
> flash_is_busy: 0
>fwc addr 00080000 cmd ff 00ff 16bit x 16 bit
>. done
But the sector is not erased (I check with md)
Anyone know what could be the problem here?
I'll post more logs if needed
NOTE (Flash memoy is not bro, I'm able to erase and write it using JTAG and/or linux mtd tools)
Thank you,
Francesco
Flinfo output:
Bank # 1: CFI conformant FLASH (16 x 16) Size: 32 MB in 259 Sectors
Erase timeout 4096 ms, write timeout 0 ms, buffer write timeout 1024 ms, buffer
size 64
Sector Start Addresses:
00000000 (RO) 00008000 (RO) 00010000 (RO) 00018000 (RO) 00020000 (RO)
............................................................................
Bank # 2: CFI conformant FLASH (16 x 16) Size: 32 MB in 259 Sectors
Erase timeout 4096 ms, write timeout 0 ms, buffer write timeout 1024 ms, buffer
size 64
Sector Start Addresses:
00000000 (RO) 00008000 (RO) 00010000 (RO) 00018000 (RO) 00020000 (RO)
............................................................................
Here is the debug info from startup:
U-Boot 1.1.4 (Aug 1 2008 - 09:51:21)
U-Boot code: A3080000 -> A30B6CA4 BSS: -> A30BBBB8
RAM Configuration:
Bank #0: a0000000 128 MB
flash detect cfi
fwc addr 00000000 cmd 0 0 8bit x 8 bit
fwc addr 00000055 cmd 98 98 8bit x 8 bit
is= cmd 51(Q) addr 00000010 is= 14 51
fwc addr 00000000 cmd 0 0000 16bit x 8 bit
fwc addr 000000aa cmd 98 9898 16bit x 8 bit
is= cmd 51(Q) addr 00000020 is= 0051 5151
fwc addr 00000000 cmd 0 0000 16bit x 16 bit
fwc addr 000000aa cmd 98 0098 16bit x 16 bit
is= cmd 51(Q) addr 00000020 is= 0051 0051
is= cmd 52(R) addr 00000022 is= 0052 0052
is= cmd 59(Y) addr 00000024 is= 0059 0059
retval = 0x1
device interface is 1
found port 2 chip 2 port 16 bits chip 16 bits
retval = 0x1
manufacturer is 1
size_ratio 1 port 16 bits chip 16 bits
found 2 erase regions
erase_region_count = 4 erase_region_size = 32768
erase_region_count = 255 erase_region_size = 131072
retval = 0x6
fwc addr 00000000 cmd ff 00ff 16bit x 16 bit
flash detect cfi
fwc addr 00000000 cmd 0 0 8bit x 8 bit
fwc addr 00000055 cmd 98 98 8bit x 8 bit
is= cmd 51(Q) addr 00000010 is= 14 51
fwc addr 00000000 cmd 0 0000 16bit x 8 bit
fwc addr 000000aa cmd 98 9898 16bit x 8 bit
is= cmd 51(Q) addr 00000020 is= 0051 5151
fwc addr 00000000 cmd 0 0000 16bit x 16 bit
fwc addr 000000aa cmd 98 0098 16bit x 16 bit
is= cmd 51(Q) addr 00000020 is= 0051 0051
is= cmd 52(R) addr 00000022 is= 0052 0052
is= cmd 59(Y) addr 00000024 is= 0059 0059
retval = 0x1
device interface is 1
found port 2 chip 2 port 16 bits chip 16 bits
retval = 0x1
manufacturer is 1
size_ratio 1 port 16 bits chip 16 bits
found 2 erase regions
erase_region_count = 4 erase_region_size = 32768
erase_region_count = 255 erase_region_size = 131072
retval = 0x6
fwc addr 00000000 cmd ff 00ff 16bit x 16 bit
Flash: 64 MB
In: serial
Out: serial
Err: serial
### main_loop entered: bootdelay=1
More information about the U-Boot
mailing list