提交 edf891ef 编写于 作者: B Brian Norris

mtd: spi-nor: wait for SR_WIP to clear on initial unlock

Fixup a piece leftover by commit 32321e95 ("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: NBrian Norris <computersforpeace@gmail.com>
Cc: Stas Sergeev <stsp@users.sourceforge.net>
Reviewed-by: NEzequiel Garcia <ezequiel@vanguardiasur.com.ar>
Tested-by: NEzequiel Garcia <ezequiel@vanguardiasur.com.ar>
上级 a8c65d50
...@@ -1193,6 +1193,7 @@ int spi_nor_scan(struct spi_nor *nor, const char *name, enum read_mode mode) ...@@ -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) { JEDEC_MFR(info) == SNOR_MFR_SST) {
write_enable(nor); write_enable(nor);
write_sr(nor, 0); write_sr(nor, 0);
spi_nor_wait_till_ready(nor);
} }
if (!mtd->name) if (!mtd->name)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册