Skip to content

Commit

Permalink
clk: mvebu: Convert to clk_hw based provider APIs
Browse files Browse the repository at this point in the history
We're removing struct clk from the clk provider API, so switch
this code to using the clk_hw based provider APIs. This also
removes a clk_get() in this driver that can just as easily use
of_clk_get_parent_name() instead.

Cc: Gregory CLEMENT <gregory.clement@free-electrons.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
  • Loading branch information
Stephen Boyd authored and Michael Turquette committed Aug 24, 2015
1 parent aef28cb commit eca61c9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/clk/mvebu/clk-cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ static int clk_cpu_on_set_rate(struct clk_hw *hwclk, unsigned long rate,
if (!cpuclk->pmu_dfs)
return -ENODEV;

cur_rate = __clk_get_rate(hwclk->clk);
cur_rate = clk_hw_get_rate(hwclk);

reg = readl(cpuclk->reg_base + SYS_CTRL_CLK_DIVIDER_CTRL2_OFFSET);
fabric_div = (reg >> SYS_CTRL_CLK_DIVIDER_CTRL2_NBCLK_RATIO_SHIFT) &
Expand Down Expand Up @@ -197,7 +197,6 @@ static void __init of_cpu_clk_setup(struct device_node *node)
for_each_node_by_type(dn, "cpu") {
struct clk_init_data init;
struct clk *clk;
struct clk *parent_clk;
char *clk_name = kzalloc(5, GFP_KERNEL);
int cpu, err;

Expand All @@ -209,9 +208,8 @@ static void __init of_cpu_clk_setup(struct device_node *node)
goto bail_out;

sprintf(clk_name, "cpu%d", cpu);
parent_clk = of_clk_get(node, 0);

cpuclk[cpu].parent_name = __clk_get_name(parent_clk);
cpuclk[cpu].parent_name = of_clk_get_parent_name(node, 0);
cpuclk[cpu].clk_name = clk_name;
cpuclk[cpu].cpu = cpu;
cpuclk[cpu].reg_base = clock_complex_base;
Expand Down

0 comments on commit eca61c9

Please sign in to comment.