[U-Boot-Users] Erase error on dual P30 (CFI) flash chips

Hi all,
I'm trying to get flash programming to work in the u-boot monitor on our custom boards. Reading the flash (i.e, booting :-) works, and once in Linux the flash can be programmed too using mtd-tools.
But when I try to erase in u-boot, I get erase errors:
Flash erase error at address ffd80000 Block Erase Error.
(a more detailed log is included below).
I use U-Boot 1.2.0 and the standard CFI driver with buffered writes.
This is what flinfo and Linux MTD report:
Bank # 1: CFI conformant FLASH (32 x 16) Size: 64 MB in 259 Sectors Intel Extended command set, Manufacturer ID: 0x89, Device ID: 0x19 Erase timeout: 4096 ms, write timeout: 1 ms Buffer write timeout: 2 ms, buffer size: 64 bytes
physmap platform flash device: 04000000 at fc000000 physmap-flash.0: Found 2 x16 devices at 0x0 in 32-bit bank
[We use two Intel P30 StrataFlash chips of 256Mbit in parallel (2 x16-bit words make a 32-bit bank), for a total of 64 MB].
All reported parameters look OK to me (port width, chip width, size, #sectors, ...)
I've noticed that for these 28F256P30 flash chips, there has been a patch in the past which corrected the manufacturer, but that doesn't seem relevant for the CFI driver. (http://permalink.gmane.org/gmane.comp.boot-loaders.u-boot/28709)
FYI, I checked the value of flash_info_t->interface, and it's detected as FLASH_CFI_X16.
Is there something specific that I need to configure? All I'm using right now is CFG_FLASH_CFI CFG_FLASH_CFI_DRIVER CFG_FLASH_USER_BUFFER_WRITE CFG_FLASH_EMPTY_INFO
(Disabling buffered write does not solve the issue.)
Please let me know if you have any suggestions.
regards Floris
----
Here are the longer logs:
=> flinfo
Bank # 1: CFI conformant FLASH (32 x 16) Size: 64 MB in 259 Sectors Intel Extended command set, Manufacturer ID: 0x89, Device ID: 0x19 Erase timeout: 4096 ms, write timeout: 1 ms Buffer write timeout: 2 ms, buffer size: 64 bytes
Sector Start Addresses: FC000000 RO FC040000 RO FC080000 RO FC0C0000 RO FC100000 RO (...) FFD40000 RO FFD80000 RO FFDC0000 RO FFE00000 RO FFE40000 E RO FFE80000 E RO FFEC0000 E RO FFF00000 RO FFF40000 E RO FFF80000 E RO FFFC0000 E RO FFFD0000 E RO FFFE0000 E RO FFFF0000 RO
=> protect off ffd80000 ffdbffff
Un-Protected 1 sectors
=> erase ffd80000 ffdbffff
Flash erase error at address ffd80000 Block Erase Error. Block locked. done Erased 1 sectors
=> protect on ffd80000 ffdbffff
Protected 1 sectors
=> flinfo
Bank # 1: CFI conformant FLASH (32 x 16) Size: 64 MB in 259 Sectors Intel Extended command set, Manufacturer ID: 0x89, Device ID: 0x19 Erase timeout: 4096 ms, write timeout: 1 ms Buffer write timeout: 2 ms, buffer size: 64 bytes
Sector Start Addresses: (...) FFD40000 RO FFD80000 RO FFDC0000 RO FFE00000 RO FFE40000 E RO (...)
physmap platform flash device: 04000000 at fc000000 physmap-flash.0: Found 2 x16 devices at 0x0 in 32-bit bank Intel/Sharp Extended Query Table at 0x010A Intel/Sharp Extended Query Table at 0x010A Intel/Sharp Extended Query Table at 0x010A Intel/Sharp Extended Query Table at 0x010A Intel/Sharp Extended Query Table at 0x010A Using buffer write method cfi_cmdset_0001: Erase suspend on write enabled

On Friday 15 June 2007, w.wegner@astro-kom.de wrote:
Flash erase error at address ffd80000 Block Erase Error. Block locked. done Erased 1 sectors
if I am not mistaken, you have to also set:
#define CFG_FLASH_PROTECTION 1
And you will have to set the environment variable "unlock" to "yes". This will unlock all non U-Boot special sectors by default upon powerup.
=> setenv unlock yes => saveenv
Best regards, Stefan
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office@denx.de =====================================================================

Stefan Roese wrote:
On Friday 15 June 2007, w.wegner@astro-kom.de wrote:
Flash erase error at address ffd80000 Block Erase Error. Block locked. done Erased 1 sectors
if I am not mistaken, you have to also set:
#define CFG_FLASH_PROTECTION 1
And you will have to set the environment variable "unlock" to "yes". This will unlock all non U-Boot special sectors by default upon powerup.
=> setenv unlock yes => saveenv
Alternative to setting "unlock" environment variable you will need to issue "protect off" for any locked sector that should be unlocked. This may be handy if you have other stuff on the flash which you would like to keep protected. One way to do this is via a u-boot script that is executed as part of boot. I think Intel chips (used to) preserve their last lock status and recent Spansion chips start all locked upon boot so you might not need unlock environment variable for your Intel part as well once you have the proper sectors unlocked (for example jffs2 areas)
Tolunay
participants (4)
-
Floris Lambrechts
-
Stefan Roese
-
Tolunay Orkun
-
w.wegner@astro-kom.de