mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 10:39:08 +00:00
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>
This commit is contained in:
parent
8d13a730de
commit
46840f66ca
2 changed files with 86 additions and 1 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue