Re: [PATCH 1/5] spi: cadence-xspi: Reconfigure to STIG mode before SPI message

From: Mark Brown

Date: Sat Nov 07 2026 - 07:08:53 EST


> The .transfer_one_message() function uses the STIG mode, therefore the
> xSPI needs to be configured to STIG mode before starting any transfer.
>
> Without this, .transfer_one_message() simply won't work, at least on the
> CN10K SoC.

> @@ -1112,6 +1123,11 @@ static int cdns_xspi_transfer_one_message_b0(struct spi_controller *controller,
> int current_transfer_len;
> int cs = spi_get_chipselect(spi, 0);
> int cs_change = 0;
> + int ret;
> +
> + ret = cdns_xspi_set_stig_mode(cdns_xspi);
> + if (ret)
> + return ret;

If we return an error we need to also set m->status otherwise it'll be
stuck at -EINPROGESS and we will get confused. This is a preexisting
bug in other bits of the function :/

--
Mark Brown <broonie@xxxxxxxxxx>