mtd: spi-nor: spansion: preserve CFR2V[7] when writing MEMLAT
authorTakahiro Kuwano <Takahiro.Kuwano@infineon.com>
Wed, 26 Jul 2023 07:52:48 +0000 (10:52 +0300)
committerTudor Ambarus <tudor.ambarus@linaro.org>
Wed, 26 Jul 2023 09:39:10 +0000 (12:39 +0300)
commit1e611e104b9acb6310b8c684d5acee0e11ca7bd1
tree32ee8fb5bf7f938b89eff8e9f3a712674c9604a7
parentd534fd9787d5925d9637752410e3ea92ca7f4cfa
mtd: spi-nor: spansion: preserve CFR2V[7] when writing MEMLAT

CFR2V[7] is assigned to Flash's address mode (3- or 4-ybte) and must not
be changed when writing MEMLAT (CFR2V[3:0]). CFR2V shall be used in a read,
update, write back fashion.

Fixes: c3266af101f2 ("mtd: spi-nor: spansion: add support for Cypress Semper flash")
Signed-off-by: Takahiro Kuwano <Takahiro.Kuwano@infineon.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20230726075257.12985-3-tudor.ambarus@linaro.org
Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
drivers/mtd/spi-nor/spansion.c