Lines Matching +full:bcm +full:- +full:voter

1 // SPDX-License-Identifier: GPL-2.0
9 #include <linux/interconnect-provider.h>
12 #include <dt-bindings/interconnect/qcom,sc7180.h>
14 #include "bcm-voter.h"
15 #include "icc-rpmh.h"
499 desc = device_get_match_data(&pdev->dev); in qnoc_probe()
501 return -EINVAL; in qnoc_probe()
503 qnodes = desc->nodes; in qnoc_probe()
504 num_nodes = desc->num_nodes; in qnoc_probe()
506 qp = devm_kzalloc(&pdev->dev, sizeof(*qp), GFP_KERNEL); in qnoc_probe()
508 return -ENOMEM; in qnoc_probe()
510 data = devm_kcalloc(&pdev->dev, num_nodes, sizeof(*node), GFP_KERNEL); in qnoc_probe()
512 return -ENOMEM; in qnoc_probe()
514 provider = &qp->provider; in qnoc_probe()
515 provider->dev = &pdev->dev; in qnoc_probe()
516 provider->set = qcom_icc_set; in qnoc_probe()
517 provider->pre_aggregate = qcom_icc_pre_aggregate; in qnoc_probe()
518 provider->aggregate = qcom_icc_aggregate; in qnoc_probe()
519 provider->xlate_extended = qcom_icc_xlate_extended; in qnoc_probe()
520 INIT_LIST_HEAD(&provider->nodes); in qnoc_probe()
521 provider->data = data; in qnoc_probe()
523 qp->dev = &pdev->dev; in qnoc_probe()
524 qp->bcms = desc->bcms; in qnoc_probe()
525 qp->num_bcms = desc->num_bcms; in qnoc_probe()
527 qp->voter = of_bcm_voter_get(qp->dev, NULL); in qnoc_probe()
528 if (IS_ERR(qp->voter)) in qnoc_probe()
529 return PTR_ERR(qp->voter); in qnoc_probe()
533 dev_err(&pdev->dev, "error adding interconnect provider\n"); in qnoc_probe()
537 for (i = 0; i < qp->num_bcms; i++) in qnoc_probe()
538 qcom_icc_bcm_init(qp->bcms[i], &pdev->dev); in qnoc_probe()
546 node = icc_node_create(qnodes[i]->id); in qnoc_probe()
552 node->name = qnodes[i]->name; in qnoc_probe()
553 node->data = qnodes[i]; in qnoc_probe()
556 for (j = 0; j < qnodes[i]->num_links; j++) in qnoc_probe()
557 icc_link_create(node, qnodes[i]->links[j]); in qnoc_probe()
559 data->nodes[i] = node; in qnoc_probe()
561 data->num_nodes = num_nodes; in qnoc_probe()
576 icc_nodes_remove(&qp->provider); in qnoc_remove()
577 return icc_provider_del(&qp->provider); in qnoc_remove()
581 { .compatible = "qcom,sc7180-aggre1-noc",
583 { .compatible = "qcom,sc7180-aggre2-noc",
585 { .compatible = "qcom,sc7180-camnoc-virt",
587 { .compatible = "qcom,sc7180-compute-noc",
589 { .compatible = "qcom,sc7180-config-noc",
591 { .compatible = "qcom,sc7180-dc-noc",
593 { .compatible = "qcom,sc7180-gem-noc",
595 { .compatible = "qcom,sc7180-mc-virt",
597 { .compatible = "qcom,sc7180-mmss-noc",
599 { .compatible = "qcom,sc7180-npu-noc",
601 { .compatible = "qcom,sc7180-qup-virt",
603 { .compatible = "qcom,sc7180-system-noc",
613 .name = "qnoc-sc7180",