Fix handling of return value in omap3xx_hwmod_init and sr warning.
Subsystems (4)
After this, I got some new warnings during bootup about sr1_hwmod and sr2_hwmod. This is fixed with PATCH2/2.
-J?rgen
PATCH 1/2 ARM:OMAP:hwmod: Fix handling of return value in omap3xx_hwmod_init.
Because omap_hwmod_register() always return '0', checking the return value as followed:
r = omap_hwmod_register(omap3xxx_hwmods); if (!r) return r;
leads to exiting the omap3xxx_hwmod_init() function right after adding the omap3xxx_hwmods which are common to all omap3 variants.
Therefore hwmods special to other revisions will not be registered.
--- arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 13 ++++--------- 1 files changed, 4 insertions(+), 9 deletions(-)
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +4 -9
@@ -3261,14 +3261,11 @@ static __initdata struct omap_hwmod *am35xx_hwmods[] = {int __init omap3xxx_hwmod_init (void ) { -int r;struct omap_hwmod **h =NULL ;unsigned int rev;/* Register hwmods common to all OMAP3 */ - r =omap_hwmod_register (omap3xxx_hwmods); -if (!r) -return r; +omap_hwmod_register (omap3xxx_hwmods); rev =omap_rev ();
@@ -3291,9 +3288,7 @@ int __init omap3xxx_hwmod_init(void)return -EINVAL ; }; - r =omap_hwmod_register (h); -if (!r) -return r; +omap_hwmod_register (h);/* * Register hwmods specific to certain ES levels of a
@@ -3309,7 +3304,7 @@ int __init omap3xxx_hwmod_init(void) };if (h) - r =omap_hwmod_register (h); +omap_hwmod_register (h); -return r; +return 0 ; }
Signature · 1 line
1.7.0.4
PATCH 2/2 ARM:OMAP:hwmod: Fix sr1_hwmod and sr2_hwmod warning.
In reply to Juergen Kilbsr1_hwmod and sr2_hwmod are handled in omap34xx_hwmods, which is for all omap34xx variants.
But they are also defined in omap3xxx_hwmods.
This leads to:
[ 0.000000] WARNING: at arch/arm/mach-omap2/omap_hwmod.c:1959 omap_hwmod_register+0x40/0x1ac() [ 0.000000] omap_hwmod: sr1_hwmod: _register returned -22 [ 0.000000] Modules linked in: [ 0.000000] [<c001b11c>] (unwind_backtrace+0x0/0xf4) from [<c0051540>] (warn_slowpath_common+0x4c/0x64) [ 0.000000] [<c0051540>] (warn_slowpath_common+0x4c/0x64) from [<c00515ec>] (warn_slowpath_fmt+0x30/0x40) [ 0.000000] [<c00515ec>] (warn_slowpath_fmt+0x30/0x40) from [<c0639370>] (omap_hwmod_register+0x40/0x1ac) [ 0.000000] [<c0639370>] (omap_hwmod_register+0x40/0x1ac) from [<c063c138>] (omap3xxx_hwmod_init+0xb0/0x188) [ 0.000000] [<c063c138>] (omap3xxx_hwmod_init+0xb0/0x188) from [<c06365b0>] (omap3_init_early+0x20/0x30) [ 0.000000] [<c06365b0>] (omap3_init_early+0x20/0x30) from [<c063219c>] (setup_arch+0x528/0x9a4) [ 0.000000] [<c063219c>] (setup_arch+0x528/0x9a4) from [<c062e64c>] (start_kernel+0x7c/0x330) [ 0.000000] [<c062e64c>] (start_kernel+0x7c/0x330) from [<80008044>] (0x80008044) [ 0.000000] ---[ end trace 1b75b31a2719ed1c ]--- [ 0.000000] ------------[ cut here ]------------ [ 0.000000] WARNING: at arch/arm/mach-omap2/omap_hwmod.c:1959 omap_hwmod_register+0x40/0x1ac() [ 0.000000] omap_hwmod: sr2_hwmod: _register returned -22 [ 0.000000] Modules linked in: [ 0.000000] [<c001b11c>] (unwind_backtrace+0x0/0xf4) from [<c0051540>] (warn_slowpath_common+0x4c/0x64) [ 0.000000] [<c0051540>] (warn_slowpath_common+0x4c/0x64) from [<c00515ec>] (warn_slowpath_fmt+0x30/0x40) [ 0.000000] [<c00515ec>] (warn_slowpath_fmt+0x30/0x40) from [<c0639370>] (omap_hwmod_register+0x40/0x1ac) [ 0.000000] [<c0639370>] (omap_hwmod_register+0x40/0x1ac) from [<c063c138>] (omap3xxx_hwmod_init+0xb0/0x188) [ 0.000000] [<c063c138>] (omap3xxx_hwmod_init+0xb0/0x188) from [<c06365b0>] (omap3_init_early+0x20/0x30) [ 0.000000] [<c06365b0>] (omap3_init_early+0x20/0x30) from [<c063219c>] (setup_arch+0x528/0x9a4) [ 0.000000] [<c063219c>] (setup_arch+0x528/0x9a4) from [<c062e64c>] (start_kernel+0x7c/0x330) [ 0.000000] [<c062e64c>] (start_kernel+0x7c/0x330) from [<80008044>] (0x80008044) [ 0.000000] ---[ end trace 1b75b31a2719ed1d ]---
So remove them from omap3xxx_hwmod definition.
--- arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +0 -2
@@ -3188,8 +3188,6 @@ static __initdata struct omap_hwmod *omap3xxx_hwmods[] = { &omap3xxx_i2c1_hwmod, &omap3xxx_i2c2_hwmod, &omap3xxx_i2c3_hwmod, - &omap34xx_sr1_hwmod, - &omap34xx_sr2_hwmod,/* gpio class */ &omap3xxx_gpio1_hwmod,
Signature · 1 line
1.7.0.4
Paul Walmsley
maintainerQuoted 2 lines · Juergen Kilb
After this, I got some new warnings during bootup about
sr1_hwmodandsr2_hwmod. This is fixed with PATCH2/2.
Thanks for the patches, but these should be already fixed by
http://www.spinics.net/lists/arm-kernel/msg143549.html
- Paul