Skip to content

Commit

Permalink
mtd: spi-nor: Fix quad enable for Spansion like flashes
Browse files Browse the repository at this point in the history
The commit 7b678c6 ("mtd: spi-nor: Merge spansion Quad Enable
methods") forgot to actually set the QE bit in some cases. Thus this
breaks quad mode accesses to flashes which support readback of the
status register-2. Fix it.

Fixes: 7b678c6 ("mtd: spi-nor: Merge spansion Quad Enable methods")
Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
  • Loading branch information
Michael Walle authored and Miquel Raynal committed Jan 17, 2020
1 parent 440b6d5 commit da2ef81
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/mtd/spi-nor/spi-nor.c
Original file line number Diff line number Diff line change
Expand Up @@ -2124,6 +2124,8 @@ static int spi_nor_sr2_bit1_quad_enable(struct spi_nor *nor)
if (nor->bouncebuf[0] & SR2_QUAD_EN_BIT1)
return 0;

nor->bouncebuf[0] |= SR2_QUAD_EN_BIT1;

return spi_nor_write_16bit_cr_and_check(nor, nor->bouncebuf[0]);
}

Expand Down

0 comments on commit da2ef81

Please sign in to comment.