]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
sh: Fix up SH7201 clkfwk build.
authorPaul Mundt <lethal@linux-sh.org>
Fri, 24 Dec 2010 03:15:57 +0000 (12:15 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Fri, 24 Dec 2010 03:15:57 +0000 (12:15 +0900)
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>
arch/sh/kernel/cpu/sh2a/clock-sh7201.c

index b26264dc2aefef75e0292cb6c9a4862e8b4f9785..c509c40cba4bfefe3917f5eec9b2ddea3c63763d 100644 (file)
@@ -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 = {