mtd: spi-nor: disable protection for Winbond flash at startup
In case the flash was locked at boot time. Signed-off-by: Brian Norris <computersforpeace@gmail.com>
This commit is contained in:
parent
357ca38d47
commit
c6fc2171b2
1 changed files with 4 additions and 3 deletions
|
@ -1194,13 +1194,14 @@ int spi_nor_scan(struct spi_nor *nor, const char *name, enum read_mode mode)
|
||||||
mutex_init(&nor->lock);
|
mutex_init(&nor->lock);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Atmel, SST and Intel/Numonyx serial nor tend to power
|
* Atmel, SST, Intel/Numonyx, and others serial NOR tend to power up
|
||||||
* up with the software protection bits set
|
* with the software protection bits set
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (JEDEC_MFR(info) == SNOR_MFR_ATMEL ||
|
if (JEDEC_MFR(info) == SNOR_MFR_ATMEL ||
|
||||||
JEDEC_MFR(info) == SNOR_MFR_INTEL ||
|
JEDEC_MFR(info) == SNOR_MFR_INTEL ||
|
||||||
JEDEC_MFR(info) == SNOR_MFR_SST) {
|
JEDEC_MFR(info) == SNOR_MFR_SST ||
|
||||||
|
JEDEC_MFR(info) == SNOR_MFR_WINBOND) {
|
||||||
write_enable(nor);
|
write_enable(nor);
|
||||||
write_sr(nor, 0);
|
write_sr(nor, 0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue