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,sm8250.h>
14 #include "bcm-voter.h"
15 #include "icc-rpmh.h"
532 desc = device_get_match_data(&pdev->dev); in qnoc_probe()
534 return -EINVAL; in qnoc_probe()
536 qnodes = desc->nodes; in qnoc_probe()
537 num_nodes = desc->num_nodes; in qnoc_probe()
539 qp = devm_kzalloc(&pdev->dev, sizeof(*qp), GFP_KERNEL); in qnoc_probe()
541 return -ENOMEM; in qnoc_probe()
543 data = devm_kcalloc(&pdev->dev, num_nodes, sizeof(*node), GFP_KERNEL); in qnoc_probe()
545 return -ENOMEM; in qnoc_probe()
547 provider = &qp->provider; in qnoc_probe()
548 provider->dev = &pdev->dev; in qnoc_probe()
549 provider->set = qcom_icc_set; in qnoc_probe()
550 provider->pre_aggregate = qcom_icc_pre_aggregate; in qnoc_probe()
551 provider->aggregate = qcom_icc_aggregate; in qnoc_probe()
552 provider->xlate = of_icc_xlate_onecell; in qnoc_probe()
553 INIT_LIST_HEAD(&provider->nodes); in qnoc_probe()
554 provider->data = data; in qnoc_probe()
556 qp->dev = &pdev->dev; in qnoc_probe()
557 qp->bcms = desc->bcms; in qnoc_probe()
558 qp->num_bcms = desc->num_bcms; in qnoc_probe()
560 qp->voter = of_bcm_voter_get(qp->dev, NULL); in qnoc_probe()
561 if (IS_ERR(qp->voter)) in qnoc_probe()
562 return PTR_ERR(qp->voter); in qnoc_probe()
566 dev_err(&pdev->dev, "error adding interconnect provider\n"); in qnoc_probe()
570 for (i = 0; i < qp->num_bcms; i++) in qnoc_probe()
571 qcom_icc_bcm_init(qp->bcms[i], &pdev->dev); in qnoc_probe()
579 node = icc_node_create(qnodes[i]->id); in qnoc_probe()
585 node->name = qnodes[i]->name; in qnoc_probe()
586 node->data = qnodes[i]; in qnoc_probe()
589 for (j = 0; j < qnodes[i]->num_links; j++) in qnoc_probe()
590 icc_link_create(node, qnodes[i]->links[j]); in qnoc_probe()
592 data->nodes[i] = node; in qnoc_probe()
594 data->num_nodes = num_nodes; in qnoc_probe()
609 icc_nodes_remove(&qp->provider); in qnoc_remove()
610 return icc_provider_del(&qp->provider); in qnoc_remove()
614 { .compatible = "qcom,sm8250-aggre1-noc",
616 { .compatible = "qcom,sm8250-aggre2-noc",
618 { .compatible = "qcom,sm8250-compute-noc",
620 { .compatible = "qcom,sm8250-config-noc",
622 { .compatible = "qcom,sm8250-dc-noc",
624 { .compatible = "qcom,sm8250-gem-noc",
626 { .compatible = "qcom,sm8250-ipa-virt",
628 { .compatible = "qcom,sm8250-mc-virt",
630 { .compatible = "qcom,sm8250-mmss-noc",
632 { .compatible = "qcom,sm8250-npu-noc",
634 { .compatible = "qcom,sm8250-system-noc",
644 .name = "qnoc-sm8250",