]> www.infradead.org Git - users/jedix/linux-maple.git/commit
spi: qup: Vote for interconnect bandwidth to DRAM
authorStephan Gerhold <stephan.gerhold@kernkonzept.com>
Tue, 19 Sep 2023 11:59:51 +0000 (13:59 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 25 Sep 2023 12:19:38 +0000 (14:19 +0200)
commitecdaa9473019f94e0ad6974a5f69b9be7de137d3
tree9b292d36bcae4c7ba57ebb8225d6fee02017b705
parentd15befc0cef42db7712714157d9483cab81149a1
spi: qup: Vote for interconnect bandwidth to DRAM

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.

The requested peak bandwidth is dependent on the SPI core/bus clock so
that the bandwidth scales together with the selected SPI speed.

To avoid sending votes too often the bandwidth is always requested when
a DMA transfer starts, but dropped only on runtime suspend. Runtime
suspend should only happen if no transfer is active. After resumption we
can defer the next vote until the first DMA transfer actually happens.

Signed-off-by: Stephan Gerhold <stephan.gerhold@kernkonzept.com>
Link: https://lore.kernel.org/r/20230919-spi-qup-dvfs-v2-4-1bac2e9ab8db@kernkonzept.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-qup.c