Skip to contentSkip to conversation

sh: fix sh7785 master clock value

PATCH Applied Yoshihiro Shimoda 2 participants 2 messages May 15, 2008 SuperH

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sh: fix sh7785 master clock value

---
 arch/sh/kernel/cpu/sh4a/clock-sh7785.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/sh/kernel/cpu/sh4a/clock-sh7785.c +1 -1
index 805535a..27fa81b 100644
@@ -26,7 +26,7 @@ static int pfc_divisors[] = { 1, 1, 1, 1, 1, 1, 1, 18,
 
 static void master_clk_init(struct clk *clk)
 {
-	clk->rate *= 36;
+	clk->rate *= pfc_divisors[ctrl_inl(FRQMR1) & 0x000f];
 }
 
 static struct clk_ops sh7785_master_clk_ops = {
Applied
#1 lore raw
Quoted 11 lines · Yoshihiro Shimoda
---
 arch/sh/kernel/cpu/sh4a/clock-sh7785.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/sh/kernel/cpu/sh4a/clock-sh7785.c +0 -0
index 805535a..27fa81b 100644

arch/sh/kernel/cpu/sh4a/clock-sh7785.c static int pfc_divisors[] = { 1, 1, 1, 1, 1, 1, 1, 18, · line 32

Quoted 8 lines
arch/sh/kernel/cpu/sh4a/clock-sh7785.c +1 -1
@@ -26,7 +26,7 @@ static int pfc_divisors[] = { 1, 1, 1, 1, 1, 1, 1, 18,
 
 static void master_clk_init(struct clk *clk)
 {
-	clk->rate *= 36;
+	clk->rate *= pfc_divisors[ctrl_inl(FRQMR1) & 0x000f];
 }
 
 static struct clk_ops sh7785_master_clk_ops = {

Applied, thanks.