Hi, This series is the first step towards reliable MLC/TLC NAND support. Those patches allows the NAND layer to expose page pairing information to MTD users. The plan is to teach UBI about those constraints and let UBI code take the appropriate precautions when dealing with those multi-level cells NANDs. The way we'll handle this "paired pages" constraint will be described soon in a series adapting the UBI layer, so stay tune ;).
Note that this implementation only allows page pairing scheme description when the NAND has a full-id entry in the nand_ids table. This should be addressed in some way for ONFI and JEDEC NANDs, though I'm not sure how to handle this yet. Brian, I tried document a bit more the structures and helpers added in the first patch, but I'm not sure my descriptions are understandable. Georges, I took most of your suggestions into account, except for the struct mtd_pairing_info to unsigned int migration. I'm really unsure we need this level of optimization right now, and that's still something we'll be able to change afterwards (I don't expect to see a lot of users for this API). Best Regards, Boris Changes since v1: - document the paring scheme concepts and the associate structures and helpers - rework the dist3 and dist6 implementation according to George comments - introduce the mtd_set_pairing_scheme() helper to avoid directly manipulating the mtd->pairing field - drop the patch assigning dist6 pairing scheme to the H27UCG8T2ATR NAND (in the light of George comment I'm not longer sure this scheme is suitable for this NAND, and I can't test it) Boris Brezillon (3): mtd: introduce the mtd_pairing_scheme concept mtd: nand: implement two pairing scheme mtd: nand: add a pairing field to nand_flash_dev drivers/mtd/mtdcore.c | 94 ++++++++++++++++++++++++++++++++++++++ drivers/mtd/mtdpart.c | 1 + drivers/mtd/nand/nand_base.c | 98 +++++++++++++++++++++++++++++++++++++++ include/linux/mtd/mtd.h | 106 +++++++++++++++++++++++++++++++++++++++++++ include/linux/mtd/nand.h | 5 ++ 5 files changed, 304 insertions(+) -- 2.7.4

