mtd: spi-nor: spansion: Consider reserved bits in CFR5 register
authorTudor Ambarus <tudor.ambarus@linaro.org>
Tue, 10 Jan 2023 16:47:02 +0000 (18:47 +0200)
committerTudor Ambarus <tudor.ambarus@linaro.org>
Thu, 26 Jan 2023 17:40:31 +0000 (19:40 +0200)
commit3f592a869f87723314f0cb1ac232bd3bf8245be8
tree883a247a312dc16a8601ed7e741ec6070952e4e2
parent25e3f30601a368642678744fc8a9b1dce183c7bc
mtd: spi-nor: spansion: Consider reserved bits in CFR5 register

CFR5[6] is reserved bit and must be always 1. Set it to comply with flash
requirements. While fixing SPINOR_REG_CYPRESS_CFR5V_OCT_DTR_{EN, DS}
definition, stop using magic numbers and describe the missing bit fields
in CFR5 register. This is useful for both readability and future possible
addition of Octal STR mode support.

Fixes: c3266af101f2 ("mtd: spi-nor: spansion: add support for Cypress Semper flash")
Cc: stable@vger.kernel.org
Reported-by: Takahiro Kuwano <Takahiro.Kuwano@infineon.com>
Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
Reviewed-by: Pratyush Yadav <ptyadav@amazon.de>
Tested-by: Dhruva Gole <d-gole@ti.com>
Link: https://lore.kernel.org/linux-mtd/20230110164703.83413-1-tudor.ambarus@linaro.org
drivers/mtd/spi-nor/spansion.c