OrangePi_CM5/drivers/mtd
Herve Codina 347cc9b4d9 mtd: rawnand: fsmc: Fix timing computation
commit 9472335eaa1452b51dc8e8edaa1a342997cb80c7 upstream.

Under certain circumstances, the timing settings calculated by
the FSMC NAND controller driver were inaccurate.
These settings led to incorrect data reads or fallback to
timing mode 0 depending on the NAND chip used.

The timing computation did not take into account the following
constraint given in SPEAr3xx reference manual:
  twait >= tCEA - (tset * TCLK) + TOUTDEL + TINDEL

Enhance the timings calculation by taking into account this
additional constraint.

This change has no impact on slow timing modes such as mode 0.
Indeed, on mode 0, computed values are the same with and
without the patch.

NANDs which previously stayed in mode 0 because of fallback to
mode 0 can now work at higher speeds and NANDs which were not
working at all because of the corrupted data work at high
speeds without troubles.

Overall improvement on a Micron/MT29F1G08 (flash_speed tool):
                        mode0       mode3
eraseblock write speed  3220 KiB/s  4511 KiB/s
eraseblock read speed   4491 KiB/s  7529 KiB/s

Fixes: d9fb079571 ("mtd: nand: fsmc: add support for SDR timings")
Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20211119150316.43080-5-herve.codina@bootlin.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-12-14 11:32:42 +01:00
..
chips mtd: cfi_cmdset_0002: fix crash when erasing/writing AMD cards 2021-08-26 08:35:33 -04:00
devices
…
hyperbus
…
lpddr
…
maps mtd: maps: fix error return code of physmap_flash_remove() 2021-05-14 09:50:09 +02:00
nand mtd: rawnand: fsmc: Fix timing computation 2021-12-14 11:32:42 +01:00
parsers mtd: partitions: redboot: seek fis-index-block in the right node 2021-07-14 16:56:38 +02:00
spi-nor mtd: spi-nor: hisi-sfc: Remove excessive clk_disable_unprepare() 2021-11-18 14:04:23 +01:00
tests
…
ubi
…
Kconfig
…
Makefile
…
ftl.c
…
inftlcore.c
…
inftlmount.c
…
mtd_blkdevs.c
…
mtdblock.c
…
mtdblock_ro.c
…
mtdchar.c mtd: require write permissions for locking and badblock ioctls 2021-05-14 09:50:13 +02:00
mtdconcat.c mtd: mtdconcat: Check _read, _write callbacks existence before assignment 2021-09-22 12:28:03 +02:00
mtdcore.c mtd: core: don't remove debugfs directory if device is in use 2021-11-18 14:04:23 +01:00
mtdcore.h
…
mtdoops.c
…
mtdpart.c mtd: don't lock when recursively deleting partitions 2021-05-14 09:50:09 +02:00
mtdpstore.c
…
mtdsuper.c
…
mtdswap.c
…
nftlcore.c
…
nftlmount.c
…
rfd_ftl.c
…
sm_ftl.c
…
sm_ftl.h
…
ssfdc.c
…