PATCH: at91_nand rdy_pin fix

Ivan Kuten ivan.kuten at promwad.com
Wed May 23 17:53:14 EDT 2007


Hello,

The patch below fixes nand driver for AT91 boards which do not have NAND R/B signal
connected to gpio (rdy_pin is not connected).

Patch is against 2.6.22-rc1 + corresponding at91 patch from maxim.org.za

Best regards, Ivan

Signed-off-by: Ivan Kuten <ivan.kuten at promwad.com>

---

diff -urN linux.orig/drivers/mtd/nand/at91_nand.c linux/drivers/mtd/nand/at91_nand.c
--- linux.orig/drivers/mtd/nand/at91_nand.c     2007-05-24 00:19:57 +0300
+++ linux/drivers/mtd/nand/at91_nand.c  2007-05-24 00:10:01 +0300
@@ -128,7 +128,12 @@
        nand_chip->IO_ADDR_R = host->io_base;
        nand_chip->IO_ADDR_W = host->io_base;
        nand_chip->cmd_ctrl = at91_nand_cmd_ctrl;
-       nand_chip->dev_ready = at91_nand_device_ready;
+
+       if (host->board->rdy_pin)
+               nand_chip->dev_ready = at91_nand_device_ready;
+       else
+               nand_chip->dev_ready = NULL;
+
        nand_chip->ecc.mode = NAND_ECC_SOFT;    /* enable ECC */
        nand_chip->chip_delay = 20;             /* 20us command delay time */







More information about the linux-mtd mailing list