Revert "mtd: spi-nor: macronix: Add support for mx25l51245g"
authorTudor Ambarus <tudor.ambarus@microchip.com>
Fri, 2 Apr 2021 08:20:30 +0000 (11:20 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 May 2021 12:47:13 +0000 (14:47 +0200)
commitcb5305ac5bac21ec9ff3aadd7c9ca2142bc64c90
treead0472cc38b4e32e7f400ac1e3cf0f168cd9ab5b
parent2e41cc10660e315bc3a8162ba9c7b7c0b4e3cea3
Revert "mtd: spi-nor: macronix: Add support for mx25l51245g"

commit 46094049a49be777f12a9589798f7c70b90cd03f upstream.

This reverts commit 04b8edad262eec0d153005973dfbdd83423c0dcb.

mx25l51245g and mx66l51235l have the same flash ID. The flash
detection returns the first entry in the flash_info array that
matches the flash ID that was read, thus for the 0xc2201a ID,
mx25l51245g was always hit, introducing a regression for
mx66l51235l.

If one wants to differentiate the flash names, a better fix would be
to differentiate between the two at run-time, depending on SFDP,
and choose the correct name from a list of flash names, depending on
the SFDP differentiator.

Fixes: 04b8edad262e ("mtd: spi-nor: macronix: Add support for mx25l51245g")
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Acked-by: Pratyush Yadav <p.yadav@ti.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20210402082031.19055-2-tudor.ambarus@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mtd/spi-nor/macronix.c