]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: rawnand: add default values for dynamic timings
authorMiquel Raynal <miquel.raynal@bootlin.com>
Sat, 14 Jul 2018 10:23:54 +0000 (12:23 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Thu, 19 Jul 2018 21:14:13 +0000 (23:14 +0200)
commit3cf86b02d7db05961aae9fd9d5270207946fca7c
treefdbec8192f90f54eedd70a22ba2c69d3e641741f
parentbb2c7e3cf47ebbfe77582c9625efd15a6e96dc1f
mtd: rawnand: add default values for dynamic timings

Some timings like tBERS (block erase time), tCCs (change column setup
time), tPROG (page program time) and tR (page read time) are derived
from the ONFI parameter page. They are set in the SDR interface only
if the chip is ONFI compliant.

It makes these timings unreliable and prevent the driver to use one of
these four values with a non-ONFI chip.

Fix this situation by taking the highest possible value (or a default
one) value for each missing timing (stored as unsigned 16-bit entries in
the parameter page).

This makes tBERS and tPROG being ~65ms while typical values are at most
a few milliseconds. As these are timeouts, it is not impacting at all
the performances in nominal use.

tR maximum time and tCCS minimum time (delay to wait after a change
column) are set, according to the ONFI specification, to default 'slow'
values; respectively 200us and 500ns.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/nand/raw/nand_timings.c