Commit 0acf944c authored by Anton Vorontsov's avatar Anton Vorontsov Committed by David Woodhouse

[MTD] [NAND] fsl_elbc_nand: ecclayout cleanups

This patch deletes oobavail assignments, they're calculated by the nand
core code in nand_scan_tail, plus current oobavail values are wrong for
the LP NANDs.

Also remove mtd->ecclayout and mtd->oobavail assignments, mtd core
handles this all by itself.
Signed-off-by: default avatarAnton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent ec6e0ea3
...@@ -89,7 +89,6 @@ static struct nand_ecclayout fsl_elbc_oob_sp_eccm0 = { ...@@ -89,7 +89,6 @@ static struct nand_ecclayout fsl_elbc_oob_sp_eccm0 = {
.eccbytes = 3, .eccbytes = 3,
.eccpos = {6, 7, 8}, .eccpos = {6, 7, 8},
.oobfree = { {0, 5}, {9, 7} }, .oobfree = { {0, 5}, {9, 7} },
.oobavail = 12,
}; };
/* Small Page FLASH with FMR[ECCM] = 1 */ /* Small Page FLASH with FMR[ECCM] = 1 */
...@@ -97,7 +96,6 @@ static struct nand_ecclayout fsl_elbc_oob_sp_eccm1 = { ...@@ -97,7 +96,6 @@ static struct nand_ecclayout fsl_elbc_oob_sp_eccm1 = {
.eccbytes = 3, .eccbytes = 3,
.eccpos = {8, 9, 10}, .eccpos = {8, 9, 10},
.oobfree = { {0, 5}, {6, 2}, {11, 5} }, .oobfree = { {0, 5}, {6, 2}, {11, 5} },
.oobavail = 12,
}; };
/* Large Page FLASH with FMR[ECCM] = 0 */ /* Large Page FLASH with FMR[ECCM] = 0 */
...@@ -105,7 +103,6 @@ static struct nand_ecclayout fsl_elbc_oob_lp_eccm0 = { ...@@ -105,7 +103,6 @@ static struct nand_ecclayout fsl_elbc_oob_lp_eccm0 = {
.eccbytes = 12, .eccbytes = 12,
.eccpos = {6, 7, 8, 22, 23, 24, 38, 39, 40, 54, 55, 56}, .eccpos = {6, 7, 8, 22, 23, 24, 38, 39, 40, 54, 55, 56},
.oobfree = { {1, 5}, {9, 13}, {25, 13}, {41, 13}, {57, 7} }, .oobfree = { {1, 5}, {9, 13}, {25, 13}, {41, 13}, {57, 7} },
.oobavail = 48,
}; };
/* Large Page FLASH with FMR[ECCM] = 1 */ /* Large Page FLASH with FMR[ECCM] = 1 */
...@@ -113,7 +110,6 @@ static struct nand_ecclayout fsl_elbc_oob_lp_eccm1 = { ...@@ -113,7 +110,6 @@ static struct nand_ecclayout fsl_elbc_oob_lp_eccm1 = {
.eccbytes = 12, .eccbytes = 12,
.eccpos = {8, 9, 10, 24, 25, 26, 40, 41, 42, 56, 57, 58}, .eccpos = {8, 9, 10, 24, 25, 26, 40, 41, 42, 56, 57, 58},
.oobfree = { {1, 7}, {11, 13}, {27, 13}, {43, 13}, {59, 5} }, .oobfree = { {1, 7}, {11, 13}, {27, 13}, {43, 13}, {59, 5} },
.oobavail = 48,
}; };
/* /*
...@@ -730,8 +726,6 @@ static int fsl_elbc_chip_init_tail(struct mtd_info *mtd) ...@@ -730,8 +726,6 @@ static int fsl_elbc_chip_init_tail(struct mtd_info *mtd)
&fsl_elbc_oob_lp_eccm1 : &fsl_elbc_oob_lp_eccm1 :
&fsl_elbc_oob_lp_eccm0; &fsl_elbc_oob_lp_eccm0;
chip->badblock_pattern = &largepage_memorybased; chip->badblock_pattern = &largepage_memorybased;
mtd->ecclayout = chip->ecc.layout;
mtd->oobavail = chip->ecc.layout->oobavail;
} }
} else { } else {
dev_err(ctrl->dev, dev_err(ctrl->dev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment