summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2014-09-25 21:13:36 +0200
committerStefano Babic <sbabic@denx.de>2014-10-30 11:02:23 +0100
commitf9cfe17b3d145edd2a308a934594d659ffc69439 (patch)
treea37291040eec2e5cb1f4de156ec533986dd3f3a4 /drivers
parent9c56936eb5fc8191df2e7f6016d579741d5f01e0 (diff)
downloadu-boot-imx-f9cfe17b3d145edd2a308a934594d659ffc69439.zip
u-boot-imx-f9cfe17b3d145edd2a308a934594d659ffc69439.tar.gz
u-boot-imx-f9cfe17b3d145edd2a308a934594d659ffc69439.tar.bz2
mtd: nand: mxs: Add ECC geometry for 2048b/112b NAND
Add ECC geometry for NAND which has 2048b pagesize and 112b OOB size. This is for example Macronix MX30LF2G28AB chip. Signed-off-by: Marek Vasut <marex@denx.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/nand/mxs_nand.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/mtd/nand/mxs_nand.c b/drivers/mtd/nand/mxs_nand.c
index 036c113..7a064ab 100644
--- a/drivers/mtd/nand/mxs_nand.c
+++ b/drivers/mtd/nand/mxs_nand.c
@@ -146,8 +146,13 @@ static uint32_t mxs_nand_aux_status_offset(void)
static inline uint32_t mxs_nand_get_ecc_strength(uint32_t page_data_size,
uint32_t page_oob_size)
{
- if (page_data_size == 2048)
- return 8;
+ if (page_data_size == 2048) {
+ if (page_oob_size == 64)
+ return 8;
+
+ if (page_oob_size == 112)
+ return 14;
+ }
if (page_data_size == 4096) {
if (page_oob_size == 128)