Skip to content

Commit

Permalink
Partially revert "clk: mvebu: Convert to clk_hw based provider APIs"
Browse files Browse the repository at this point in the history
This partially reverts commit eca61c9.

Thomas reports that it causes regressions on Armada XP devices.
This is because of_clk_get_parent_name() relies on the property
'clock-output-names' to resolve the name of a clock's parent,
without trying to get the clock from the framework and call
__clk_get_name(). Given that Armada XP devices don't have the
'clock-output-names' property, of_clk_get_parent_name() returns
the name of the node which doesn't match the actual parent
clock's name at all, causing CPU clocks to never link up with
their parents.

Reported-by: Thomas Petazzoni <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
  • Loading branch information
bebarino committed Oct 14, 2015
1 parent 9f30a04 commit e79b202
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/clk/mvebu/clk-cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ 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 @@ -208,8 +209,9 @@ 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 = of_clk_get_parent_name(node, 0);
cpuclk[cpu].parent_name = __clk_get_name(parent_clk);
cpuclk[cpu].clk_name = clk_name;
cpuclk[cpu].cpu = cpu;
cpuclk[cpu].reg_base = clock_complex_base;
Expand Down

0 comments on commit e79b202

Please sign in to comment.