[U-Boot-Users] [PATCH 0/3] More cfi_flash refactoring

Haavard Skinnemoen hskinnemoen at atmel.com
Fri Dec 14 15:36:15 CET 2007

The following three patches should be applied on top of the previous
cfi_flash cleanup patches. With these in place, I can access the
on-board flash on the ATNGW100 using the CFI driver, eliminating the
final reason why I haven't submitted the NGW100 board patches for
inclusion in mainline.

I've tested it by programming a 7MB JFFS2 image into the on-board
AT49BV642D flash. It went almost successfully -- I got two erase
timeouts and one programming timeout. On the second try, it worked
with no problems.

It looks like I have a bug in my timing code, since "sleep 10"
terminates early from time to time as well. So I feel pretty confident
that the CFI driver is doing its job properly -- the timeouts are
simply triggered too early every now and then.

The last patch in the series changes behaviour, so it probably needs
more extensive testing than the others. But this patch is essential
for the AT49BV642D to work -- without it, the geometry reversal fixup
is incorrectly triggered, and the erase regions become wrong.

I think the new behaviour makes more sense, especially since the code
uses the device_id to determine whether or not to apply the fixup;
it's IMO wrong to depend on the device_id without also checking the

Haavard Skinnemoen (3):
      cfi_flash: Read whole QRY structure in one go
      cfi_flash: Add cmdset-specific init functions
      cfi_flash: Add manufacturer-specific fixups

 drivers/mtd/cfi_flash.c |  377 +++++++++++++++++++++++++++++------------------
 1 files changed, 234 insertions(+), 143 deletions(-)

More information about the U-Boot mailing list