OMAP2xxx clock: pre-initialize struct clks early
authorPaul Walmsley <paul@pwsan.com>
Thu, 23 Apr 2009 01:48:53 +0000 (19:48 -0600)
committerpaul <paul@twilight.(none)>
Thu, 23 Apr 2009 01:48:53 +0000 (19:48 -0600)
commitc8088112fd96ad8b0f0bcd2f168fe6a17bf3cb41
treee060184cd9a69f446c3b12317a2e8e249c72d32e
parent577c9c456f0e1371cbade38eaf91ae8e8a308555
OMAP2xxx clock: pre-initialize struct clks early

Commit 3f0a820c4c0b4670fb5f164baa5582e23c2ef118 breaks OMAP2xxx boot
during initial propagate_rate() on osc_ck and sys_ck.  Fix by
pre-initializing all struct clks before running any other clock init
code.  Incorporates review comments from Russell King
<rmk+kernel@arm.linux.org.uk>.

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 <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-omap2/clock24xx.c
arch/arm/plat-omap/clock.c