Lines Matching +full:bcm +full:- +full:voter
1 // SPDX-License-Identifier: GPL-2.0
8 #include <linux/interconnect-provider.h>
12 #include <dt-bindings/interconnect/qcom,sc8180x.h>
14 #include "bcm-voter.h"
15 #include "icc-rpmh.h"
517 desc = device_get_match_data(&pdev->dev); in qnoc_probe()
519 return -EINVAL; in qnoc_probe()
521 qnodes = desc->nodes; in qnoc_probe()
522 num_nodes = desc->num_nodes; in qnoc_probe()
524 qp = devm_kzalloc(&pdev->dev, sizeof(*qp), GFP_KERNEL); in qnoc_probe()
526 return -ENOMEM; in qnoc_probe()
528 data = devm_kcalloc(&pdev->dev, num_nodes, sizeof(*node), GFP_KERNEL); in qnoc_probe()
530 return -ENOMEM; in qnoc_probe()
532 provider = &qp->provider; in qnoc_probe()
533 provider->dev = &pdev->dev; in qnoc_probe()
534 provider->set = qcom_icc_set; in qnoc_probe()
535 provider->pre_aggregate = qcom_icc_pre_aggregate; in qnoc_probe()
536 provider->aggregate = qcom_icc_aggregate; in qnoc_probe()
537 provider->xlate = of_icc_xlate_onecell; in qnoc_probe()
538 INIT_LIST_HEAD(&provider->nodes); in qnoc_probe()
539 provider->data = data; in qnoc_probe()
541 qp->dev = &pdev->dev; in qnoc_probe()
542 qp->bcms = desc->bcms; in qnoc_probe()
543 qp->num_bcms = desc->num_bcms; in qnoc_probe()
545 qp->voter = of_bcm_voter_get(qp->dev, NULL); in qnoc_probe()
546 if (IS_ERR(qp->voter)) in qnoc_probe()
547 return PTR_ERR(qp->voter); in qnoc_probe()
551 dev_err(&pdev->dev, "error adding interconnect provider\n"); in qnoc_probe()
555 for (i = 0; i < qp->num_bcms; i++) in qnoc_probe()
556 qcom_icc_bcm_init(qp->bcms[i], &pdev->dev); in qnoc_probe()
564 node = icc_node_create(qnodes[i]->id); in qnoc_probe()
570 node->name = qnodes[i]->name; in qnoc_probe()
571 node->data = qnodes[i]; in qnoc_probe()
574 for (j = 0; j < qnodes[i]->num_links; j++) in qnoc_probe()
575 icc_link_create(node, qnodes[i]->links[j]); in qnoc_probe()
577 data->nodes[i] = node; in qnoc_probe()
579 data->num_nodes = num_nodes; in qnoc_probe()
594 icc_nodes_remove(&qp->provider); in qnoc_remove()
595 return icc_provider_del(&qp->provider); in qnoc_remove()
599 { .compatible = "qcom,sc8180x-aggre1-noc", .data = &sc8180x_aggre1_noc },
600 { .compatible = "qcom,sc8180x-aggre2-noc", .data = &sc8180x_aggre2_noc },
601 { .compatible = "qcom,sc8180x-camnoc-virt", .data = &sc8180x_camnoc_virt },
602 { .compatible = "qcom,sc8180x-compute-noc", .data = &sc8180x_compute_noc, },
603 { .compatible = "qcom,sc8180x-config-noc", .data = &sc8180x_config_noc },
604 { .compatible = "qcom,sc8180x-dc-noc", .data = &sc8180x_dc_noc },
605 { .compatible = "qcom,sc8180x-gem-noc", .data = &sc8180x_gem_noc },
606 { .compatible = "qcom,sc8180x-ipa-virt", .data = &sc8180x_ipa_virt },
607 { .compatible = "qcom,sc8180x-mc-virt", .data = &sc8180x_mc_virt },
608 { .compatible = "qcom,sc8180x-mmss-noc", .data = &sc8180x_mmss_noc },
609 { .compatible = "qcom,sc8180x-system-noc", .data = &sc8180x_system_noc },
618 .name = "qnoc-sc8180x",