]> asedeno.scripts.mit.edu Git - linux.git/commit
mtd: spi-nor: Drop spansion_quad_enable()
authorTudor Ambarus <tudor.ambarus@microchip.com>
Sat, 2 Nov 2019 11:23:39 +0000 (11:23 +0000)
committerTudor Ambarus <tudor.ambarus@microchip.com>
Thu, 7 Nov 2019 06:18:26 +0000 (08:18 +0200)
commit6011b484f1647f2a944c87c31b2adee2a7c47f58
tree1aa2f8779ec5a407f0864858f20b0790b9b62e24
parent78f1ddf7bb6ee77815e8d91275356b453524140c
mtd: spi-nor: Drop spansion_quad_enable()

Drop the default spansion_quad_enable() method and replace it with
spansion_read_cr_quad_enable().

The function was buggy, it didn't care about the previous values
of the Status and Configuration Registers. spansion_read_cr_quad_enable()
is a Read-Modify-Write-Check function that keeps track of what were
the previous values of the Status and Configuration Registers.

In terms of instruction types sent to the flash, the only difference
between the spansion_quad_enable() and spansion_read_cr_quad_enable()
is that the later calls spi_nor_read_sr(). We can safely assume that all
flashes support spi_nor_read_sr(), because all flashes call it in
spi_nor_sr_ready(). The transition from spansion_quad_enable() to
spansion_read_cr_quad_enable() will not affect anybody, drop the buggy
code.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Reviewed-by: Vignesh Raghavendra <vigneshr@ti.com>
drivers/mtd/spi-nor/spi-nor.c