summaryrefslogtreecommitdiff
path: root/target/linux/mediatek/patches-4.4/0103-nand_fixes.patch
diff options
context:
space:
mode:
authorJohn Crispin <john@phrozen.org>2016-06-17 03:46:25 +0200
committerJohn Crispin <john@phrozen.org>2016-06-17 04:13:08 +0200
commite81020c3173a108fb9045af3989a74f51997b44e (patch)
tree0a32d824e7cbeca650bf590c9e71288caa681691 /target/linux/mediatek/patches-4.4/0103-nand_fixes.patch
parent16e04fd1b4572ad9f6cf006ff6dc895711d5d6cd (diff)
downloadmtk-20170518-e81020c3173a108fb9045af3989a74f51997b44e.zip
mtk-20170518-e81020c3173a108fb9045af3989a74f51997b44e.tar.gz
mtk-20170518-e81020c3173a108fb9045af3989a74f51997b44e.tar.bz2
medaitek: convert the NAND target to UBI
Signed-off-by: John Crispin <john@phrozen.org>
Diffstat (limited to 'target/linux/mediatek/patches-4.4/0103-nand_fixes.patch')
-rw-r--r--target/linux/mediatek/patches-4.4/0103-nand_fixes.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/target/linux/mediatek/patches-4.4/0103-nand_fixes.patch b/target/linux/mediatek/patches-4.4/0103-nand_fixes.patch
new file mode 100644
index 0000000..5e18fb4
--- /dev/null
+++ b/target/linux/mediatek/patches-4.4/0103-nand_fixes.patch
@@ -0,0 +1,22 @@
+--- a/drivers/mtd/nand/mtk_nand.c
++++ b/drivers/mtd/nand/mtk_nand.c
+@@ -1017,8 +1017,8 @@
+ 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;
+ }
+@@ -1058,7 +1058,7 @@
+ 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,