diff options
author | Miquel Raynal <miquel.raynal@bootlin.com> | 2020-05-29 13:13:09 +0200 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2020-06-26 08:35:06 +0200 |
commit | 98d6979aa898239ec2faa10467c338a808e1287e (patch) | |
tree | c7e638d98c3d96d02e02e6cba79157f597f5d48a /drivers/mtd/nand/raw/internals.h | |
parent | fcaab3b26d2534ec9f227810975ad220823ac578 (diff) | |
download | linux-98d6979aa898239ec2faa10467c338a808e1287e.tar.bz2 |
mtd: rawnand: timings: Add a helper to find the closest ONFI mode
Vendors are allowed to provide their own set of timings. In this case,
we provide a way to derive the "closest" timing mode so that, if the
NAND controller does not support tweaking these parameters, it will be
able to configure itself anyway.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Link: https://lore.kernel.org/linux-mtd/20200529111322.7184-16-miquel.raynal@bootlin.com
Diffstat (limited to 'drivers/mtd/nand/raw/internals.h')
-rw-r--r-- | drivers/mtd/nand/raw/internals.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mtd/nand/raw/internals.h b/drivers/mtd/nand/raw/internals.h index bd10ec92f04a..f851ed210d70 100644 --- a/drivers/mtd/nand/raw/internals.h +++ b/drivers/mtd/nand/raw/internals.h @@ -88,6 +88,8 @@ int onfi_fill_data_interface(struct nand_chip *chip, struct nand_data_interface *iface, enum nand_data_interface_type type, unsigned int timing_mode); +unsigned int +onfi_find_closest_sdr_mode(const struct nand_sdr_timings *spec_timings); int nand_get_features(struct nand_chip *chip, int addr, u8 *subfeature_param); int nand_set_features(struct nand_chip *chip, int addr, u8 *subfeature_param); int nand_read_page_raw_notsupp(struct nand_chip *chip, u8 *buf, |