[PATCH v4 01/10] memory: ti-aemif: Store timings parameter in number of cycles - 1

Krzysztof Kozlowski krzk at kernel.org
Thu Nov 21 02:26:11 PST 2024


On 15/11/2024 14:26, Bastien Curutchet wrote:
> 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 at bootlin.com>
> ---
>  drivers/memory/ti-aemif.c | 137 ++++++++++++++++++++++----------------
>  1 file changed, 80 insertions(+), 57 deletions(-)
> 
> diff --git a/drivers/memory/ti-aemif.c b/drivers/memory/ti-aemif.c
> index d54dc3cfff73..bd0c49ba1939 100644
> --- a/drivers/memory/ti-aemif.c
> +++ b/drivers/memory/ti-aemif.c
> @@ -80,28 +80,28 @@
>  				ASIZE_MAX)
>  
>  /**
> - * struct aemif_cs_data: structure to hold cs parameters
> + * struct aemif_cs_data: structure to hold CS parameters

You are changing this line in next patch, so just do it there.

Best regards,
Krzysztof



More information about the linux-mtd mailing list