On 12/08/2011 04:44 AM, LiuShuo wrote:
=E4=BA=8E 2011=E5=B9=B412=E6=9C=8808=E6=97=A5 03:11, Scott Wood =E5=86=99=
=E9=81=93:
quoted
And if we do want to make such assumptions, we could rip out all usage
of index/column here, and just handle "oob" and "full page" cases.
The function nand_do_write_ops() in nandbase.c is a Nand internal
interface.
It always is called when application write to nand flash. (e.g. dd)
In this function, partial page write is dealt with by filling '0xff' to
buffer before data copy.
(nand_do_write_oob() is similar)
So I don't think we need to do it in our controller driver again, it
should be a job of upper layer.
If this is to be considered part of the interface contract, then perhaps
do a WARN_ON() if we see an unexpected index/column? And after that,
only consider full-page or full-oob possibilities.
-Scott