From e2858f6bd3887604b1202c0ebe47871238ef43ec Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Wed, 1 Nov 2006 08:19:20 +0800 Subject: [PATCH] --- yaml --- r: 45658 b: refs/heads/master c: cad40654c312fc51bdb520e9be91e29a9742bbcb h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/mtd/nand/cafe.c | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index 20195c20717e..3f7bd1886329 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: be8444bdf34f7ba21e2364ca296c68e81033e3b2 +refs/heads/master: cad40654c312fc51bdb520e9be91e29a9742bbcb diff --git a/trunk/drivers/mtd/nand/cafe.c b/trunk/drivers/mtd/nand/cafe.c index c5d03b07f7a9..fad304bf7b7e 100644 --- a/trunk/drivers/mtd/nand/cafe.c +++ b/trunk/drivers/mtd/nand/cafe.c @@ -159,6 +159,7 @@ static void cafe_nand_cmdfunc(struct mtd_info *mtd, unsigned command, /* Second half of a command we already calculated */ cafe_writel(cafe, cafe->ctl2 | 0x100 | command, NAND_CTRL2); ctl1 = cafe->ctl1; + cafe->ctl2 &= ~(1<<30); cafe_dev_dbg(&cafe->pdev->dev, "Continue command, ctl1 %08x, #data %d\n", cafe->ctl1, cafe->nr_data); goto do_command; @@ -219,7 +220,6 @@ static void cafe_nand_cmdfunc(struct mtd_info *mtd, unsigned command, /* Ignore the first command of a pair; the hardware deals with them both at once, later */ cafe->ctl1 = ctl1; - cafe->ctl2 = 0; cafe_dev_dbg(&cafe->pdev->dev, "Setup for delayed command, ctl1 %08x, dlen %x\n", cafe->ctl1, cafe->datalen); return; @@ -281,9 +281,7 @@ static void cafe_nand_cmdfunc(struct mtd_info *mtd, unsigned command, command, 500000-c, irqs, cafe_readl(cafe, NAND_IRQ)); } - - cafe->ctl2 &= ~(1<<8); - cafe->ctl2 &= ~(1<<30); + WARN_ON(cafe->ctl2 & (1<<30)); switch (command) { @@ -471,9 +469,7 @@ static void cafe_nand_write_page_lowlevel(struct mtd_info *mtd, chip->write_buf(mtd, chip->oob_poi, mtd->oobsize); /* Set up ECC autogeneration */ - cafe->ctl2 |= (1<<27) | (1<<30); - if (mtd->writesize == 2048) - cafe->ctl2 |= (1<<29); + cafe->ctl2 |= (1<<30); } static int cafe_nand_write_page(struct mtd_info *mtd, struct nand_chip *chip,