summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2016-10-26 17:18:44 -0700
committerMax Krummenacher <max.krummenacher@toradex.com>2017-01-11 15:42:35 +0100
commitff58aaf0bb23129c81099c3b2ea89954022bf6cf (patch)
tree4f250906adccf156bf1cbeb0389deaa20f2c51a1 /include
parente2ee1afc28a13a0894fd2db0a5ae7a2262fdd1c0 (diff)
nand: force BBT scan for controllers which need it
Commit 35c204d8a9d0 ("nand: reinstate lazy bad block scanning") introduced lazy BBT scanning. However, some controller do parts of the initialization (mxs_nand.c) during scan_bbt, hence for those controllers the BBT must be scanned at initialization time. In most situation the U-Boot environment gets read first, and the U-Boot environment code checks for bad blocks first. Checking for bad blocks will ask for scan_bbt before reading the first page, hence in most situation the issue does not appear in practice. However, when there is no environment configured, other code might access NAND first which does not explicitly checks for bad blocks, in those cases ECC reads will fail always. Cc: Rostislav Lisovy <lisovy@gmail.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mtd/nand.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index d55807b2e2..d93989663b 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -224,6 +224,8 @@ typedef enum {
* kmap'ed, vmalloc'ed highmem buffers being passed from upper layers
*/
#define NAND_USE_BOUNCE_BUFFER 0x00100000
+/* Chip needs BBT scan */
+#define NAND_NEED_BBTSCAN 0x00200000
/* Options set by nand scan */
/* bbt has already been read */