mtd: bcm47xxnflash: NAND_CMD_RESET support

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Wed Oct 15 23:59:07 PDT 2014


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=dfbd7dda0b8dc0bb2b255d173f4e8ffbe24c5764
Commit:     dfbd7dda0b8dc0bb2b255d173f4e8ffbe24c5764
Parent:     90de63324f0abc84f8c1ba56b2848c338cfda1cd
Author:     Rafał Miłecki <zajec5 at gmail.com>
AuthorDate: Tue Aug 19 09:14:16 2014 +0200
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Wed Sep 17 23:25:01 2014 -0700

    mtd: bcm47xxnflash: NAND_CMD_RESET support
    
    Signed-off-by: Rafał Miłecki <zajec5 at gmail.com>
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 drivers/mtd/nand/bcm47xxnflash/ops_bcm4706.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/bcm47xxnflash/ops_bcm4706.c b/drivers/mtd/nand/bcm47xxnflash/ops_bcm4706.c
index 30df67a..82844ef 100644
--- a/drivers/mtd/nand/bcm47xxnflash/ops_bcm4706.c
+++ b/drivers/mtd/nand/bcm47xxnflash/ops_bcm4706.c
@@ -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;



More information about the linux-mtd-cvs mailing list