]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: rawnand: Add onfi_fill_nvddr_interface_config() helper
authorMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 5 May 2021 21:37:39 +0000 (23:37 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 26 May 2021 08:43:50 +0000 (10:43 +0200)
commit54099db3c7d465e9926391aa1c804e42013dc6f2
tree0f74a64abde89083cf47fb09b40c240374120a14
parentaef49d8aefc1ef349d0f2704dcf42cdb45d1f7e4
mtd: rawnand: Add onfi_fill_nvddr_interface_config() helper

Same logic as for the SDR path, let's create a
onfi_fill_nvddr_interface_config() helper to fill an interface
configuration structure with NV-DDR timings, given a specific ONFI mode.

There is one additional thing to do compared to SDR mode: tCAD timing
can be fast or slow and this depends on an ONFI parameter page bit. By
default the slow value is declared in the timings structure definition,
but this helper can shrink it down if necessary.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20210505213750.257417-12-miquel.raynal@bootlin.com
drivers/mtd/nand/raw/nand_onfi.c
drivers/mtd/nand/raw/nand_timings.c
include/linux/mtd/onfi.h