diff options
author | Huang Shijie <b32955@freescale.com> | 2013-01-29 09:23:38 +0800 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2013-02-04 10:28:02 +0200 |
commit | 92d0e09abeebdd3f699c9f12401a9e3998a20546 (patch) | |
tree | fa51378318368e5dd1471e2f82b061e007dfb6f8 /drivers/mtd/nand/gpmi-nand/gpmi-nand.h | |
parent | 9ff16f0833806b6b59aaf0cc158fa6e42f24d7e4 (diff) |
mtd: gpmi: add sanity check for the ECC
We do the check based on the following two facts:
[1] The mx23/mx28 can only support 20-bits ECC, while the mx6
can supports 40-bits ECC.
[2] The mx23/mx28 can only support the GF13, while the mx6
can supports GF13 and GF14.
Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'drivers/mtd/nand/gpmi-nand/gpmi-nand.h')
-rw-r--r-- | drivers/mtd/nand/gpmi-nand/gpmi-nand.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.h b/drivers/mtd/nand/gpmi-nand/gpmi-nand.h index 3d93a5e3909..07294773127 100644 --- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.h +++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.h @@ -284,6 +284,10 @@ extern int gpmi_read_page(struct gpmi_nand_data *, #define STATUS_ERASED 0xff #define STATUS_UNCORRECTABLE 0xfe +/* BCH's bit correction capability. */ +#define MXS_ECC_STRENGTH_MAX 20 /* mx23 and mx28 */ +#define MX6_ECC_STRENGTH_MAX 40 + /* Use the platform_id to distinguish different Archs. */ #define IS_MX23 0x0 #define IS_MX28 0x1 |