diff mbox

[1/7] OMAP2xxx clock: init osc_ck, sys_ck internal lists early

Message ID 20090414182324.22344.71159.stgit@localhost.localdomain (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Paul Walmsley April 14, 2009, 6:23 p.m. UTC
Commit 3f0a820c4c0b4670fb5f164baa5582e23c2ef118 breaks OMAP2xxx boot
during initial propagate_rate() on osc_ck and sys_ck.  Fix by calling
clk_init_one() for these clocks first.

Resolves

<1>Unable to handle kernel NULL pointer dereference at virtual address 00000000
<1>pgd = c0004000
<1>[00000000] *pgd=00000000
Internal error: Oops: 5 [#1]
Modules linked in:
CPU: 0    Not tainted  (2.6.29-omap1 #37)
PC is at propagate_rate+0x10/0x60
LR is at omap2_clk_init+0x30/0x218
...

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Tested-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Cc: Russell King <linux@arm.linux.org.uk>
---
 arch/arm/mach-omap2/clock24xx.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)



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

Comments

Paul Walmsley April 14, 2009, 6:31 p.m. UTC | #1
Modifying subject line since lists.arm.linux.org.uk mail server bounces 
subjects containing "xxx".

- Paul

On Tue, 14 Apr 2009, Paul Walmsley wrote:

> Commit 3f0a820c4c0b4670fb5f164baa5582e23c2ef118 breaks OMAP2xxx boot
> during initial propagate_rate() on osc_ck and sys_ck.  Fix by calling
> clk_init_one() for these clocks first.
> 
> Resolves
> 
> <1>Unable to handle kernel NULL pointer dereference at virtual address 00000000
> <1>pgd = c0004000
> <1>[00000000] *pgd=00000000
> Internal error: Oops: 5 [#1]
> Modules linked in:
> CPU: 0    Not tainted  (2.6.29-omap1 #37)
> PC is at propagate_rate+0x10/0x60
> LR is at omap2_clk_init+0x30/0x218
> ...
> 
> Signed-off-by: Paul Walmsley <paul@pwsan.com>
> Tested-by: Jarkko Nikula <jarkko.nikula@nokia.com>
> Cc: Russell King <linux@arm.linux.org.uk>
> ---
>  arch/arm/mach-omap2/clock24xx.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/clock24xx.c b/arch/arm/mach-omap2/clock24xx.c
> index 1e839c5..3b7ecc6 100644
> --- a/arch/arm/mach-omap2/clock24xx.c
> +++ b/arch/arm/mach-omap2/clock24xx.c
> @@ -720,6 +720,8 @@ int __init omap2_clk_init(void)
>  
>  	clk_init(&omap2_clk_functions);
>  
> +	clk_init_one(&osc_ck);
> +	clk_init_one(&sys_ck);
>  	osc_ck.rate = omap2_osc_clk_recalc(&osc_ck);
>  	propagate_rate(&osc_ck);
>  	sys_ck.rate = omap2_sys_clk_recalc(&sys_ck);
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Russell King - ARM Linux April 14, 2009, 6:37 p.m. UTC | #2
On Tue, Apr 14, 2009 at 12:31:47PM -0600, Paul Walmsley wrote:
> Modifying subject line since lists.arm.linux.org.uk mail server bounces 
> subjects containing "xxx".

And quite rightly too.
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Russell King - ARM Linux April 21, 2009, 7:54 p.m. UTC | #3
On Tue, Apr 14, 2009 at 12:31:47PM -0600, Paul Walmsley wrote:
> On Tue, 14 Apr 2009, Paul Walmsley wrote:
> > Commit 3f0a820c4c0b4670fb5f164baa5582e23c2ef118 breaks OMAP2xxx boot
> > during initial propagate_rate() on osc_ck and sys_ck.  Fix by calling
> > clk_init_one() for these clocks first.

A better fix would be to move the loop initializing all clocks to be
immediately after the call to clk_init().
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" 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 --git a/arch/arm/mach-omap2/clock24xx.c b/arch/arm/mach-omap2/clock24xx.c
index 1e839c5..3b7ecc6 100644
--- a/arch/arm/mach-omap2/clock24xx.c
+++ b/arch/arm/mach-omap2/clock24xx.c
@@ -720,6 +720,8 @@  int __init omap2_clk_init(void)
 
 	clk_init(&omap2_clk_functions);
 
+	clk_init_one(&osc_ck);
+	clk_init_one(&sys_ck);
 	osc_ck.rate = omap2_osc_clk_recalc(&osc_ck);
 	propagate_rate(&osc_ck);
 	sys_ck.rate = omap2_sys_clk_recalc(&sys_ck);