summaryrefslogtreecommitdiff
path: root/drivers/mtd/ubi/debug.h
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-06-28 20:16:55 +0400
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-07-05 19:47:03 +0400
commit40a71a87fa8e0cb3ec0fca4d152263734b203eb2 (patch)
tree8bdd27304fc4d28c850c76f2b1f4a32c802612f8 /drivers/mtd/ubi/debug.h
parent8e4a718ff38d8539938ec3421935904c27e00c39 (diff)
downloadlinux-40a71a87fa8e0cb3ec0fca4d152263734b203eb2.tar.xz
UBI: add empty eraseblocks verification
This patch adds code which makes sure eraseblocks contain all 0xFF bytes before starting using them. The verification is done only when debugging checks are enabled. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd/ubi/debug.h')
-rw-r--r--drivers/mtd/ubi/debug.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/mtd/ubi/debug.h b/drivers/mtd/ubi/debug.h
index 13777e5beac9..6fc7fda2ab91 100644
--- a/drivers/mtd/ubi/debug.h
+++ b/drivers/mtd/ubi/debug.h
@@ -93,6 +93,12 @@ void ubi_dbg_dump_mkvol_req(const struct ubi_mkvol_req *req);
#define UBI_IO_DEBUG 0
#endif
+#ifdef CONFIG_MTD_UBI_DEBUG_PARANOID
+int ubi_dbg_check_all_ff(struct ubi_device *ubi, int pnum, int offset, int len);
+#else
+#define ubi_dbg_check_all_ff(ubi, pnum, offset, len) 0
+#endif
+
#ifdef CONFIG_MTD_UBI_DEBUG_DISABLE_BGT
#define DBG_DISABLE_BGT 1
#else