]> git.baikalelectronics.ru Git - kernel.git/commit
interconnect: qcom: icc-rpm: Support multiple buckets
authorLeo Yan <leo.yan@linaro.org>
Tue, 12 Jul 2022 01:59:28 +0000 (09:59 +0800)
committerGeorgi Djakov <djakov@kernel.org>
Tue, 12 Jul 2022 07:03:09 +0000 (10:03 +0300)
commit7c67f7ced16cc2554bde61d326ac67fa8e0fba0d
tree52158b3491d735f1b9a55db0fac7d6887b7decdd
parente33df8777fd32585453fbe9d5950f175982b37a1
interconnect: qcom: icc-rpm: Support multiple buckets

The current interconnect rpm driver uses a single aggregate bandwidth to
calculate the clock rates for both active and sleep clocks; therefore,
it has no chance to separate bandwidth requests for these two kinds of
clocks.

This patch studies the implementation from interconnect rpmh driver to
support multiple buckets.  The rpmh driver provides three buckets for
AMC, WAKE, and SLEEP; this driver only needs to use WAKE and SLEEP
buckets, but we keep the same way with rpmh driver, this can allow us to
reuse the DT binding and avoid to define duplicated data structures.

This patch introduces two callbacks: qcom_icc_pre_bw_aggregate() is used
to clean up bucket values before aggregate bandwidth requests, and
qcom_icc_bw_aggregate() is to aggregate bandwidth for buckets.

Signed-off-by: Leo Yan <leo.yan@linaro.org>
Link: https://lore.kernel.org/r/20220712015929.2789881-5-leo.yan@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
drivers/interconnect/qcom/icc-rpm.c
drivers/interconnect/qcom/icc-rpm.h