From 656d037b97424823944f6d829d957c9e623a384b Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Mon, 21 Dec 2009 16:37:13 +0100 Subject: [PATCH] uboot: fix nand error correction --- .../image/u-boot/patches/0001-add-xburst-platform-files.patch | 3 ++- .../xburst/image/u-boot/patches/0002-add-xburst-support.patch | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/target/linux/xburst/image/u-boot/patches/0001-add-xburst-platform-files.patch b/target/linux/xburst/image/u-boot/patches/0001-add-xburst-platform-files.patch index 2fca294ed..adc30e9e4 100644 --- a/target/linux/xburst/image/u-boot/patches/0001-add-xburst-platform-files.patch +++ b/target/linux/xburst/image/u-boot/patches/0001-add-xburst-platform-files.patch @@ -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; diff --git a/target/linux/xburst/image/u-boot/patches/0002-add-xburst-support.patch b/target/linux/xburst/image/u-boot/patches/0002-add-xburst-support.patch index 248c5d483..b8aeed27d 100644 --- a/target/linux/xburst/image/u-boot/patches/0002-add-xburst-support.patch +++ b/target/linux/xburst/image/u-boot/patches/0002-add-xburst-support.patch @@ -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; + }