1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-24 15:25:20 +02:00

uboot: fix nand error correction

This commit is contained in:
Lars-Peter Clausen 2009-12-21 16:37:13 +01:00
parent ddd8424992
commit 656d037b97
2 changed files with 3 additions and 2 deletions

View File

@ -1139,7 +1139,7 @@ new file mode 100644
index 0000000..7b1cdf3
--- /dev/null
+++ b/cpu/mips/jz4740_nand.c
@@ -0,0 +1,198 @@
@@ -0,0 +1,199 @@
+/*
+ * Platform independend driver for JZ4740.
+ *
@ -1331,6 +1331,7 @@ index 0000000..7b1cdf3
+ nand->ecc.calculate = jzsoc_nand_calculate_rs_ecc;
+ nand->ecc.mode = NAND_ECC_HW;
+ nand->ecc.size = 512;
+ nand->ecc.bytes = 9;
+
+ /* 20 us command delay time */
+ nand->chip_delay = 20;

View File

@ -1281,7 +1281,7 @@ index 360b070..88717e9 100644
+ chip->read_buf(mtd, chip->oob_poi, mtd->oobsize);
+
+ for (i = 0; i < chip->ecc.total; i++) {
+ ecc_code[i] = chip->oob_poi[eccpos[i]];
+ ecc_code[i] = chip->oob_poi[CONFIG_NAND_ECC_POS + i];
+ if (ecc_code[i] != 0xff)
+ flag = 1;
+ }