OMAP2/3: fix clock/clockdomain bugs
Paul Walmsley
maintainercover OMAP2/3: fix clock/clockdomain bugs
This series fixes two bugs that cause N800 to panic on boot:
- a OMAP2xxx clock code bug, which caused an "Unhandled fault:
alignment exception (0x001) at 0xc02....." panic; and
- an OMAP2/3 clockdomain bug, which caused an "Unable to handle kernel paging request at virtual address 5f75706d" panic.
These bugs were exposed by 0e5194e1a84c219bebbb78f305b7a8eabc4a3656 and 718fc6cd4db902aa2242a736cc3feb8744a4c71a.
With the following patches applied on git head, N800 boots fine, but only if CONFIG_DEBUG_LL is enabled. If it is disabled, it hangs at some point in early boot. Don't know why.
These patches also boot-tested cleanly on 2430SDP and 3430SDP, both with and without CONFIG_DEBUG_LL.
text data bss dec hex filename
3217805 149808 85008 3452621 34aecd vmlinux.n800.orig 3217837 149808 85008 3452653 34aeed vmlinux.n800
arch/arm/mach-omap2/clock24xx.c | 2 ++ arch/arm/mach-omap2/clockdomain.c | 6 ++++++ 2 files changed, 8 insertions(+), 0 deletions(-)
Paul Walmsley
maintainerPATCH 1/2 OMAP2 clock: associate clocks with clockdomains at startup
The OMAP2 clock code was missing code to associate clocks with clockdomains at registration time; fix this.
Resolves "Unhandled fault: alignment exception (0x001) at 0xc02c1b4e" (address may vary) panic during clock framework init on OMAP2. The alignment error was caused by an attempt to dereference a pointer to a string (1-byte aligned) as if it were a pointer to a structure.
Thanks to Felipe Balbi <[email protected]> for originally reporting this bug.
---
arch/arm/mach-omap2/clock24xx.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/clock24xx.c +2 -0
@@ -567,11 +567,13 @@ int __init omap2_clk_init(void)if ((*clkp)->flags &CLOCK_IN_OMAP242X &&cpu_is_omap2420 ()) {clk_register (*clkp); +omap2_init_clk_clkdm (*clkp);continue ; }if ((*clkp)->flags &CLOCK_IN_OMAP243X &&cpu_is_omap2430 ()) {clk_register (*clkp); +omap2_init_clk_clkdm (*clkp);continue ; } }
Paul Walmsley
maintainerPATCH 2/2 OMAP2/3 clockdomains: autodeps should respect platform flags
In reply to Paul WalmsleyFix the clockdomain autodep code to respect omap_chip platform flags.
Resolves "Unable to handle kernel paging request at virtual address 5f75706d" panic during power management initialization on OMAP2.
---
arch/arm/mach-omap2/clockdomain.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/clockdomain.c +6 -0
@@ -96,6 +96,9 @@ static void _clkdm_add_autodeps(struct clockdomain *clkdm)struct clkdm_pwrdm_autodep *autodep;for (autodep = autodeps; autodep->pwrdm.ptr; autodep++) { +if (!omap_chip_is (autodep->omap_chip)) +continue ; +pr_debug ("clockdomain: adding %s sleepdep/wkdep for " "pwrdm %s\n" , autodep->pwrdm.ptr->name, clkdm->pwrdm.ptr->name);
@@ -118,6 +121,9 @@ static void _clkdm_del_autodeps(struct clockdomain *clkdm)struct clkdm_pwrdm_autodep *autodep;for (autodep = autodeps; autodep->pwrdm.ptr; autodep++) { +if (!omap_chip_is (autodep->omap_chip)) +continue ; +pr_debug ("clockdomain: removing %s sleepdep/wkdep for " "pwrdm %s\n" , autodep->pwrdm.ptr->name, clkdm->pwrdm.ptr->name);
Tony Lindgren
maintainerQuoted 10 lines · Paul Walmsley
This series fixes two bugs that cause N800 to panic on boot:
- a OMAP2xxx clock code bug, which caused an "Unhandled fault:
alignment exception (0x001) at0xc02....." panic; and- an OMAP2/3 clockdomain bug, which caused an "Unable to handle kernel paging request at virtual address
5f75706d" panic.These bugs were exposed by
0e5194e1a84c219bebbb78f305b7a8eabc4a3656and718fc6cd4db902aa2242a736cc3feb8744a4c71a.
Great, thanks! Pushing today.
Quoted 3 lines
With the following patches applied on git head, N800 boots fine, but only if
CONFIG_DEBUG_LLis enabled. If it is disabled, it hangs at some point in early boot. Don't know why.
Maybe it needs flasher --enable-rd-mode --set-rd-flags=serial-console?
Quoted 2 lines
These patches also boot-tested cleanly on 2430SDP and 3430SDP, both with and without
CONFIG_DEBUG_LL.
Good
Tony
Quoted 12 lines
text data bss dec hex filename
3217805 149808 85008 3452621 34aecd vmlinux.n800.orig 3217837 149808 85008 3452653 34aeed vmlinux.n800arch/arm/mach-omap2/clock24xx.c | 2 ++ arch/arm/mach-omap2/clockdomain.c | 6 ++++++ 2 files changed, 8 insertions(+), 0 deletions(-)--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html