mtd: bcm47xxnflash: NAND_CMD_RESET support
authorRafał Miłecki <zajec5@gmail.com>
Tue, 19 Aug 2014 07:14:16 +0000 (09:14 +0200)
committerBrian Norris <computersforpeace@gmail.com>
Thu, 18 Sep 2014 06:25:01 +0000 (23:25 -0700)
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/nand/bcm47xxnflash/ops_bcm4706.c

index 30df67a914b241ab53be2b321108cf883894e56c..82844efcf18963bcae6f635bf4a0f89095b371f4 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/slab.h>
+#include <linux/delay.h>
 #include <linux/bcma/bcma.h>
 
 /* Broadcom uses 1'000'000 but it seems to be too many. Tests on WNDR4500 has
@@ -226,7 +227,10 @@ static void bcm47xxnflash_ops_bcm4706_cmdfunc(struct mtd_info *mtd,
 
        switch (command) {
        case NAND_CMD_RESET:
-               pr_warn("Chip reset not implemented yet\n");
+               nand_chip->cmd_ctrl(mtd, command, NAND_CTRL_CLE);
+
+               ndelay(100);
+               nand_wait_ready(mtd);
                break;
        case NAND_CMD_READID:
                ctlcode = NCTL_CSA | 0x01000000 | NCTL_CMD1W | NCTL_CMD0;