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
This commit is contained in:
Miquel Raynal 2021-05-05 23:37:43 +02:00
commit e32df79f19
2 changed files with 44 additions and 0 deletions