Skip to content

Commit

Permalink
sh: clkfwk: bugfix: sh_clk_div_enable() care sh_clk_div_set_rate() if…
Browse files Browse the repository at this point in the history
… div6

764f4e4
(sh: clkfwk: Use shared sh_clk_div_enable/disable())
shared enable/disable funcions for div4/div6.
But new sh_clk_div_enable() didn't care sh_clk_div_set_rate()
which is required on div6 clock.
This patch fixes it.

Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Paul Mundt <[email protected]>
  • Loading branch information
morimoto authored and pmundt committed Jan 11, 2013
1 parent 30c254f commit 5a799b8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/sh/clk/cpg.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@ static int sh_clk_div_set_rate(struct clk *clk, unsigned long rate)

static int sh_clk_div_enable(struct clk *clk)
{
if (clk->div_mask == SH_CLK_DIV6_MSK) {
int ret = sh_clk_div_set_rate(clk, clk->rate);
if (ret < 0)
return ret;
}

sh_clk_write(sh_clk_read(clk) & ~CPG_CKSTP_BIT, clk);
return 0;
}
Expand Down

0 comments on commit 5a799b8

Please sign in to comment.