]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
i2c: qup: Vote for interconnect bandwidth to DRAM
authorStephan Gerhold <stephan.gerhold@kernkonzept.com>
Tue, 28 Nov 2023 09:48:37 +0000 (10:48 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Jun 2025 12:40:04 +0000 (14:40 +0200)
commitfb6a04c3b76a77176c009bdfef763195f133f87c
treefd1f7bb0db49658408cdb5f58c2465e11e59fe13
parent8c18c904d301ffeb33b071eadc55cd6131e1e9be
i2c: qup: Vote for interconnect bandwidth to DRAM

[ Upstream commit d4f35233a6345f62637463ef6e0708f44ffaa583 ]

When the I2C 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 I2C core clock.

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.

The implementation is largely identical to the one introduced for
spi-qup in commit ecdaa9473019 ("spi: qup: Vote for interconnect
bandwidth to DRAM") since both drivers represent the same hardware
block.

Signed-off-by: Stephan Gerhold <stephan.gerhold@kernkonzept.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20231128-i2c-qup-dvfs-v1-3-59a0e3039111@kernkonzept.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/i2c/busses/i2c-qup.c