Skip to content

Commit

Permalink
PM / devfreq: tegra: remove operating-points
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: MyungJoo Ham <[email protected]>
  • Loading branch information
tomeuv authored and myungjoo committed Mar 31, 2015
1 parent c70eea7 commit 5d498b4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions drivers/devfreq/tegra-devfreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,7 @@ static int tegra_devfreq_probe(struct platform_device *pdev)
struct tegra_devfreq_device *dev;
struct resource *res;
unsigned int i;
unsigned long rate;
int irq;
int err;

Expand Down Expand Up @@ -649,12 +650,6 @@ static int tegra_devfreq_probe(struct platform_device *pdev)
return PTR_ERR(tegra->emc_clock);
}

err = of_init_opp_table(&pdev->dev);
if (err) {
dev_err(&pdev->dev, "Failed to init operating point table\n");
return err;
}

clk_set_rate(tegra->emc_clock, ULONG_MAX);

tegra->rate_change_nb.notifier_call = tegra_actmon_rate_notify_cb;
Expand Down Expand Up @@ -691,6 +686,11 @@ static int tegra_devfreq_probe(struct platform_device *pdev)
tegra_actmon_configure_device(tegra, dev);
}

for (rate = 0; rate <= tegra->max_freq * KHZ; rate++) {
rate = clk_round_rate(tegra->emc_clock, rate);
dev_pm_opp_add(&pdev->dev, rate, 0);
}

irq = platform_get_irq(pdev, 0);
if (irq <= 0) {
dev_err(&pdev->dev, "Failed to get IRQ\n");
Expand Down

0 comments on commit 5d498b4

Please sign in to comment.