aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoris BREZILLON <boris.brezillon@free-electrons.com>2014-10-20 04:46:14 -0400
committerBrian Norris <computersforpeace@gmail.com>2014-11-20 03:02:46 -0500
commit62d956dc3e11138c5ffd4b2c62e4f909c5180a12 (patch)
treed122faefaed35017d623325e4ffc52321ef2705c
parentafc0ea1b8e1e27b2cb77e7023d917f3aa5971d17 (diff)
mtd: nand: provide detailed description for raw read/write page methods
read_page_raw and write_page_raw method description is not clear enough. It clearly specifies that ECC correction should not be involved but does not talk about specific layout (by layout I mean where in-band and out-of-band data are stored on the NAND media) used by NAND/ECC controllers. Those specific layouts might impact MTD users and thus should be hidden (as already done in the standard NAND_ECC_HW_SYNDROME implementation). Clearly state this constraint in the nand_ecc_ctrl struct documentation. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
-rw-r--r--include/linux/mtd/nand.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index e4d451e4600b..b14d190b593a 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -455,8 +455,21 @@ struct nand_hw_control {
455 * be provided if an hardware ECC is available 455 * be provided if an hardware ECC is available
456 * @calculate: function for ECC calculation or readback from ECC hardware 456 * @calculate: function for ECC calculation or readback from ECC hardware
457 * @correct: function for ECC correction, matching to ECC generator (sw/hw) 457 * @correct: function for ECC correction, matching to ECC generator (sw/hw)
458 * @read_page_raw: function to read a raw page without ECC 458 * @read_page_raw: function to read a raw page without ECC. This function
459 * @write_page_raw: function to write a raw page without ECC 459 * should hide the specific layout used by the ECC
460 * controller and always return contiguous in-band and
461 * out-of-band data even if they're not stored
462 * contiguously on the NAND chip (e.g.
463 * NAND_ECC_HW_SYNDROME interleaves in-band and
464 * out-of-band data).
465 * @write_page_raw: function to write a raw page without ECC. This function
466 * should hide the specific layout used by the ECC
467 * controller and consider the passed data as contiguous
468 * in-band and out-of-band data. ECC controller is
469 * responsible for doing the appropriate transformations
470 * to adapt to its specific layout (e.g.
471 * NAND_ECC_HW_SYNDROME interleaves in-band and
472 * out-of-band data).
460 * @read_page: function to read a page according to the ECC generator 473 * @read_page: function to read a page according to the ECC generator
461 * requirements; returns maximum number of bitflips corrected in 474 * requirements; returns maximum number of bitflips corrected in
462 * any single ECC step, 0 if bitflips uncorrectable, -EIO hw error 475 * any single ECC step, 0 if bitflips uncorrectable, -EIO hw error