Skip to content

Commit

Permalink
mtd: spi-nor: wait for SR_WIP to clear on initial unlock
Browse files Browse the repository at this point in the history
Fixup a piece leftover by commit 32321e9 ("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@gmail.com>
Cc: Stas Sergeev <stsp@users.sourceforge.net>
Reviewed-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Tested-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
  • Loading branch information
Brian Norris committed Mar 8, 2016
1 parent a8c65d5 commit edf891e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/mtd/spi-nor/spi-nor.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit edf891e

Please sign in to comment.