diff options
author | Takahiro Kuwano <Takahiro.Kuwano@infineon.com> | 2023-04-06 15:17:44 +0900 |
---|---|---|
committer | Tudor Ambarus <tudor.ambarus@linaro.org> | 2023-04-08 09:28:37 +0300 |
commit | 9fd0945fe6fadfb6b54a9cd73be101c02b3e8134 (patch) | |
tree | 2773267e3f06f4e14861812524096d8a51e8747a /drivers/mtd/spi-nor/debugfs.c | |
parent | c87c9b11c53cecab8e8a93290fa3b488e6838dab (diff) | |
download | linux-9fd0945fe6fadfb6b54a9cd73be101c02b3e8134.tar.gz linux-9fd0945fe6fadfb6b54a9cd73be101c02b3e8134.tar.bz2 linux-9fd0945fe6fadfb6b54a9cd73be101c02b3e8134.zip |
mtd: spi-nor: spansion: Enable JFFS2 write buffer for Infineon s28hx SEMPER flash
Infineon(Cypress) SEMPER NOR flash family has on-die ECC and its program
granularity is 16-byte ECC data unit size. JFFS2 supports write buffer
mode for ECC'd NOR flash. Provide a way to clear the MTD_BIT_WRITEABLE
flag in order to enable JFFS2 write buffer mode support.
A new SNOR_F_ECC flag is introduced to determine if the part has on-die
ECC and if it has, MTD_BIT_WRITEABLE is unset.
In vendor specific driver, a common cypress_nor_ecc_init() helper is
added. This helper takes care for ECC related initialization for SEMPER
flash family by setting up params->writesize and SNOR_F_ECC.
Fixes: c3266af101f2 ("mtd: spi-nor: spansion: add support for Cypress Semper flash")
Suggested-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Signed-off-by: Takahiro Kuwano <Takahiro.Kuwano@infineon.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/d586723f6f12aaff44fbcd7b51e674b47ed554ed.1680760742.git.Takahiro.Kuwano@infineon.com
Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Diffstat (limited to 'drivers/mtd/spi-nor/debugfs.c')
-rw-r--r-- | drivers/mtd/spi-nor/debugfs.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mtd/spi-nor/debugfs.c b/drivers/mtd/spi-nor/debugfs.c index e200f5b9234c..082c0c5a8626 100644 --- a/drivers/mtd/spi-nor/debugfs.c +++ b/drivers/mtd/spi-nor/debugfs.c @@ -26,6 +26,7 @@ static const char *const snor_f_names[] = { SNOR_F_NAME(SOFT_RESET), SNOR_F_NAME(SWP_IS_VOLATILE), SNOR_F_NAME(RWW), + SNOR_F_NAME(ECC), }; #undef SNOR_F_NAME |