]> www.infradead.org Git - users/jedix/linux-maple.git/commit
memory: ti-aemif: Store timings parameter in number of cycles - 1
authorBastien Curutchet <bastien.curutchet@bootlin.com>
Wed, 4 Dec 2024 09:43:11 +0000 (10:43 +0100)
committerKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Mon, 9 Dec 2024 19:34:36 +0000 (20:34 +0100)
commit1ec0fa90070c9468d22b3c3ea5f4bd6c27810907
tree352e518a9ff96eb3862d1de1791b6d085b7cbf75
parent40384c840ea1944d7c5a392e8975ed088ecf0b37
memory: ti-aemif: Store timings parameter in number of cycles - 1

The CS configuration register expects timings to be expressed in
'number of cycles - 1' but they are stored in ns in the struct
aemif_cs_data. So at init, the timings currently set are converted to ns
by aemif_get_hw_params(), updated with values from the device-tree
properties, and then converted back to 'number of cycles - 1' before
being applied.

Store the timings directly in 'number of cycles - 1' instead of
nanoseconds.
Perform the conversion from nanosecond during the device-tree parsing.
Remove aemif_cycles_to_nsec() as it isn't used anymore.

Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/r/20241204094319.1050826-2-bastien.curutchet@bootlin.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
drivers/memory/ti-aemif.c