[MTD] NAND: Disable ECC checking on CAFÉ since it's broken for now

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Tue Nov 28 18:59:04 EST 2006


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=470b0a90d6a21cb72b671215f12ec7ec8a0db2c0
Commit:     470b0a90d6a21cb72b671215f12ec7ec8a0db2c0
Parent:     fbad5696c5c45982d02e05b85922bad6eb6e6349
commit 470b0a90d6a21cb72b671215f12ec7ec8a0db2c0
Author:     David Woodhouse <dwmw2 at infradead.org>
AuthorDate: Mon Oct 23 14:29:04 2006 +0100
Commit:     David Woodhouse <dwmw2 at infradead.org>
CommitDate: Mon Oct 23 14:29:04 2006 +0100

    [MTD] NAND: Disable ECC checking on CAFÉ since it's broken for now
    
    Signed-off-by: David Woodhouse <dwmw2 at infradead.org>
---
 drivers/mtd/nand/cafe.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/nand/cafe.c b/drivers/mtd/nand/cafe.c
index 10132ef..6bcb430 100644
--- a/drivers/mtd/nand/cafe.c
+++ b/drivers/mtd/nand/cafe.c
@@ -67,6 +67,9 @@ module_param(skipbbt, int, 0644);
 static int debug = 0;
 module_param(debug, int, 0644);
 
+static int checkecc = 0;
+module_param(checkecc, int, 0644);
+
 /* Hrm. Why isn't this already conditional on something in the struct device? */
 #define cafe_dev_dbg(dev, args...) do { if (debug) dev_dbg(dev, ##args); } while(0)
 
@@ -214,7 +217,7 @@ static void cafe_nand_cmdfunc(struct mtd
 		writel(cafe->ctl2 | 0x100 | NAND_CMD_READSTART, cafe->mmio + CAFE_NAND_CTRL2);
 
  do_command:
-#if 1
+#if 0
 	/* http://dev.laptop.org/ticket/200
 	   ECC on read only works if we read precisely 0x80e bytes */
 	if (cafe->datalen == 2112)
@@ -382,7 +385,7 @@ static int cafe_nand_read_page(struct mt
 	chip->read_buf(mtd, buf, mtd->writesize);
 	chip->read_buf(mtd, chip->oob_poi, mtd->oobsize);
 
-	if (readl(cafe->mmio + CAFE_NAND_ECC_RESULT) & (1<<18)) {
+	if (checkecc && readl(cafe->mmio + CAFE_NAND_ECC_RESULT) & (1<<18)) {
 		unsigned short syn[8];
 		int i;
 



More information about the linux-mtd-cvs mailing list