Re: [PATCH v2 8/8] spi: cadence-xspi: add ACMD mode support

From: Mark Brown

Date: Thu Nov 19 2026 - 11:33:05 EST


> So far every operation goes through STIG mode, where the CPU builds
> each command and drains the data. The controller also has an auto
> command (ACMD) mode where it runs a whole read sequence on its own and,
> with the internal DMA, writes the data straight to memory.

> }
> @@ -710,6 +921,10 @@ static int cdns_xspi_adjust_mem_op_size(struct spi_mem *mem, struct spi_mem_op *
> struct cdns_xspi_dev *cdns_xspi =
> spi_controller_get_devdata(mem->spi->controller);
>
> + /* The ACMD transfer length is a full 32-bit field, so no limit */
> + if (cdns_xspi_acmd_can_read(cdns_xspi, op))
> + return 0;

This needs to limit to dma_max_mapping_size(cdns_xspi->dev) as well, an
IOMMU or something could limit things.

--
Mark Brown <broonie@xxxxxxxxxx>