aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/xburst/patches-3.2/0005-NAND-Optimize-reading-the-eec-data-for-the-JZ4740.patch
diff options
context:
space:
mode:
authorMirko Vogt <mirko@openwrt.org>2012-04-08 12:09:52 +0000
committerMirko Vogt <mirko@openwrt.org>2012-04-08 12:09:52 +0000
commitb0971e69f2ff110d6fc6e52a601e4e87d707e758 (patch)
treed594fb132701a129c7777b38ed192e9ccbe39987 /target/linux/xburst/patches-3.2/0005-NAND-Optimize-reading-the-eec-data-for-the-JZ4740.patch
parent626e1717642e933af0f15a387caadb16178c0254 (diff)
downloadupstream-b0971e69f2ff110d6fc6e52a601e4e87d707e758.tar.gz
upstream-b0971e69f2ff110d6fc6e52a601e4e87d707e758.tar.bz2
upstream-b0971e69f2ff110d6fc6e52a601e4e87d707e758.zip
level up target xburst to linux kernel version 3.2.1
Thanks to the qi-hardware project - especially to Lars, Maarten and Xiangfu SVN-Revision: 31218
Diffstat (limited to 'target/linux/xburst/patches-3.2/0005-NAND-Optimize-reading-the-eec-data-for-the-JZ4740.patch')
-rw-r--r--target/linux/xburst/patches-3.2/0005-NAND-Optimize-reading-the-eec-data-for-the-JZ4740.patch58
1 files changed, 58 insertions, 0 deletions
diff --git a/target/linux/xburst/patches-3.2/0005-NAND-Optimize-reading-the-eec-data-for-the-JZ4740.patch b/target/linux/xburst/patches-3.2/0005-NAND-Optimize-reading-the-eec-data-for-the-JZ4740.patch
new file mode 100644
index 0000000000..89247cafc9
--- /dev/null
+++ b/target/linux/xburst/patches-3.2/0005-NAND-Optimize-reading-the-eec-data-for-the-JZ4740.patch
@@ -0,0 +1,58 @@
+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(-)
+
+diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
+index 0131e84..74b8cce 100644
+--- a/drivers/mtd/nand/nand_base.c
++++ b/drivers/mtd/nand/nand_base.c
+@@ -1295,8 +1295,8 @@ static int nand_read_page_hwecc_oob_first(struct mtd_info *mtd,
+
+ /* 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);
+@@ -1304,9 +1304,6 @@ static int nand_read_page_hwecc_oob_first(struct mtd_info *mtd,
+ 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;
+
+@@ -1361,8 +1358,8 @@ static int nand_read_subpage_hwecc_oob_first(struct mtd_info *mtd, struct nand_c
+
+ /* 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);
+@@ -1370,9 +1367,6 @@ static int nand_read_subpage_hwecc_oob_first(struct mtd_info *mtd, struct nand_c
+ 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) {
+--
+1.7.5.4
+