On 28.09.26 01:57, Mikhail Kshevetskiy wrote:
> This makes code more generic. Also it allows check for DTR support
> and emit DTR operations only if it supported by the spi controller.
> 
> This is necessary for spinand DTR support.

Could you mention the corresponding Linux commits here, or if possible
pick them directly with U-Boot-specific changes included?

> 
> Signed-off-by: Mikhail Kshevetskiy <[email protected]>
> ---
>  drivers/spi/atmel-quadspi.c |  5 +++
>  drivers/spi/cadence_qspi.c  | 10 +++---
>  drivers/spi/nxp_xspi.c      | 12 +++++---
>  drivers/spi/spi-mem.c       | 61 ++++++++++++++++++++-----------------
>  include/spi-mem.h           | 19 ++++++++++--
>  include/spi.h               |  1 +
>  6 files changed, 68 insertions(+), 40 deletions(-)
> 
> diff --git a/drivers/spi/atmel-quadspi.c b/drivers/spi/atmel-quadspi.c
> index b2b96e1c4b9..37d97c094f8 100644
> --- a/drivers/spi/atmel-quadspi.c
> +++ b/drivers/spi/atmel-quadspi.c
> @@ -1286,11 +1286,16 @@ static const struct spi_controller_mem_ops 
> atmel_qspi_mem_ops = {
>       .exec_op = atmel_qspi_exec_op,
>  };
>  
> +static const struct spi_controller_mem_ops atmel_qspi_mem_caps = {

This should be struct spi_controller_mem_caps instead of
spi_controller_mem_ops, I guess.

> +     .dtr = true,

Anyway, the Linux driver doesn't set mem_caps and doesn't enable DTR. I
think it should stay disable here, too.

> +};
> +
>  static const struct dm_spi_ops atmel_qspi_ops = {
>       .claim_bus = atmel_qspi_claim_bus,
>       .release_bus = atmel_qspi_release_bus,
>       .xfer = atmel_qspi_xfer,
>       .mem_ops = &atmel_qspi_mem_ops,
> +     .mem_caps = &atmel_qspi_mem_caps,
>       .set_speed = atmel_qspi_set_speed,
>       .set_mode = atmel_qspi_set_mode,
>  };

[...]

Reply via email to