Skip to content

Commit

Permalink
sh: Fix up SH7201 clkfwk build.
Browse files Browse the repository at this point in the history
The master clock initialization for SH7201 was wholly bogus. Users of the
legacy API must initialize the clock rate through the struct clk itself
rather than returning the clock frequency. Given that the init function
itself is void, returning the frequency isn't terribly effective.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Paul Mundt committed Dec 24, 2010
1 parent 27434f0 commit 27f1acc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/sh/kernel/cpu/sh2a/clock-sh7201.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ static const int pfc_divisors[]={1,2,3,4,6,8,12};

static void master_clk_init(struct clk *clk)
{
return 10000000 * PLL2 * pll1rate[(__raw_readw(FREQCR) >> 8) & 0x0007];
clk->rate = 10000000 * PLL2 * pll1rate[(__raw_readw(FREQCR) >> 8) & 0x0007];
}

static struct clk_ops sh7201_master_clk_ops = {
Expand Down

0 comments on commit 27f1acc

Please sign in to comment.