2016-06-17 01:46:25 +00:00
|
|
|
--- a/drivers/mtd/nand/mtk_nand.c
|
|
|
|
+++ b/drivers/mtd/nand/mtk_nand.c
|
2017-03-12 11:30:30 +00:00
|
|
|
@@ -1073,8 +1073,8 @@ static int mtk_nfc_ooblayout_free(struct
|
2016-06-17 01:46:25 +00:00
|
|
|
if (section >= eccsteps)
|
|
|
|
return -ERANGE;
|
|
|
|
|
|
|
|
- oob_region->length = fdm->reg_size - fdm->ecc_size;
|
|
|
|
- oob_region->offset = section * fdm->reg_size + fdm->ecc_size;
|
|
|
|
+ oob_region->length = fdm->reg_size - 1;
|
|
|
|
+ oob_region->offset = section * fdm->reg_size + 1;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
2017-03-12 11:30:30 +00:00
|
|
|
@@ -1114,7 +1114,7 @@ static void mtk_nfc_set_fdm(struct mtk_n
|
2016-06-17 01:46:25 +00:00
|
|
|
fdm->reg_size = NFI_FDM_MAX_SIZE;
|
|
|
|
|
|
|
|
/* bad block mark storage */
|
|
|
|
- fdm->ecc_size = 1;
|
|
|
|
+ fdm->ecc_size = fdm->reg_size;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void mtk_nfc_set_bad_mark_ctl(struct mtk_nfc_bad_mark_ctl *bm_ctl,
|