[PATCH] fix root cause of NAND trouble

Werner Almesberger werner at openmoko.org
Sat Nov 1 16:54:53 CET 2008


Andy Green wrote:
> It seems its moot since the patch is not accepted as the solution...

Not so hasty :-) Ben thought this was something else entirely.
Let's see if he likes it better now that I've explained what's
really going on.

> you have some time to dig further into it to see where the unaligned
> reads are suddenly coming from?

They're coming from nand_read_subpage and are just what the code
there intends to do. There are (at least) three ways to fix this:

1) declare non-word accesses generally illegal, which means that
   nand_read_subpage needs to change

2) make the driver support non-word accesses. This is what my
   patch does.

3) add some means for the driver to inform the NAND layer that it
   has special alignment constraints.

1) and 2) would be straightforward to do. 3) would make an
already hard to understand interface a little more complex.

- Werner



More information about the openmoko-kernel mailing list