Title: [4097] trunk/drivers/mtd/nand/bf5xx_nand.c: [#3825]
fix ECC caculating bug when NAND Flash chip page size is 512 bytes
- Revision
- 4097
- Author
- cooloney
- Date
- 2008-01-14 00:48:04 -0600 (Mon, 14 Jan 2008)
Log Message
[#3825] fix ECC caculating bug when NAND Flash chip page size is 512 bytes
Diffstat
bf5xx_nand.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletion(-)
Modified Paths
Diff
Modified: trunk/drivers/mtd/nand/bf5xx_nand.c (4096 => 4097)
--- trunk/drivers/mtd/nand/bf5xx_nand.c 2008-01-14 03:16:45 UTC (rev 4096)
+++ trunk/drivers/mtd/nand/bf5xx_nand.c 2008-01-14 06:48:04 UTC (rev 4097)
@@ -313,8 +313,15 @@
}
p = (u8 *)code;
- for (i = 0; i < bytes; i++)
+ for (i = 0; i < bytes; i++) {
+ /* For 512 page size, should copy
+ * p[0], p[1], p[2], p[4], p[5], p[6]
+ */
+ if (i == 3)
+ i = 4;
+
ecc_code[i] = p[i];
+ }
return 0;
}
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
http://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits