public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] Erase error on dual P30 (CFI) flash chips
@ 2007-06-15 11:55 Floris Lambrechts
  2007-06-15 12:01 ` w.wegner at astro-kom.de
  0 siblings, 1 reply; 4+ messages in thread
From: Floris Lambrechts @ 2007-06-15 11:55 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot-Users] Erase error on dual P30 (CFI) flash chips
  2007-06-15 11:55 [U-Boot-Users] Erase error on dual P30 (CFI) flash chips Floris Lambrechts
@ 2007-06-15 12:01 ` w.wegner at astro-kom.de
  2007-06-15 13:48   ` Stefan Roese
  0 siblings, 1 reply; 4+ messages in thread
From: w.wegner at astro-kom.de @ 2007-06-15 12:01 UTC (permalink / raw)
  To: u-boot

Hi Floris,

> 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

At least this was what I had to do (using the same flash on a MCF5373L).

HTH,
Wolfgang

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot-Users] Erase error on dual P30 (CFI) flash chips
  2007-06-15 12:01 ` w.wegner at astro-kom.de
@ 2007-06-15 13:48   ` Stefan Roese
  2007-06-15 14:15     ` Tolunay Orkun
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Roese @ 2007-06-15 13:48 UTC (permalink / raw)
  To: u-boot

On Friday 15 June 2007, w.wegner at 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 at denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot-Users] Erase error on dual P30 (CFI) flash chips
  2007-06-15 13:48   ` Stefan Roese
@ 2007-06-15 14:15     ` Tolunay Orkun
  0 siblings, 0 replies; 4+ messages in thread
From: Tolunay Orkun @ 2007-06-15 14:15 UTC (permalink / raw)
  To: u-boot

Stefan Roese wrote:
> On Friday 15 June 2007, w.wegner at 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-06-15 14:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-15 11:55 [U-Boot-Users] Erase error on dual P30 (CFI) flash chips Floris Lambrechts
2007-06-15 12:01 ` w.wegner at astro-kom.de
2007-06-15 13:48   ` Stefan Roese
2007-06-15 14:15     ` Tolunay Orkun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox