summaryrefslogtreecommitdiff
path: root/target/linux/xburst/patches-3.8/0005-NAND-Optimize-reading-the-eec-data-for-the-JZ4740.patch
diff options
context:
space:
mode:
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-03-10 13:24:50 +0000
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-03-10 13:24:50 +0000
commit4f841f9c045926f07f005449167ce11e35d05676 (patch)
tree37f05a677fdf45100e3a5977b28effab0da1a04a /target/linux/xburst/patches-3.8/0005-NAND-Optimize-reading-the-eec-data-for-the-JZ4740.patch
parentd6295b90e71bb459beb02f174a664c358287deaf (diff)
xburst: add support for 3.8
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35932 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/xburst/patches-3.8/0005-NAND-Optimize-reading-the-eec-data-for-the-JZ4740.patch')
-rw-r--r--target/linux/xburst/patches-3.8/0005-NAND-Optimize-reading-the-eec-data-for-the-JZ4740.patch53
1 files changed, 53 insertions, 0 deletions
diff --git a/target/linux/xburst/patches-3.8/0005-NAND-Optimize-reading-the-eec-data-for-the-JZ4740.patch b/target/linux/xburst/patches-3.8/0005-NAND-Optimize-reading-the-eec-data-for-the-JZ4740.patch
new file mode 100644
index 0000000000..e65ae6e1d0
--- /dev/null
+++ b/target/linux/xburst/patches-3.8/0005-NAND-Optimize-reading-the-eec-data-for-the-JZ4740.patch
@@ -0,0 +1,53 @@
+From 4f28237a750afd1112b6f1266d36f8b718efe89c Mon Sep 17 00:00:00 2001
+From: Xiangfu Liu <xiangfu@sharism.cc>
+Date: Tue, 6 Mar 2012 11:19:26 +0800
+Subject: [PATCH 05/21] NAND-Optimize-reading-the-eec-data-for-the-JZ4740
+
+---
+ drivers/mtd/nand/nand_base.c | 14 ++++----------
+ 1 files changed, 4 insertions(+), 10 deletions(-)
+
+--- a/drivers/mtd/nand/nand_base.c
++++ b/drivers/mtd/nand/nand_base.c
+@@ -1300,8 +1300,8 @@ static int nand_read_page_hwecc_oob_firs
+
+ /* Read the OOB area first */
+ if (mtd->writesize > 512) {
+- chip->cmdfunc(mtd, NAND_CMD_READ0, mtd->writesize, page);
+- chip->read_buf(mtd, chip->oob_poi, mtd->oobsize);
++ chip->cmdfunc(mtd, NAND_CMD_READ0, mtd->writesize + eccpos[0], page);
++ chip->read_buf(mtd, ecc_code, chip->ecc.total);
+ chip->cmdfunc(mtd, NAND_CMD_RNDOUT, 0, -1);
+ } else {
+ chip->cmdfunc(mtd, NAND_CMD_READOOB, 0, page);
+@@ -1309,9 +1309,6 @@ static int nand_read_page_hwecc_oob_firs
+ chip->cmdfunc(mtd, NAND_CMD_READ0, 0, page);
+ }
+
+- for (i = 0; i < chip->ecc.total; i++)
+- ecc_code[i] = chip->oob_poi[eccpos[i]];
+-
+ for (i = 0; eccsteps; eccsteps--, i += eccbytes, p += eccsize) {
+ int stat;
+
+@@ -1368,8 +1365,8 @@ static int nand_read_subpage_hwecc_oob_f
+
+ /* Read the OOB area first */
+ if (mtd->writesize > 512) {
+- chip->cmdfunc(mtd, NAND_CMD_READ0, mtd->writesize, page);
+- chip->read_buf(mtd, chip->oob_poi, mtd->oobsize);
++ chip->cmdfunc(mtd, NAND_CMD_READ0, mtd->writesize + eccpos[0], page);
++ chip->read_buf(mtd, ecc_code, chip->ecc.total);
+ chip->cmdfunc(mtd, NAND_CMD_RNDOUT, data_col_addr, -1);
+ } else {
+ chip->cmdfunc(mtd, NAND_CMD_READOOB, 0, page);
+@@ -1377,9 +1374,6 @@ static int nand_read_subpage_hwecc_oob_f
+ chip->cmdfunc(mtd, NAND_CMD_READ0, data_col_addr, page);
+ }
+
+- for (i = 0; i < chip->ecc.total; i++)
+- ecc_code[i] = chip->oob_poi[eccpos[i]];
+-
+ p = bufpoi + data_col_addr;
+
+ for (i = eccbytes * start_step; num_steps; num_steps--, i += eccbytes, p += eccsize) {