linux-bl808/drivers/mtd/nand/raw
Herve Codina 9472335eaa mtd: rawnand: fsmc: Fix timing computation
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
2021-12-03 14:33:45 +01:00
..
atmel mtd: rawnand: atmel: Make use of the helper function devm_platform_ioremap_resource() 2021-09-14 19:34:30 +02:00
bcm47xxnflash
brcmnand mtd: rawnand: bcm6368: Make use of the helper function devm_platform_ioremap_resource_byname() 2021-09-14 19:34:32 +02:00
gpmi-nand mtd: rawnand: gpmi: Make use of the helper function devm_platform_ioremap_resource_byname() 2021-09-14 19:34:39 +02:00
ingenic
ams-delta.c mtd: rawnand: ams-delta: Keep the driver compatible with on-die ECC engines 2021-10-15 12:21:14 +02:00
arasan-nand-controller.c mtd: rawnand: arasan: Prevent an unsupported configuration 2021-10-15 12:24:54 +02:00
au1550nd.c mtd: rawnand: au1550nd: Keep the driver compatible with on-die ECC engines 2021-10-15 12:21:16 +02:00
cadence-nand-controller.c
cafe_nand.c mtd: rawnand: cafe: Fix a resource leak in the error handling path of 'cafe_nand_probe()' 2021-08-23 10:58:14 +02:00
cs553x_nand.c Revert "mtd: rawnand: cs553x: Fix external use of SW Hamming ECC helper" 2021-10-15 12:21:11 +02:00
davinci_nand.c
denali.c
denali.h
denali_dt.c mtd: rawnand: denali: Make use of the helper function devm_platform_ioremap_resource_byname() 2021-09-14 19:34:34 +02:00
denali_pci.c
diskonchip.c
fsl_elbc_nand.c
fsl_ifc_nand.c
fsl_upm.c
fsmc_nand.c mtd: rawnand: fsmc: Fix timing computation 2021-12-03 14:33:45 +01:00
gpio.c mtd: rawnand: gpio: Keep the driver compatible with on-die ECC engines 2021-10-15 12:21:18 +02:00
hisi504_nand.c mtd: rawnand: hisi504: Make use of the helper function devm_platform_ioremap_resource() 2021-09-14 19:34:41 +02:00
intel-nand-controller.c mtd: rawnand: intel: Fix potential buffer overflow in probe 2021-09-14 19:35:08 +02:00
internals.h
Kconfig mtd: rawnand: denali: Add the dependency on HAS_IOMEM 2021-12-03 14:33:43 +01:00
lpc32xx_mlc.c
lpc32xx_slc.c Revert "mtd: rawnand: lpc32xx_slc: Fix external use of SW Hamming ECC helper" 2021-10-15 12:21:09 +02:00
Makefile
marvell_nand.c
meson_nand.c mtd: rawnand: remove never changed ret variable 2021-08-06 22:01:56 +02:00
mpc5121_nfc.c mtd: rawnand: mpc5121: Keep the driver compatible with on-die ECC engines 2021-10-15 12:21:20 +02:00
mtk_ecc.c mtd: rawnand: mtk_ecc: Make use of the helper function devm_platform_ioremap_resource() 2021-09-14 19:34:46 +02:00
mtk_ecc.h
mtk_nand.c mtd: rawnand: mtk: Make use of the helper function devm_platform_ioremap_resource() 2021-09-14 19:34:44 +02:00
mxc_nand.c
mxic_nand.c
nand_amd.c
nand_base.c mtd: rawnand: Fix nand_choose_best_timings() on unsupported interface 2021-12-03 14:33:44 +01:00
nand_bbt.c mtd: rawnand: nand_bbt: Skip bad blocks when searching for the BBT in NAND 2021-07-16 01:06:22 +02:00
nand_esmt.c
nand_hynix.c mtd: rawnand: hynix: Add support for H27UCG8T2ETR-BC MLC NAND 2021-10-15 12:24:50 +02:00
nand_ids.c mtd: rawnand: hynix: Add support for H27UCG8T2ETR-BC MLC NAND 2021-10-15 12:24:50 +02:00
nand_jedec.c
nand_legacy.c
nand_macronix.c
nand_micron.c
nand_onfi.c
nand_samsung.c
nand_timings.c
nand_toshiba.c
nandsim.c
ndfc.c Revert "mtd: rawnand: ndfc: Fix external use of SW Hamming ECC helper" 2021-10-15 12:21:07 +02:00
omap2.c mtd: rawnand: omap: Fix kernel doc warning on 'calcuate' typo 2021-08-06 22:01:56 +02:00
omap_elm.c mtd: rawnand: omap_elm: Make use of the helper function devm_platform_ioremap_resource() 2021-09-14 19:34:49 +02:00
orion_nand.c mtd: rawnand: orion: Keep the driver compatible with on-die ECC engines 2021-10-15 12:21:22 +02:00
oxnas_nand.c mtd: rawnand: oxnas: Make use of the helper function devm_platform_ioremap_resource() 2021-09-14 19:34:51 +02:00
pasemi_nand.c mtd: rawnand: pasemi: Keep the driver compatible with on-die ECC engines 2021-10-15 12:21:24 +02:00
pl35x-nand-controller.c
plat_nand.c mtd: rawnand: plat_nand: Keep the driver compatible with on-die ECC engines 2021-10-15 12:21:26 +02:00
qcom_nandc.c mtd: rawnand: qcom: Update code word value for raw read 2021-09-14 19:36:00 +02:00
r852.c
r852.h
rockchip-nand-controller.c
s3c2410.c
sh_flctl.c
sharpsl.c Revert "mtd: rawnand: sharpsl: Fix external use of SW Hamming ECC helper" 2021-10-15 12:21:05 +02:00
sm_common.c
sm_common.h
socrates_nand.c mtd: rawnand: socrates: Keep the driver compatible with on-die ECC engines 2021-10-15 12:21:29 +02:00
stm32_fmc2_nand.c mtd: rawnand: stm32_fmc2: Make use of the helper function devm_platform_ioremap_resource() 2021-09-14 19:34:56 +02:00
sunxi_nand.c
tegra_nand.c mtd: rawnand: tegra: Make use of the helper function devm_platform_ioremap_resource() 2021-09-14 19:34:59 +02:00
tmio_nand.c Revert "mtd: rawnand: tmio: Fix external use of SW Hamming ECC helper" 2021-10-15 12:21:03 +02:00
txx9ndfmc.c Revert "mtd: rawnand: txx9ndfmc: Fix external use of SW Hamming ECC helper" 2021-10-15 12:21:01 +02:00
vf610_nfc.c mtd: rawnand: vf610: Make use of the helper function devm_platform_ioremap_resource() 2021-09-14 19:35:03 +02:00
xway_nand.c mtd: rawnand: xway: Keep the driver compatible with on-die ECC engines 2021-10-15 12:21:31 +02:00