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:
parent
ddd8424992
commit
656d037b97
@ -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;
|
||||
|
@ -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;
|
||||
+ }
|
||||
|
Loading…
Reference in New Issue
Block a user