[PATCH] powerpc/shared/flash/flash.c: Erase required only if changing 0 to 1

Nick Withers nick.withers at anu.edu.au
Fri Jan 17 01:50:29 UTC 2014

Hi all,

The attached patch makes a (n admittedly not very pretty, but minimal)
change to powerpc/shared/flash/flash.c so that it won't try to erase a
flash segment just because the existing contents aren't all-1s. Now, so
long as no bits would have to be changed from a 0 to a 1 an erase is not
necessarily required.

With this change I've been able to use the spansionFlash driver to bring
up a JFFS2 file-system, reading and writing files, which failed without.
Nick Withers

Embedded Systems Programmer
Department of Nuclear Physics, Research School of Physics and Engineering
The Australian National University (CRICOS: 00120C)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: flash.c.patch
Type: text/x-patch
Size: 2016 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/devel/attachments/20140117/78461978/attachment.bin>

More information about the devel mailing list