ath79: cfi: cmdset_0002: amd chip 0x2201 - write words
authorMauri Sandberg <sandberg@mailfence.com>
Mon, 14 Sep 2020 19:45:15 +0000 (22:45 +0300)
committerPetr Štetiar <ynezz@true.cz>
Sat, 27 Mar 2021 06:46:48 +0000 (07:46 +0100)
commit8e8fe69a8ef118476def263da11ee0d3c3a7ee19
treec98c65350b31a8f1d2fd386ae687d6fd9758174a
parentb526fbb1ce100c248c8e89b84afc101103e94d7d
ath79: cfi: cmdset_0002: amd chip 0x2201 - write words

Generally, in upstream CFI flash memory driver uses buffers for write
operations. That does not work with AMD chip with id 0x2201 and we must
resort to writing word sized chunks only. That is, to not apply general
buffer write functionality for this given chip.

Without the patch kernel logs will be flooded with entries like below:

MTD do_erase_oneblock(): ERASE 0x01fa0000
MTD do_write_buffer(): WRITE 0x01fa0000(0x00001985)
MTD do_erase_oneblock(): ERASE 0x01f80000
MTD do_write_buffer(): WRITE 0x01f80000(0x00001985)
MTD do_write_buffer_wait(): software timeout, address:0x01f8000a.
jffs2: Write clean marker to block at 0x01a60000 failed: -5
MTD do_erase_oneblock(): ERASE 0x01f60000
MTD do_write_buffer(): WRITE 0x01f60000(0x00001985)
MTD do_write_buffer_wait(): software timeout, address:0x01f6000a.
jffs2: Write clean marker to block at 0x01a40000 failed: -5

References: http://patchwork.ozlabs.org/project/linux-mtd/patch/20210309174859.362060-1-sandberg@mailfence.com/
Signed-off-by: Mauri Sandberg <sandberg@mailfence.com>
[added link to usptream fix submission]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit 8cc0fa8faceadac85353bb1a96e074518ef124e2)
target/linux/ath79/patches-5.4/471-mtd-cfi_cmdset_0002-AMD-chip-0x2201-write-words.patch [new file with mode: 0644]