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"
518 desc = device_get_match_data(&pdev->dev); in qnoc_probe()
520 return -EINVAL; in qnoc_probe()
522 qnodes = desc->nodes; in qnoc_probe()
523 num_nodes = desc->num_nodes; in qnoc_probe()
525 qp = devm_kzalloc(&pdev->dev, sizeof(*qp), GFP_KERNEL); in qnoc_probe()
527 return -ENOMEM; in qnoc_probe()
529 data = devm_kcalloc(&pdev->dev, num_nodes, sizeof(*node), GFP_KERNEL); in qnoc_probe()
531 return -ENOMEM; in qnoc_probe()
533 provider = &qp->provider; in qnoc_probe()
534 provider->dev = &pdev->dev; in qnoc_probe()
535 provider->set = qcom_icc_set; in qnoc_probe()
536 provider->pre_aggregate = qcom_icc_pre_aggregate; in qnoc_probe()
537 provider->aggregate = qcom_icc_aggregate; in qnoc_probe()
538 provider->xlate_extended = qcom_icc_xlate_extended; in qnoc_probe()
539 INIT_LIST_HEAD(&provider->nodes); in qnoc_probe()
540 provider->data = data; in qnoc_probe()
542 qp->dev = &pdev->dev; in qnoc_probe()
543 qp->bcms = desc->bcms; in qnoc_probe()
544 qp->num_bcms = desc->num_bcms; in qnoc_probe()
546 qp->voter = of_bcm_voter_get(qp->dev, NULL); in qnoc_probe()
547 if (IS_ERR(qp->voter)) in qnoc_probe()
548 return PTR_ERR(qp->voter); in qnoc_probe()
552 dev_err(&pdev->dev, "error adding interconnect provider\n"); in qnoc_probe()
556 for (i = 0; i < qp->num_bcms; i++) in qnoc_probe()
557 qcom_icc_bcm_init(qp->bcms[i], &pdev->dev); in qnoc_probe()
565 node = icc_node_create(qnodes[i]->id); in qnoc_probe()
571 node->name = qnodes[i]->name; in qnoc_probe()
572 node->data = qnodes[i]; in qnoc_probe()
575 for (j = 0; j < qnodes[i]->num_links; j++) in qnoc_probe()
576 icc_link_create(node, qnodes[i]->links[j]); in qnoc_probe()
578 data->nodes[i] = node; in qnoc_probe()
580 data->num_nodes = num_nodes; in qnoc_probe()
595 icc_nodes_remove(&qp->provider); in qnoc_remove()
596 return icc_provider_del(&qp->provider); in qnoc_remove()
600 { .compatible = "qcom,sc7180-aggre1-noc",
602 { .compatible = "qcom,sc7180-aggre2-noc",
604 { .compatible = "qcom,sc7180-camnoc-virt",
606 { .compatible = "qcom,sc7180-compute-noc",
608 { .compatible = "qcom,sc7180-config-noc",
610 { .compatible = "qcom,sc7180-dc-noc",
612 { .compatible = "qcom,sc7180-gem-noc",
614 { .compatible = "qcom,sc7180-ipa-virt",
616 { .compatible = "qcom,sc7180-mc-virt",
618 { .compatible = "qcom,sc7180-mmss-noc",
620 { .compatible = "qcom,sc7180-npu-noc",
622 { .compatible = "qcom,sc7180-qup-virt",
624 { .compatible = "qcom,sc7180-system-noc",
634 .name = "qnoc-sc7180",