mtd: spi-nor: wait for SR_WIP to clear on initial unlock
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Thu Mar 24 11:59:11 PDT 2016
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=edf891ef9ab773363f8e58022a26d7d31604aed6
Commit: edf891ef9ab773363f8e58022a26d7d31604aed6
Parent: a8c65d504e0b2256f7672506ae6ea68d88ef020a
Author: Brian Norris <computersforpeace at gmail.com>
AuthorDate: Fri Jan 29 11:25:30 2016 -0800
Committer: Brian Norris <computersforpeace at gmail.com>
CommitDate: Mon Mar 7 18:01:50 2016 -0800
mtd: spi-nor: wait for SR_WIP to clear on initial unlock
Fixup a piece leftover by commit 32321e950d8a ("mtd: spi-nor: wait until
lock/unlock operations are ready"). That commit made us wait for the WIP
bit to settle after lock/unlock operations, but it missed the open-coded
"unlock" that happens at probe() time.
We should probably have this code utilize the unlock() routines in the
future, to avoid duplication, but unfortunately, flash which need to be
unlocked don't all have a proper ->flash_unlock() callback.
Signed-off-by: Brian Norris <computersforpeace at gmail.com>
Cc: Stas Sergeev <stsp at users.sourceforge.net>
Reviewed-by: Ezequiel Garcia <ezequiel at vanguardiasur.com.ar>
Tested-by: Ezequiel Garcia <ezequiel at vanguardiasur.com.ar>
---
drivers/mtd/spi-nor/spi-nor.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
index 03e5e44..a9b3bdf2 100644
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -1193,6 +1193,7 @@ int spi_nor_scan(struct spi_nor *nor, const char *name, enum read_mode mode)
JEDEC_MFR(info) == SNOR_MFR_SST) {
write_enable(nor);
write_sr(nor, 0);
+ spi_nor_wait_till_ready(nor);
}
if (!mtd->name)
More information about the linux-mtd-cvs
mailing list