[U-Boot-Users] RE: CFI conformant flash driver available

listmember at orkun.us listmember at orkun.us
Thu Jan 22 22:31:02 CET 2004


I will test your new driver with my 2x 28F128AJ3 (2 x 16 = 32bit bus). I
think I also got the older strataflash.c working on my Cogent CSB272 board
last week. However, I added a couple of lines to support what my older
driver was doing:

1) In flash_init(), I added flash_protect() calls to protect the monitor
and environment sectors (the latter if ENV_IN_FLASH is set).

2) In flash_real_protect(), I added a couple of lines at the very
beginning of the function to retrieve the current sector protection status
from the flash and avoid resetting the protection if it has not changed. I
did this because I did not want extra wear on the flash due to unnecessary
flash_protect() calls done in #1.

I am on a different computer right now but it was something like:

if (flash_isset(info, sector, FLASH_OFFSET_PROTECT, FLASH_STATUS_PROTECT)
== prot)
      return 0;

If you want I send send you the stataflash.c & the patch for you to review.

I have a question as well. The CFI driver is identifying the buffer in one
chip and using that for buffered writes. For example, for Intel
Strataflash 28F128AJ3 the buffer is 32 bytes. However, when I use 2 of
these chips side by side (interleaved) shouldn't the buffer used be x2
(i.e. 64 bytes) as well. I think we are not fully taking advantage of
total buffer available for buffered writes... For 4x8 (4 chips in 8 bit
mode each) the total buffer would be 128 bytes.

Best regards.

> It helps if I attach the patch.
> To enable the driver CFG_CFI_FLASH_DRIVER must be defined.
> Attached is a patch for the cfi flash driver.
> The driver includes support for both the Intel and the AMD
> command sets.
> The tar file contains 2 files, a patch for the existing
> sources and the cfi_flash.c which must be placed in the
> drivers directory.
> Thanks to all who are helping out. Please let me know if
> there are any problems or if things went well.
> If possible plese let me know what are the port width, chip
> width, flash chip and number of banks on successful uses of
> this driver.
> Wolfgang - please do not apply this until I get some feedback
> from those who are testing it.
> Thanks
> Brad Kemp

More information about the U-Boot mailing list