interconnect: qcom: icc-rpm: Set bandwidth and clock for bucket values
authorLeo Yan <leo.yan@linaro.org>
Tue, 12 Jul 2022 01:59:29 +0000 (09:59 +0800)
committerGeorgi Djakov <djakov@kernel.org>
Tue, 12 Jul 2022 07:04:01 +0000 (10:04 +0300)
commite3305daad62c90068e755cdae36a86ac4f02af22
tree7e23e5949dd277a6a941be4109e1ef1149b26c70
parentdcbce7b0a79cc5bc16759079090e1a3aa8dfea34
interconnect: qcom: icc-rpm: Set bandwidth and clock for bucket values

This commit uses buckets for support bandwidth and clock rates.  It
introduces a new function qcom_icc_bus_aggregate() to calculate the
aggregate average and peak bandwidths for every bucket, and also it
calculates the maximum value of aggregated average bandwidth across all
buckets.

The maximum aggregated average is used to calculate the final bandwidth
requests.  And we can set the clock rate per bucket, we use SLEEP bucket
as default bucket if a platform doesn't enable the interconnect path
tags in DT binding; otherwise, we use WAKE bucket to set active clock
and use SLEEP bucket for other clocks.  So far we don't use AMC bucket.

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