msm8974.c (8dd06ef34b6e2f41b29fbf5fc1663780f2524285) msm8974.c (7381e27b1e563aa8a1c6bcf74a8cadb6901c283a)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (C) 2019 Brian Masney <masneyb@onstation.org>
4 *
5 * Based on MSM bus code from downstream MSM kernel sources.
6 * Copyright (c) 2012-2013 The Linux Foundation. All rights reserved.
7 *
8 * Based on qcs404.c

--- 604 unchanged lines hidden (view full) ---

613
614 msm8974_icc_rpm_smd_send(provider->dev, RPM_BUS_SLAVE_REQ,
615 dst_qn->name, dst_qn->slv_rpm_id, sum_bw);
616
617 rate = max(sum_bw, max_peak_bw);
618
619 do_div(rate, src_qn->buswidth);
620
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (C) 2019 Brian Masney <masneyb@onstation.org>
4 *
5 * Based on MSM bus code from downstream MSM kernel sources.
6 * Copyright (c) 2012-2013 The Linux Foundation. All rights reserved.
7 *
8 * Based on qcs404.c

--- 604 unchanged lines hidden (view full) ---

613
614 msm8974_icc_rpm_smd_send(provider->dev, RPM_BUS_SLAVE_REQ,
615 dst_qn->name, dst_qn->slv_rpm_id, sum_bw);
616
617 rate = max(sum_bw, max_peak_bw);
618
619 do_div(rate, src_qn->buswidth);
620
621 rate = min_t(u32, rate, INT_MAX);
622
621 if (src_qn->rate == rate)
622 return 0;
623
624 for (i = 0; i < qp->num_clks; i++) {
625 ret = clk_set_rate(qp->bus_clks[i].clk, rate);
626 if (ret) {
627 dev_err(provider->dev, "%s clk_set_rate error: %d\n",
628 qp->bus_clks[i].id, ret);

--- 124 unchanged lines hidden (view full) ---

753MODULE_DEVICE_TABLE(of, msm8974_noc_of_match);
754
755static struct platform_driver msm8974_noc_driver = {
756 .probe = msm8974_icc_probe,
757 .remove = msm8974_icc_remove,
758 .driver = {
759 .name = "qnoc-msm8974",
760 .of_match_table = msm8974_noc_of_match,
623 if (src_qn->rate == rate)
624 return 0;
625
626 for (i = 0; i < qp->num_clks; i++) {
627 ret = clk_set_rate(qp->bus_clks[i].clk, rate);
628 if (ret) {
629 dev_err(provider->dev, "%s clk_set_rate error: %d\n",
630 qp->bus_clks[i].id, ret);

--- 124 unchanged lines hidden (view full) ---

755MODULE_DEVICE_TABLE(of, msm8974_noc_of_match);
756
757static struct platform_driver msm8974_noc_driver = {
758 .probe = msm8974_icc_probe,
759 .remove = msm8974_icc_remove,
760 .driver = {
761 .name = "qnoc-msm8974",
762 .of_match_table = msm8974_noc_of_match,
763 .sync_state = icc_sync_state,
761 },
762};
763module_platform_driver(msm8974_noc_driver);
764MODULE_DESCRIPTION("Qualcomm MSM8974 NoC driver");
765MODULE_AUTHOR("Brian Masney <masneyb@onstation.org>");
766MODULE_LICENSE("GPL v2");
764 },
765};
766module_platform_driver(msm8974_noc_driver);
767MODULE_DESCRIPTION("Qualcomm MSM8974 NoC driver");
768MODULE_AUTHOR("Brian Masney <masneyb@onstation.org>");
769MODULE_LICENSE("GPL v2");