瀏覽代碼

sh: Fix up SH7201 clkfwk build.

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>
Paul Mundt 15 年之前
父節點
當前提交
27f1acccd4
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      arch/sh/kernel/cpu/sh2a/clock-sh7201.c

+ 1 - 1
arch/sh/kernel/cpu/sh2a/clock-sh7201.c

@@ -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 = {