[MTD] NAND: Reset Café controller before initialising.
Fixes http://dev.laptop.org/ticket/237
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
diff --git a/drivers/mtd/nand/cafe.c b/drivers/mtd/nand/cafe.c
index 6bcb430..dd274c8 100644
--- a/drivers/mtd/nand/cafe.c
+++ b/drivers/mtd/nand/cafe.c
@@ -598,6 +598,10 @@
cafe->nand.block_bad = cafe_nand_block_bad;
}
+ /* Start off by resetting the NAND controller completely */
+ writel(1, cafe->mmio + 0x3034);
+ writel(0, cafe->mmio + 0x3034);
+
/* Timings from Marvell's test code (not verified or calculated by us) */
writel(0xffffffff, cafe->mmio + CAFE_NAND_IRQ_MASK);
#if 1