Re: [PATCH 4/4] spi: qup: Vote for interconnect bandwidth to DRAM

From: Stephan Gerhold
Date: Wed Sep 13 2023 - 05:26:27 EST


On Tue, Sep 12, 2023 at 04:30:39PM +0200, Stephan Gerhold wrote:
> When the SPI QUP controller is used together with a DMA engine it needs
> to vote for the interconnect path to the DRAM. Otherwise it may be
> unable to access the memory quickly enough.

I realized that I argue here that the interconnect vote is for DMA to
DRAM...

> [...]
> @@ -675,6 +698,12 @@ static int spi_qup_io_prep(struct spi_device *spi, struct spi_transfer *xfer)
> return -EIO;
> }
>
> + ret = spi_qup_vote_bw(controller, xfer->speed_hz);
> + if (ret) {
> + dev_err(controller->dev, "fail to vote for ICC bandwidth: %d\n", ret);
> + return -EIO;
> + }
> +

... but here I vote for the bandwidth even if PIO is used instead of DMA.

I think it would be more logical to only do the bandwidth vote in the
DMA setup path. I'll fix this in v2.

Thanks,
Stephan