diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c index 2bfa84100d38b..7095bf8973183 100644 --- a/drivers/mtd/spi-nor/core.c +++ b/drivers/mtd/spi-nor/core.c @@ -2272,6 +2272,9 @@ static int spi_nor_default_setup(struct spi_nor *nor, static int spi_nor_set_addr_width(struct spi_nor *nor) { + if (nor->flags & SNOR_F_HAS_4BAIT) + nor->addr_width = 4; + if (nor->addr_width) { /* already configured from SFDP */ } else if (nor->read_proto == SNOR_PROTO_8_8_8_DTR) { diff --git a/drivers/mtd/spi-nor/sfdp.c b/drivers/mtd/spi-nor/sfdp.c index a5211543d30dc..b2cc3bfe0d5c3 100644 --- a/drivers/mtd/spi-nor/sfdp.c +++ b/drivers/mtd/spi-nor/sfdp.c @@ -1098,7 +1098,6 @@ static int spi_nor_parse_4bait(struct spi_nor *nor, * Spansion memory. However this quirk is no longer needed with new * SFDP compliant memories. */ - nor->addr_width = 4; nor->flags |= SNOR_F_4B_OPCODES | SNOR_F_HAS_4BAIT; /* fall through */