summaryrefslogtreecommitdiff
path: root/include/linux/mtd
diff options
context:
space:
mode:
authorpekon gupta <pekon@ti.com>2014-06-02 17:14:42 +0530
committerTom Rini <trini@ti.com>2014-06-06 17:46:10 -0400
commit46840f66caf564866d191886d2bd86742f982010 (patch)
treeaa719a57b1c9745b9cd00e9e44f283046f79c7a2 /include/linux/mtd
parent8d13a730dea1b5b4d32b31b5584cb8fdea27a248 (diff)
downloadu-boot-imx-46840f66caf564866d191886d2bd86742f982010.zip
u-boot-imx-46840f66caf564866d191886d2bd86742f982010.tar.gz
u-boot-imx-46840f66caf564866d191886d2bd86742f982010.tar.bz2
mtd: nand: omap: add support for BCH16_ECC - NAND driver updates
This patch add support for BCH16_ECC to omap_gpmc driver. *need to BCH16 ECC scheme* With newer SLC Flash technologies and MLC NAND, and large densities, pagesizes Flash devices have become more suspectible to bit-flips. Thus stronger ECC schemes are required for protecting the data. But stronger ECC schemes have come with larger-sized ECC syndromes which require more space in OOB/Spare. This puts constrains like; (a) BCH16_ECC can correct 16 bit-flips per 512Bytes of data. (b) BCH16_ECC generates 26-bytes of ECC syndrome / 512B. Due to (b) this scheme can only be used with NAND devices which have enough OOB to satisfy following equation: OOBsize per page >= 26 * (page-size / 512) Signed-off-by: Pekon Gupta <pekon@ti.com>
Diffstat (limited to 'include/linux/mtd')
-rw-r--r--include/linux/mtd/omap_gpmc.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/mtd/omap_gpmc.h b/include/linux/mtd/omap_gpmc.h
index d55fe32..9a86582 100644
--- a/include/linux/mtd/omap_gpmc.h
+++ b/include/linux/mtd/omap_gpmc.h
@@ -27,6 +27,8 @@ enum omap_ecc {
OMAP_ECC_BCH8_CODE_HW_DETECTION_SW,
/* 8-bit ECC calculation by GPMC, Error detection by ELM */
OMAP_ECC_BCH8_CODE_HW,
+ /* 16-bit ECC calculation by GPMC, Error detection by ELM */
+ OMAP_ECC_BCH16_CODE_HW,
};
struct gpmc_cs {
@@ -47,6 +49,10 @@ struct bch_res_0_3 {
u32 bch_result_x[4];
};
+struct bch_res_4_6 {
+ u32 bch_result_x[3];
+};
+
struct gpmc {
u8 res1[0x10];
u32 sysconfig; /* 0x10 */
@@ -77,6 +83,8 @@ struct gpmc {
u32 testmomde_ctrl; /* 0x230 */
u8 res8[12]; /* 0x234 */
struct bch_res_0_3 bch_result_0_3[GPMC_MAX_SECTORS]; /* 0x240,0x250, */
+ u8 res9[16 * 4]; /* 0x2C0 - 0x2FF */
+ struct bch_res_4_6 bch_result_4_6[GPMC_MAX_SECTORS]; /* 0x300,0x310, */
};
/* Used for board specific gpmc initialization */