]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mtd: rawnand: davinci: Implement setup_interface() operation
authorBastien Curutchet <bastien.curutchet@bootlin.com>
Wed, 4 Dec 2024 09:43:19 +0000 (10:43 +0100)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Tue, 24 Dec 2024 14:48:00 +0000 (15:48 +0100)
commitc7a94e96f8ece5c87d73bfa4751d75eabb971ea6
treea286a05cf35a19042e7b8f39bfe628700ddf4b71
parenta873eaed31a76979404ab7078d39f9e9324e7a17
mtd: rawnand: davinci: Implement setup_interface() operation

The setup_interface() operation isn't implemented. It forces the driver
to use the ONFI mode 0, though it could use more optimal modes.

Implement the setup_interface() operation. It uses the
aemif_set_cs_timings() function from the AEMIF driver to update the
chip select timings. The calculation of the register's contents is
directly extracted from ยง20.3.2.3 of the DaVinci TRM [1]

MAX_TH_PS and MAX_TSU_PS are the worst case timings based on the
Keystone2 and DaVinci datasheets.

[1] : https://www.ti.com/lit/ug/spruh77c/spruh77c.pdf

Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/nand/raw/davinci_nand.c