summaryrefslogtreecommitdiff
path: root/drivers/interconnect
diff options
context:
space:
mode:
authorVaradarajan Narayanan <quic_varada@quicinc.com>2024-04-30 09:42:09 +0300
committerBjorn Andersson <andersson@kernel.org>2024-07-08 19:40:57 +0300
commitf45b94ffc5f1204b35b5c695ed265b1385951616 (patch)
tree09363d2cd012a863569e6f79b95c7d8269bdcc61 /drivers/interconnect
parentb3d57c5582671831022c65ca83dedd6ce71a125a (diff)
downloadlinux-f45b94ffc5f1204b35b5c695ed265b1385951616.tar.xz
interconnect: icc-clk: Specify master/slave ids
Presently, icc-clk driver autogenerates the master and slave ids. However, devices with multiple nodes on the interconnect could have other constraints and may not match with the auto generated node ids. Hence, modify the driver to use the master/slave ids provided by the caller instead of auto generating. Also, update clk-cbf-8996 accordingly. Acked-by: Georgi Djakov <djakov@kernel.org> Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com> Link: https://lore.kernel.org/r/20240430064214.2030013-2-quic_varada@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Diffstat (limited to 'drivers/interconnect')
-rw-r--r--drivers/interconnect/icc-clk.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/interconnect/icc-clk.c b/drivers/interconnect/icc-clk.c
index d787f2ea36d9..2be193fd7d8f 100644
--- a/drivers/interconnect/icc-clk.c
+++ b/drivers/interconnect/icc-clk.c
@@ -108,7 +108,7 @@ struct icc_provider *icc_clk_register(struct device *dev,
for (i = 0, j = 0; i < num_clocks; i++) {
qp->clocks[i].clk = data[i].clk;
- node = icc_node_create(first_id + j);
+ node = icc_node_create(first_id + data[i].master_id);
if (IS_ERR(node)) {
ret = PTR_ERR(node);
goto err;
@@ -118,10 +118,10 @@ struct icc_provider *icc_clk_register(struct device *dev,
node->data = &qp->clocks[i];
icc_node_add(node, provider);
/* link to the next node, slave */
- icc_link_create(node, first_id + j + 1);
+ icc_link_create(node, first_id + data[i].slave_id);
onecell->nodes[j++] = node;
- node = icc_node_create(first_id + j);
+ node = icc_node_create(first_id + data[i].slave_id);
if (IS_ERR(node)) {
ret = PTR_ERR(node);
goto err;