Skip to content

Commit

Permalink
mtd: spi-nor: spansion: Use nor->addr_nbytes in octal DTR mode in RD_…
Browse files Browse the repository at this point in the history
…ANY_REG_OP

In octal DTR mode, RD_ANY_REG_OP needs to use 4-byte address regardless
of flash's internal address mode. Use nor->addr_nbytes which is set to 4
during setup.

Fixes: eff9604 ("mtd: spi-nor: spansion: add octal DTR support in RD_ANY_REG_OP")
Signed-off-by: Takahiro Kuwano <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Tudor Ambarus <[email protected]>
  • Loading branch information
Kuwano-san authored and ambarus committed Oct 29, 2024
1 parent afe1ea1 commit b61c35e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/mtd/spi-nor/spansion.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ static int cypress_nor_sr_ready_and_clear_reg(struct spi_nor *nor, u64 addr)
int ret;

if (nor->reg_proto == SNOR_PROTO_8_8_8_DTR) {
op.addr.nbytes = nor->addr_nbytes;
op.dummy.nbytes = params->rdsr_dummy;
op.data.nbytes = 2;
}
Expand Down

0 comments on commit b61c35e

Please sign in to comment.