* Fix handling of return value in omap3xx_hwmod_init and sr warning.
@ 2011-11-07 21:30 Juergen Kilb
2011-11-07 21:30 ` [PATCH 1/2] ARM:OMAP:hwmod: Fix handling of return value in omap3xx_hwmod_init Juergen Kilb
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Juergen Kilb @ 2011-11-07 21:30 UTC (permalink / raw)
To: linux-arm-kernel
After this, I got some new warnings during bootup about sr1_hwmod and sr2_hwmod.
This is fixed with PATCH2/2.
-J?rgen
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] ARM:OMAP:hwmod: Fix handling of return value in omap3xx_hwmod_init.
2011-11-07 21:30 Fix handling of return value in omap3xx_hwmod_init and sr warning Juergen Kilb
@ 2011-11-07 21:30 ` Juergen Kilb
2011-11-07 21:30 ` [PATCH 2/2] ARM:OMAP:hwmod: Fix sr1_hwmod and sr2_hwmod warning Juergen Kilb
2011-11-07 21:31 ` Fix handling of return value in omap3xx_hwmod_init and sr warning Paul Walmsley
2 siblings, 0 replies; 4+ messages in thread
From: Juergen Kilb @ 2011-11-07 21:30 UTC (permalink / raw)
To: linux-arm-kernel
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.
Signed-off-by: Juergen Kilb <J.Kilb@phytec.de>
---
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 13 ++++---------
1 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index 3008e16..30ec4bd 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -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;
}
--
1.7.0.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] ARM:OMAP:hwmod: Fix sr1_hwmod and sr2_hwmod warning.
2011-11-07 21:30 Fix handling of return value in omap3xx_hwmod_init and sr warning Juergen Kilb
2011-11-07 21:30 ` [PATCH 1/2] ARM:OMAP:hwmod: Fix handling of return value in omap3xx_hwmod_init Juergen Kilb
@ 2011-11-07 21:30 ` Juergen Kilb
2011-11-07 21:31 ` Fix handling of return value in omap3xx_hwmod_init and sr warning Paul Walmsley
2 siblings, 0 replies; 4+ messages in thread
From: Juergen Kilb @ 2011-11-07 21:30 UTC (permalink / raw)
To: linux-arm-kernel
sr1_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.
Signed-off-by: Juergen Kilb <J.Kilb@phytec.de>
---
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index 30ec4bd..a49e758 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -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,
--
1.7.0.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Fix handling of return value in omap3xx_hwmod_init and sr warning.
2011-11-07 21:30 Fix handling of return value in omap3xx_hwmod_init and sr warning Juergen Kilb
2011-11-07 21:30 ` [PATCH 1/2] ARM:OMAP:hwmod: Fix handling of return value in omap3xx_hwmod_init Juergen Kilb
2011-11-07 21:30 ` [PATCH 2/2] ARM:OMAP:hwmod: Fix sr1_hwmod and sr2_hwmod warning Juergen Kilb
@ 2011-11-07 21:31 ` Paul Walmsley
2 siblings, 0 replies; 4+ messages in thread
From: Paul Walmsley @ 2011-11-07 21:31 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, 7 Nov 2011, Juergen Kilb wrote:
> After this, I got some new warnings during bootup about sr1_hwmod and sr2_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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-11-07 21:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-07 21:30 Fix handling of return value in omap3xx_hwmod_init and sr warning Juergen Kilb
2011-11-07 21:30 ` [PATCH 1/2] ARM:OMAP:hwmod: Fix handling of return value in omap3xx_hwmod_init Juergen Kilb
2011-11-07 21:30 ` [PATCH 2/2] ARM:OMAP:hwmod: Fix sr1_hwmod and sr2_hwmod warning Juergen Kilb
2011-11-07 21:31 ` Fix handling of return value in omap3xx_hwmod_init and sr warning Paul Walmsley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox