aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/devfreq
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu.vizoso@collabora.com>2015-03-17 05:36:15 -0400
committerMyungJoo Ham <myungjoo.ham@samsung.com>2015-03-31 00:17:14 -0400
commit5d498b463a3cdef51e6d4cc7066ac89c360e7a98 (patch)
tree8f98ae6c07ee8fea706beb53cf040459e2ab48e4 /drivers/devfreq
parentc70eea739f5e765b5d6aadf9621cbdeb024dfbd6 (diff)
PM / devfreq: tegra: remove operating-points
As the DT bindings don't have an operating-points property any more, build the OPP table from the frequencies supported by the EMC clock. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Diffstat (limited to 'drivers/devfreq')
-rw-r--r--drivers/devfreq/tegra-devfreq.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/devfreq/tegra-devfreq.c b/drivers/devfreq/tegra-devfreq.c
index ea6158bb76fa..5ba35cc2ea04 100644
--- a/drivers/devfreq/tegra-devfreq.c
+++ b/drivers/devfreq/tegra-devfreq.c
@@ -618,6 +618,7 @@ static int tegra_devfreq_probe(struct platform_device *pdev)
618 struct tegra_devfreq_device *dev; 618 struct tegra_devfreq_device *dev;
619 struct resource *res; 619 struct resource *res;
620 unsigned int i; 620 unsigned int i;
621 unsigned long rate;
621 int irq; 622 int irq;
622 int err; 623 int err;
623 624
@@ -649,12 +650,6 @@ static int tegra_devfreq_probe(struct platform_device *pdev)
649 return PTR_ERR(tegra->emc_clock); 650 return PTR_ERR(tegra->emc_clock);
650 } 651 }
651 652
652 err = of_init_opp_table(&pdev->dev);
653 if (err) {
654 dev_err(&pdev->dev, "Failed to init operating point table\n");
655 return err;
656 }
657
658 clk_set_rate(tegra->emc_clock, ULONG_MAX); 653 clk_set_rate(tegra->emc_clock, ULONG_MAX);
659 654
660 tegra->rate_change_nb.notifier_call = tegra_actmon_rate_notify_cb; 655 tegra->rate_change_nb.notifier_call = tegra_actmon_rate_notify_cb;
@@ -691,6 +686,11 @@ static int tegra_devfreq_probe(struct platform_device *pdev)
691 tegra_actmon_configure_device(tegra, dev); 686 tegra_actmon_configure_device(tegra, dev);
692 } 687 }
693 688
689 for (rate = 0; rate <= tegra->max_freq * KHZ; rate++) {
690 rate = clk_round_rate(tegra->emc_clock, rate);
691 dev_pm_opp_add(&pdev->dev, rate, 0);
692 }
693
694 irq = platform_get_irq(pdev, 0); 694 irq = platform_get_irq(pdev, 0);
695 if (irq <= 0) { 695 if (irq <= 0) {
696 dev_err(&pdev->dev, "Failed to get IRQ\n"); 696 dev_err(&pdev->dev, "Failed to get IRQ\n");