JFFS2 on NOR flash with ECC

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

JFFS2 on NOR flash with ECC

Max Seidenstücker-2
Hi folks,

we are using a µC that has ECC calculation on an 8 Byte boundary in
its NOR flash storage. After taking a glance at the JFFS2 eCos port
and the most recent Linux version I am a little lost on how to get the
fastest solution to solve this.

The problem with ECC'd NOR is that the obsolete-flag cannot be
written. ECC is calculated after the initial write, so even this one
bit flip results in an ECC error.

Unfortunately the eCos port of JFFS2 doesn't support NAND flash and
Linux MTD, where the NOR ECC patches
(http://mhonarc.axis.se/jffs-dev/msg01398.html) would be easily ported
to.

So I see two possible approaches:
1. Add JFFS2 NAND support to eCos by updating JFFS2 to the newest
version, which also incorporates adaption of the Linux MTD stuff
2. Increment the obsolete marker to 8 Byte and align it on an 8 Byte
boundary so a obsolete marker will write to a formerly unwritten 8
Byte sector and make sure the flash writes are 8 Byte aligned.

I would like to go with the second approach as it looks faster, but
don't know if this easy to achieve.

Any ideas or help on how to do that, is highly appreciated.

Cheers Max

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss