From fd8e26e71e92cea03eb89a5031d069f32842d765 Mon Sep 17 00:00:00 2001 From: Veera Vegivada Date: Tue, 7 Sep 2021 11:35:15 +0530 Subject: [PATCH] interconnect: qcom: icc-rpmh: Add support for enabling BCMs needed for QoS Some QoS blocks require voting for BCMs before their registers can be accessed, since they require clocks and regulators controlled by BCM. Hence add qos_proxy flag to indicate the BCM needs to be voted for QoS configuration. Change-Id: Idc618e7a3d28d31d38d85f5b21e6b9f12e86ebe2 Signed-off-by: Veera Vegivada --- drivers/interconnect/qcom/icc-rpmh.c | 3 +++ drivers/interconnect/qcom/icc-rpmh.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/drivers/interconnect/qcom/icc-rpmh.c b/drivers/interconnect/qcom/icc-rpmh.c index 40e5c19c5627..82e919ab1094 100644 --- a/drivers/interconnect/qcom/icc-rpmh.c +++ b/drivers/interconnect/qcom/icc-rpmh.c @@ -222,6 +222,9 @@ static bool bcm_needs_qos_proxy(struct qcom_icc_bcm *bcm) { int i; + if (bcm->qos_proxy) + return true; + if (bcm->voter_idx == 0) for (i = 0; i < bcm->num_nodes; i++) if (bcm->nodes[i]->qosbox) diff --git a/drivers/interconnect/qcom/icc-rpmh.h b/drivers/interconnect/qcom/icc-rpmh.h index a5cb4485d0de..fa8cf1b84631 100644 --- a/drivers/interconnect/qcom/icc-rpmh.h +++ b/drivers/interconnect/qcom/icc-rpmh.h @@ -99,6 +99,8 @@ struct qcom_icc_node { * @perf_mode_mask: mask to OR with enable_mask when QCOM_ICC_TAG_PERF_MODE is set * @dirty: flag used to indicate whether the bcm needs to be committed * @keepalive: flag used to indicate whether a keepalive is required + * @qos_proxy: flag used to indicate whether a proxy vote needed as part of + * qos configuration * @aux_data: auxiliary data used when calculating threshold values and * communicating with RPMh * @list: used to link to other bcms when compiling lists for commit @@ -117,6 +119,7 @@ struct qcom_icc_bcm { u32 perf_mode_mask; bool dirty; bool keepalive; + bool qos_proxy; struct bcm_db aux_data; struct list_head list; struct list_head ws_list;