ramips: fix the number of uarts for MT7688
[openwrt/openwrt.git] / target / linux / mediatek / patches-4.4 / 0103-nand_fixes.patch
1 --- a/drivers/mtd/nand/mtk_nand.c
2 +++ b/drivers/mtd/nand/mtk_nand.c
3 @@ -1017,8 +1017,8 @@ static int mtk_nfc_ooblayout_free(struct
4 if (section >= eccsteps)
5 return -ERANGE;
6
7 - oob_region->length = fdm->reg_size - fdm->ecc_size;
8 - oob_region->offset = section * fdm->reg_size + fdm->ecc_size;
9 + oob_region->length = fdm->reg_size - 1;
10 + oob_region->offset = section * fdm->reg_size + 1;
11
12 return 0;
13 }
14 @@ -1058,7 +1058,7 @@ static void mtk_nfc_set_fdm(struct mtk_n
15 fdm->reg_size = NFI_FDM_MAX_SIZE;
16
17 /* bad block mark storage */
18 - fdm->ecc_size = 1;
19 + fdm->ecc_size = fdm->reg_size;
20 }
21
22 static void mtk_nfc_set_bad_mark_ctl(struct mtk_nfc_bad_mark_ctl *bm_ctl,