Re: [PATCH v3 17/27] spi: zynqmp-gqspi: Support per spi-mem operation frequency switches

From: Sean Anderson
Date: Thu Jan 16 2025 - 18:44:20 EST


> Every ->exec_op() call correctly configures the spi bus speed to the
> maximum allowed frequency for the memory using the constant spi default
> parameter. Since we can now have per-operation constraints, let's use
> the value that comes from the spi-mem operation structure instead. In
> case there is no specific limitation for this operation, the default spi
> device value will be given anyway.
>
> The per-operation frequency capability is thus advertised to the spi-mem
> core.
>
> Cc: Michal Simek <michal.simek@xxxxxxx>
> Signed-off-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx>
> ---
> drivers/spi/spi-zynqmp-gqspi.c | 13 +++++++++----
> 1 file changed, 9 insertions(+), 4 deletions(-)

Reviewed-by: Sean Anderson <sean.anderson@xxxxxxxxx>

But this will conflict with [1]. Do you think you could add that to your
series? With that patch, you'd have something like

- zynqmp_qspi_config_op(xqspi, mem->spi->max_speed_hz);
+ zynqmp_qspi_config_op(xqspi, op->max_freq);

instead. I can send that patch by itself if it would make things easier
for you.

--Sean

[1] https://lore.kernel.org/linux-spi/20250116232118.2694169-3-sean.anderson@xxxxxxxxx/