summaryrefslogtreecommitdiff
path: root/drivers/mtd/nand/raw/internals.h
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2021-05-05 23:37:43 +0200
committerMiquel Raynal <miquel.raynal@bootlin.com>2021-05-26 10:43:59 +0200
commite32df79f19c756f072bd517ece65df1efd496f95 (patch)
tree8fabd205d8a89f0fe7516812cd6afe5b6ecc400b /drivers/mtd/nand/raw/internals.h
parent09cdb237c3c8773921a7c265ce1cdd23818a3f14 (diff)
mtd: rawnand: Add a helper to find the closest ONFI NV-DDR mode
Introduce a similar helper to onfi_find_closest_sdr_mode(), but for NV-DDR timings. It just takes a timing structure as parameter and returns the closest mode by comparing all minimum timings. This is useful for rigid controllers on which tuning the timings is not possible. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20210505213750.257417-16-miquel.raynal@bootlin.com
Diffstat (limited to 'drivers/mtd/nand/raw/internals.h')
-rw-r--r--drivers/mtd/nand/raw/internals.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mtd/nand/raw/internals.h b/drivers/mtd/nand/raw/internals.h
index 012876e14317..c06bc2f1aaa2 100644
--- a/drivers/mtd/nand/raw/internals.h
+++ b/drivers/mtd/nand/raw/internals.h
@@ -90,6 +90,8 @@ void onfi_fill_interface_config(struct nand_chip *chip,
unsigned int timing_mode);
unsigned int
onfi_find_closest_sdr_mode(const struct nand_sdr_timings *spec_timings);
+unsigned int
+onfi_find_closest_nvddr_mode(const struct nand_nvddr_timings *spec_timings);
int nand_choose_best_sdr_timings(struct nand_chip *chip,
struct nand_interface_config *iface,
struct nand_sdr_timings *spec_timings);