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,sm8150.h>
14 #include "bcm-voter.h"
15 #include "icc-rpmh.h"
516 desc = device_get_match_data(&pdev->dev); in qnoc_probe()
518 return -EINVAL; in qnoc_probe()
520 qnodes = desc->nodes; in qnoc_probe()
521 num_nodes = desc->num_nodes; in qnoc_probe()
523 qp = devm_kzalloc(&pdev->dev, sizeof(*qp), GFP_KERNEL); in qnoc_probe()
525 return -ENOMEM; in qnoc_probe()
527 data = devm_kcalloc(&pdev->dev, num_nodes, sizeof(*node), GFP_KERNEL); in qnoc_probe()
529 return -ENOMEM; in qnoc_probe()
531 provider = &qp->provider; in qnoc_probe()
532 provider->dev = &pdev->dev; in qnoc_probe()
533 provider->set = qcom_icc_set; in qnoc_probe()
534 provider->pre_aggregate = qcom_icc_pre_aggregate; in qnoc_probe()
535 provider->aggregate = qcom_icc_aggregate; in qnoc_probe()
536 provider->xlate = of_icc_xlate_onecell; in qnoc_probe()
537 INIT_LIST_HEAD(&provider->nodes); in qnoc_probe()
538 provider->data = data; in qnoc_probe()
540 qp->dev = &pdev->dev; in qnoc_probe()
541 qp->bcms = desc->bcms; in qnoc_probe()
542 qp->num_bcms = desc->num_bcms; in qnoc_probe()
544 qp->voter = of_bcm_voter_get(qp->dev, NULL); in qnoc_probe()
545 if (IS_ERR(qp->voter)) in qnoc_probe()
546 return PTR_ERR(qp->voter); in qnoc_probe()
550 dev_err(&pdev->dev, "error adding interconnect provider\n"); in qnoc_probe()
554 for (i = 0; i < qp->num_bcms; i++) in qnoc_probe()
555 qcom_icc_bcm_init(qp->bcms[i], &pdev->dev); in qnoc_probe()
563 node = icc_node_create(qnodes[i]->id); in qnoc_probe()
569 node->name = qnodes[i]->name; in qnoc_probe()
570 node->data = qnodes[i]; in qnoc_probe()
573 for (j = 0; j < qnodes[i]->num_links; j++) in qnoc_probe()
574 icc_link_create(node, qnodes[i]->links[j]); in qnoc_probe()
576 data->nodes[i] = node; in qnoc_probe()
578 data->num_nodes = num_nodes; in qnoc_probe()
593 icc_nodes_remove(&qp->provider); in qnoc_remove()
594 return icc_provider_del(&qp->provider); in qnoc_remove()
598 { .compatible = "qcom,sm8150-aggre1-noc",
600 { .compatible = "qcom,sm8150-aggre2-noc",
602 { .compatible = "qcom,sm8150-camnoc-virt",
604 { .compatible = "qcom,sm8150-compute-noc",
606 { .compatible = "qcom,sm8150-config-noc",
608 { .compatible = "qcom,sm8150-dc-noc",
610 { .compatible = "qcom,sm8150-gem-noc",
612 { .compatible = "qcom,sm8150-ipa-virt",
614 { .compatible = "qcom,sm8150-mc-virt",
616 { .compatible = "qcom,sm8150-mmss-noc",
618 { .compatible = "qcom,sm8150-system-noc",
628 .name = "qnoc-sm8150",