Skip to contentSkip to conversation

sh: fix clock for sh7785

PATCH In review Yoshihiro Shimoda 2 participants 3 messages Jun 10, 2009 – Jun 11, 2009 SuperH

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sh: fix clock for sh7785

---
Could you apply this patch to linux-2.6.30?
If impossible, this patch is not necessary because clock-sh7785.c will modify in linux-2.6.31.

 arch/sh/kernel/cpu/sh4a/clock-sh7785.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
arch/sh/kernel/cpu/sh4a/clock-sh7785.c +3 -1
diff -uprN a/arch/sh/kernel/cpu/sh4a/clock-sh7785.c b/arch/sh/kernel/cpu/sh4a/clock-sh7785.c
@@ -26,7 +26,9 @@ static int pfc_divisors[] = { 1, 1, 1, 1
 
 static void master_clk_init(struct clk *clk)
 {
-	clk->rate *= pfc_divisors[ctrl_inl(FRQMR1) & 0x000f];
+	unsigned long frqmr1 = ctrl_inl(FRQMR1);
+
+	clk->rate = CONFIG_SH_PCLK_FREQ * pfc_divisors[frqmr1 & 0x000f];
 }
 
 static struct clk_ops sh7785_master_clk_ops = {
#2 lore raw
In reply to Yoshihiro Shimoda
Quoted 8 lines · Magnus Damm
Quoted 5 lines · Yoshihiro Shimoda

---
Could you apply this patch to linux-2.6.30?
If impossible, this patch is not necessary because clock-sh7785.c will modify in linux-2.6.31.

Quoted 5 lines

This patch looks like a workaround for the issue solved by this patch:

http://patchwork.kernel.org/patch/22299/

Or am I misunderstanding?

Thank you for your comment.

Because the patch was due to be applied linux-2.6.31, a problem remains linux-2.6.30. However since linux-2.6.30 had already been released, my patch became unnecessary :)

Thanks,
Yoshihiro Shimoda