diff options
author | Thierry Reding <treding@nvidia.com> | 2016-04-08 15:02:06 +0200 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2016-04-28 12:41:53 +0200 |
commit | 27ed2f7e7ca5c38a8ce695e58e6cf270c26f370b (patch) | |
tree | 58cf74a7af5420c601e6cfdcd868d7222356dbe2 /drivers/clk/tegra/clk-tegra124-dfll-fcpu.c | |
parent | clk: tegra: dfll: Update kerneldoc (diff) | |
download | linux-27ed2f7e7ca5c38a8ce695e58e6cf270c26f370b.tar.xz linux-27ed2f7e7ca5c38a8ce695e58e6cf270c26f370b.zip |
clk: tegra: dfll: Reference CVB table instead of copying data
Instead of copying parts of the CVB table into a separate structure,
keep track of the selected CVB table and directly reference data from
it.
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/clk/tegra/clk-tegra124-dfll-fcpu.c')
-rw-r--r-- | drivers/clk/tegra/clk-tegra124-dfll-fcpu.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/drivers/clk/tegra/clk-tegra124-dfll-fcpu.c b/drivers/clk/tegra/clk-tegra124-dfll-fcpu.c index 61253330c12b..6bfa5ca40d02 100644 --- a/drivers/clk/tegra/clk-tegra124-dfll-fcpu.c +++ b/drivers/clk/tegra/clk-tegra124-dfll-fcpu.c @@ -86,7 +86,6 @@ static int tegra124_dfll_fcpu_probe(struct platform_device *pdev) { int process_id, speedo_id, speedo_value; struct tegra_dfll_soc_data *soc; - const struct cvb_table *cvb; process_id = tegra_sku_info.cpu_process_id; speedo_id = tegra_sku_info.cpu_speedo_id; @@ -108,21 +107,17 @@ static int tegra124_dfll_fcpu_probe(struct platform_device *pdev) return -ENODEV; } - cvb = tegra_cvb_build_opp_table(tegra124_cpu_cvb_tables, - ARRAY_SIZE(tegra124_cpu_cvb_tables), - process_id, speedo_id, speedo_value, - cpu_max_freq_table[speedo_id], - soc->dev); - if (IS_ERR(cvb)) { - dev_err(&pdev->dev, "couldn't build OPP table: %ld\n", - PTR_ERR(cvb)); - return PTR_ERR(cvb); + soc->cvb = tegra_cvb_build_opp_table(tegra124_cpu_cvb_tables, + ARRAY_SIZE(tegra124_cpu_cvb_tables), + process_id, speedo_id, speedo_value, + cpu_max_freq_table[speedo_id], + soc->dev); + if (IS_ERR(soc->cvb)) { + dev_err(&pdev->dev, "couldn't add OPP table: %ld\n", + PTR_ERR(soc->cvb)); + return PTR_ERR(soc->cvb); } - soc->min_millivolts = cvb->min_millivolts; - soc->tune0_low = cvb->cpu_dfll_data.tune0_low; - soc->tune0_high = cvb->cpu_dfll_data.tune0_high; - soc->tune1 = cvb->cpu_dfll_data.tune1; return tegra_dfll_register(pdev, soc); } |