Commit da2ef812 authored by Michael Walle's avatar Michael Walle Committed by Miquel Raynal
Browse files

mtd: spi-nor: Fix quad enable for Spansion like flashes



The commit 7b678c69 ("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: 7b678c69 ("mtd: spi-nor: Merge spansion Quad Enable methods")
Signed-off-by: default avatarMichael Walle <michael@walle.cc>
Reviewed-by: default avatarTudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
parent 440b6d50
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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]);
}