summaryrefslogtreecommitdiffstats
path: root/include/linux/mtd
diff options
context:
space:
mode:
authorBoris Brezillon <boris.brezillon@free-electrons.com>2016-06-08 17:04:22 +0200
committerBoris Brezillon <boris.brezillon@free-electrons.com>2016-09-23 09:35:16 +0200
commitba78ee00e1ff84de9b3ad33edbd3ec599099ee82 (patch)
tree161e3a423c8ae027e651ec3514a2e4abbd48f3db /include/linux/mtd
parent8283079696aba905367297cf80287980eb34c14c (diff)
downloadtalos-obmc-linux-ba78ee00e1ff84de9b3ad33edbd3ec599099ee82.tar.gz
talos-obmc-linux-ba78ee00e1ff84de9b3ad33edbd3ec599099ee82.zip
mtd: nand: Add an option to maximize the ECC strength
The generic NAND DT bindings allows one to tweak the ECC strength and step size to their need. It can be used to lower the ECC strength to match a bootloader/firmware config, but might also be used to get a better reliability. In the latter case, the user might want to use the maximum ECC strength without having to explicitly calculate the exact value (this value not only depends on the OOB size, but also on the NAND controller, and can be tricky to extract). Add a generic 'nand-ecc-maximize' DT property and the associated NAND_ECC_MAXIMIZE flag, to let ECC controller drivers select the best ECC strength and step-size on their own. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'include/linux/mtd')
-rw-r--r--include/linux/mtd/nand.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index d3e3f8d03336..331caf987b16 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -141,6 +141,7 @@ enum nand_ecc_algo {
* pages and you want to rely on the default implementation.
*/
#define NAND_ECC_GENERIC_ERASED_CHECK BIT(0)
+#define NAND_ECC_MAXIMIZE BIT(1)
/* Bit mask for flags passed to do_nand_read_ecc */
#define NAND_GET_DEVICE 0x80
OpenPOWER on IntegriCloud