diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2009-07-24 15:31:33 +0300 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2009-08-14 20:02:20 +0300 |
commit | 867996b15c1f0a98d2c405bada907e97499ba8c2 (patch) | |
tree | 3ca5bfb6e74ef5697bb89d29365f6c4df7ab4c03 /drivers/mtd/ubi/debug.h | |
parent | 758d8e46347aee199e7025b8c571bab75d2de63f (diff) | |
download | blackbird-op-linux-867996b15c1f0a98d2c405bada907e97499ba8c2.tar.gz blackbird-op-linux-867996b15c1f0a98d2c405bada907e97499ba8c2.zip |
UBI: introduce flash dump helper
Useful for debugging problems, compiled in only if UBI debugging
is enabled. This patch also makes the UBI writing function dump
the flash if it fails to write.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd/ubi/debug.h')
-rw-r--r-- | drivers/mtd/ubi/debug.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mtd/ubi/debug.h b/drivers/mtd/ubi/debug.h index a4da7a09b949..f30bcb372c05 100644 --- a/drivers/mtd/ubi/debug.h +++ b/drivers/mtd/ubi/debug.h @@ -55,6 +55,7 @@ void ubi_dbg_dump_vtbl_record(const struct ubi_vtbl_record *r, int idx); void ubi_dbg_dump_sv(const struct ubi_scan_volume *sv); void ubi_dbg_dump_seb(const struct ubi_scan_leb *seb, int type); void ubi_dbg_dump_mkvol_req(const struct ubi_mkvol_req *req); +void ubi_dbg_dump_flash(struct ubi_device *ubi, int pnum, int offset, int len); #ifdef CONFIG_MTD_UBI_DEBUG_MSG /* General debugging messages */ @@ -167,6 +168,7 @@ static inline int ubi_dbg_is_erase_failure(void) #define ubi_dbg_dump_sv(sv) ({}) #define ubi_dbg_dump_seb(seb, type) ({}) #define ubi_dbg_dump_mkvol_req(req) ({}) +#define ubi_dbg_dump_flash(ubi, pnum, offset, len) ({}) #define UBI_IO_DEBUG 0 #define DBG_DISABLE_BGT 0 |