Skip to content

Commit

Permalink
ARM: mach-shmobile: clock-sh7372: fixup pllc2 set_rate
Browse files Browse the repository at this point in the history
This patch fixup 421b446
 - Care clk->rate
 - Don't over write PLLC2 enable bit

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reported-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Tested-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Kuninori Morimoto authored and Paul Mundt committed Jan 18, 2011
1 parent c488a47 commit ff9531e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion arch/arm/mach-shmobile/clock-sh7372.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,9 @@ static int pllc2_set_rate(struct clk *clk, unsigned long rate)

value = __raw_readl(PLLC2CR) & ~(0x3f << 24);

__raw_writel((value & ~0x80000000) | ((idx + 19) << 24), PLLC2CR);
__raw_writel(value | ((idx + 19) << 24), PLLC2CR);

clk->rate = clk->freq_table[idx].frequency;

return 0;
}
Expand Down

0 comments on commit ff9531e

Please sign in to comment.