Skip to content

Commit 8b6bd83

Browse files
Odelu KukatlaGeorgi Djakov
authored andcommitted
interconnect: qcom: Fix DT backwards compatibility for QoS
Add qos_clks_required flag to skip QoS configuration if clocks property is not populated in devicetree for providers which require clocks to be enabled for accessing registers. This is to keep the QoS configuration backwards compatible with devices that have older DTB. Reported-by: Bjorn Andersson <[email protected]> Closes: https://lore.kernel.org/all/ciji6nlxn752ina4tmh6kwvek52nxpnguomqek6plwvwgvoqef@yrtexkpmn5br/ Signed-off-by: Odelu Kukatla <[email protected]> Tested-by: Bjorn Andersson <[email protected]> Fixes: fbd908b ("interconnect: qcom: sc7280: enable QoS configuration") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Georgi Djakov <[email protected]>
1 parent fbd908b commit 8b6bd83

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

drivers/interconnect/qcom/icc-rpmh.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ int qcom_icc_rpmh_probe(struct platform_device *pdev)
311311
}
312312

313313
qp->num_clks = devm_clk_bulk_get_all(qp->dev, &qp->clks);
314-
if (qp->num_clks < 0) {
314+
if (qp->num_clks < 0 || (!qp->num_clks && desc->qos_clks_required)) {
315315
dev_info(dev, "Skipping QoS, failed to get clk: %d\n", qp->num_clks);
316316
goto skip_qos_config;
317317
}

drivers/interconnect/qcom/icc-rpmh.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ struct qcom_icc_desc {
153153
size_t num_nodes;
154154
struct qcom_icc_bcm * const *bcms;
155155
size_t num_bcms;
156+
bool qos_clks_required;
156157
};
157158

158159
int qcom_icc_aggregate(struct icc_node *node, u32 tag, u32 avg_bw,

drivers/interconnect/qcom/sc7280.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1691,6 +1691,7 @@ static const struct qcom_icc_desc sc7280_aggre1_noc = {
16911691
.num_nodes = ARRAY_SIZE(aggre1_noc_nodes),
16921692
.bcms = aggre1_noc_bcms,
16931693
.num_bcms = ARRAY_SIZE(aggre1_noc_bcms),
1694+
.qos_clks_required = true,
16941695
};
16951696

16961697
static struct qcom_icc_bcm * const aggre2_noc_bcms[] = {
@@ -1722,6 +1723,7 @@ static const struct qcom_icc_desc sc7280_aggre2_noc = {
17221723
.num_nodes = ARRAY_SIZE(aggre2_noc_nodes),
17231724
.bcms = aggre2_noc_bcms,
17241725
.num_bcms = ARRAY_SIZE(aggre2_noc_bcms),
1726+
.qos_clks_required = true,
17251727
};
17261728

17271729
static struct qcom_icc_bcm * const clk_virt_bcms[] = {

0 commit comments

Comments
 (0)