diff mbox

sh: fix clock for sh7785

Message ID 4A2F461A.8080506@renesas.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Yoshihiro Shimoda June 10, 2009, 5:35 a.m. UTC
Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
---
 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(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Magnus Damm June 10, 2009, 10:55 a.m. UTC | #1
On Wed, Jun 10, 2009 at 2:35 PM, Yoshihiro
Shimoda<shimoda.yoshihiro@renesas.com> wrote:
> Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
> ---
>  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.

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

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

Or am I misunderstanding?

/ magnus
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Yoshihiro Shimoda June 11, 2009, 1:37 a.m. UTC | #2
Magnus Damm wrote:
> On Wed, Jun 10, 2009 at 2:35 PM, Yoshihiro
> Shimoda<shimoda.yoshihiro@renesas.com> wrote:
>> Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
>> ---
>>  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.
> 
> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff -uprN a/arch/sh/kernel/cpu/sh4a/clock-sh7785.c b/arch/sh/kernel/cpu/sh4a/clock-sh7785.c
--- 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 = {