[PATCH 0/6] MTD: Many fixes and preparation for SmartMedia supportin nand subsystem

From: Maxim Levitsky
Date: Fri Jan 22 2010 - 10:56:36 EST


This patch series add few fixes and changes to nand subsystem.

First patch, fixes the MTD_OOB_PLACE support in nand.
I want to use ->read_oob to read both raw oob and data and use ecc.
MTD_OOB_PLACE should do that, but due to a wrong check it will refuse to

Second patch, probably the most important patch in this series.
I changed behavier of MTD_OOB_RAW to match the one of MTD_OOB_PLACE
minus ecc validation.
This way it is easy to use both modes in same code.
This mode is only used in one place, in scan_read_raw in nand_bbt.c
I edited this function to achieve exactly same effect as was before.

Third patch is another bugfix that I need to be able to write several
pages in one go. ->write_oob should do that, but it was incorrectly
I need this and former patch to add support for 256 byte nand chips in
the smartmedia FTL very elegantly.

Fourth patch exports few functions from nand_base.c, so one can write
custom ->block_mark_bad, and ->block_is_bad functions.
I use these functions in next patch.

Fifth patch, adds small helper module for nand drivers for SmartMedia/xD
readers. It contains bad block handlers and ecc layer.

And last patch, adds some workarounds to nand core to make xD work with

It adds new ID table (which is similiar to current ID table, but
dfferent in that it has IDS for readonly SmartMedia devices, and it has
special settings for new xD cards that share ID with regular nand
devices, but unfortunely don't report proper information in READ ID
command, and have other problems.)

It also adds a workaround for broken writeprotect status.
Older smartmedia devices had a special seal for writeprotect, aka a
additional connector. This should be handled by nand driver itself.
Newer xD cards have no write protect support at all.

Best regards,
Maxim Levitsky

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/