Lines Matching +full:sdm845 +full:- +full:mem +full:- +full:noc

1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
8 #include <linux/interconnect-provider.h>
12 #include <dt-bindings/interconnect/qcom,sdm845.h>
14 #include "bcm-voter.h"
15 #include "icc-rpmh.h"
16 #include "sdm845.h"
451 desc = device_get_match_data(&pdev->dev); in qnoc_probe()
453 return -EINVAL; in qnoc_probe()
455 qnodes = desc->nodes; in qnoc_probe()
456 num_nodes = desc->num_nodes; in qnoc_probe()
458 qp = devm_kzalloc(&pdev->dev, sizeof(*qp), GFP_KERNEL); in qnoc_probe()
460 return -ENOMEM; in qnoc_probe()
462 data = devm_kzalloc(&pdev->dev, struct_size(data, nodes, num_nodes), in qnoc_probe()
465 return -ENOMEM; in qnoc_probe()
467 provider = &qp->provider; in qnoc_probe()
468 provider->dev = &pdev->dev; in qnoc_probe()
469 provider->set = qcom_icc_set; in qnoc_probe()
470 provider->pre_aggregate = qcom_icc_pre_aggregate; in qnoc_probe()
471 provider->aggregate = qcom_icc_aggregate; in qnoc_probe()
472 provider->xlate_extended = qcom_icc_xlate_extended; in qnoc_probe()
473 INIT_LIST_HEAD(&provider->nodes); in qnoc_probe()
474 provider->data = data; in qnoc_probe()
476 qp->dev = &pdev->dev; in qnoc_probe()
477 qp->bcms = desc->bcms; in qnoc_probe()
478 qp->num_bcms = desc->num_bcms; in qnoc_probe()
480 qp->voter = of_bcm_voter_get(qp->dev, NULL); in qnoc_probe()
481 if (IS_ERR(qp->voter)) { in qnoc_probe()
482 dev_err(&pdev->dev, "bcm_voter err:%ld\n", PTR_ERR(qp->voter)); in qnoc_probe()
483 return PTR_ERR(qp->voter); in qnoc_probe()
488 dev_err(&pdev->dev, "error adding interconnect provider\n"); in qnoc_probe()
492 for (i = 0; i < qp->num_bcms; i++) in qnoc_probe()
493 qcom_icc_bcm_init(qp->bcms[i], &pdev->dev); in qnoc_probe()
501 node = icc_node_create(qnodes[i]->id); in qnoc_probe()
507 node->name = qnodes[i]->name; in qnoc_probe()
508 node->data = qnodes[i]; in qnoc_probe()
511 for (j = 0; j < qnodes[i]->num_links; j++) in qnoc_probe()
512 icc_link_create(node, qnodes[i]->links[j]); in qnoc_probe()
514 data->nodes[i] = node; in qnoc_probe()
516 data->num_nodes = num_nodes; in qnoc_probe()
531 icc_nodes_remove(&qp->provider); in qnoc_remove()
532 return icc_provider_del(&qp->provider); in qnoc_remove()
536 { .compatible = "qcom,sdm845-aggre1-noc",
538 { .compatible = "qcom,sdm845-aggre2-noc",
540 { .compatible = "qcom,sdm845-config-noc",
542 { .compatible = "qcom,sdm845-dc-noc",
544 { .compatible = "qcom,sdm845-gladiator-noc",
546 { .compatible = "qcom,sdm845-mem-noc",
548 { .compatible = "qcom,sdm845-mmss-noc",
550 { .compatible = "qcom,sdm845-system-noc",
560 .name = "qnoc-sdm845",
568 MODULE_DESCRIPTION("Qualcomm sdm845 NoC driver");