summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/raw/internals.h
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2020-05-29 13:13:09 +0200
committerMiquel Raynal <miquel.raynal@bootlin.com>2020-06-26 08:35:06 +0200
commit98d6979aa898239ec2faa10467c338a808e1287e (patch)
treec7e638d98c3d96d02e02e6cba79157f597f5d48a /drivers/mtd/nand/raw/internals.h
parentfcaab3b26d2534ec9f227810975ad220823ac578 (diff)
downloadlinux-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.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 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,