• Home
  • Raw
  • Download

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"
707 desc = device_get_match_data(&pdev->dev); in qnoc_probe()
709 return -EINVAL; in qnoc_probe()
711 qnodes = desc->nodes; in qnoc_probe()
712 num_nodes = desc->num_nodes; in qnoc_probe()
714 qp = devm_kzalloc(&pdev->dev, sizeof(*qp), GFP_KERNEL); in qnoc_probe()
716 return -ENOMEM; in qnoc_probe()
718 data = devm_kcalloc(&pdev->dev, num_nodes, sizeof(*node), GFP_KERNEL); in qnoc_probe()
720 return -ENOMEM; in qnoc_probe()
722 provider = &qp->provider; in qnoc_probe()
723 provider->dev = &pdev->dev; in qnoc_probe()
724 provider->set = qcom_icc_set; in qnoc_probe()
725 provider->pre_aggregate = qcom_icc_pre_aggregate; in qnoc_probe()
726 provider->aggregate = qcom_icc_aggregate; in qnoc_probe()
727 provider->xlate_extended = qcom_icc_xlate_extended; in qnoc_probe()
728 INIT_LIST_HEAD(&provider->nodes); in qnoc_probe()
729 provider->data = data; in qnoc_probe()
731 qp->dev = &pdev->dev; in qnoc_probe()
732 qp->bcms = desc->bcms; in qnoc_probe()
733 qp->num_bcms = desc->num_bcms; in qnoc_probe()
735 qp->voter = of_bcm_voter_get(qp->dev, NULL); in qnoc_probe()
736 if (IS_ERR(qp->voter)) in qnoc_probe()
737 return PTR_ERR(qp->voter); in qnoc_probe()
741 dev_err(&pdev->dev, "error adding interconnect provider\n"); in qnoc_probe()
745 for (i = 0; i < qp->num_bcms; i++) in qnoc_probe()
746 qcom_icc_bcm_init(qp->bcms[i], &pdev->dev); in qnoc_probe()
754 node = icc_node_create(qnodes[i]->id); in qnoc_probe()
760 node->name = qnodes[i]->name; in qnoc_probe()
761 node->data = qnodes[i]; in qnoc_probe()
764 for (j = 0; j < qnodes[i]->num_links; j++) in qnoc_probe()
765 icc_link_create(node, qnodes[i]->links[j]); in qnoc_probe()
767 data->nodes[i] = node; in qnoc_probe()
769 data->num_nodes = num_nodes; in qnoc_probe()
784 icc_nodes_remove(&qp->provider); in qnoc_remove()
785 return icc_provider_del(&qp->provider); in qnoc_remove()
789 { .compatible = "qcom,sc7180-aggre1-noc",
791 { .compatible = "qcom,sc7180-aggre2-noc",
793 { .compatible = "qcom,sc7180-camnoc-virt",
795 { .compatible = "qcom,sc7180-compute-noc",
797 { .compatible = "qcom,sc7180-config-noc",
799 { .compatible = "qcom,sc7180-dc-noc",
801 { .compatible = "qcom,sc7180-gem-noc",
803 { .compatible = "qcom,sc7180-mc-virt",
805 { .compatible = "qcom,sc7180-mmss-noc",
807 { .compatible = "qcom,sc7180-npu-noc",
809 { .compatible = "qcom,sc7180-qup-virt",
811 { .compatible = "qcom,sc7180-system-noc",
821 .name = "qnoc-sc7180",