public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm: omap2+: hwmod: fix breakage introduced by d6504acd
Date: Mon, 7 Nov 2011 21:27:07 +0000	[thread overview]
Message-ID: <20111107212707.GH15294@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20111107193908.GA5059@legolas.emea.dhcp.ti.com>

On Mon, Nov 07, 2011 at 09:39:09PM +0200, Felipe Balbi wrote:
> Hi,
> 
> On Mon, Nov 07, 2011 at 06:32:08PM +0000, Russell King - ARM Linux wrote:
> > On Mon, Nov 07, 2011 at 07:56:57PM +0200, Felipe Balbi wrote:
> > > commit d6504acd (OMAP2+: hwmod: remove OMAP_CHIP*) has
> > > mistakenly added MUSB as a hwmod available only on ES2.0
> > > of OMAP3430.
> > > 
> > > MUSB hwmod has always be available on all OMAP revisions
> > > since OMAP2430.
> > 
> > This doesn't seem to solve it:
> 
> then i can't help. From all I know the LDP is based on OMAP3430 so that
> should work. If it doesn't, it's something deeper on hwmod, maybe ?

Nothing here is specific to the LDP.

> Paul, it's your call.

I think I've found it.

Okay, so.  Clearly, *no* one has even tested this stuff on *any* OMAP3
platform:

        /* Register hwmods common to all OMAP3 */
        r = omap_hwmod_register(omap3xxx_hwmods);
        if (!r)
                return r;

Hint: it returns ZERO on success.  What follows is:

        rev = omap_rev();

        /*
         * Register hwmods common to individual OMAP3 families, all
         * silicon revisions (e.g., 34xx, or AM3505/3517, or 36xx)
         * All possible revisions should be included in this conditional.
         */
        if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
            rev == OMAP3430_REV_ES2_1 || rev == OMAP3430_REV_ES3_0 ||
            rev == OMAP3430_REV_ES3_1 || rev == OMAP3430_REV_ES3_1_2) {
...
which can only ever be reached _iff_ registering omap3xxx_hwmods _fails_.
Not succeeds, but _fails_.

Not surprisingly, the same error is repeated below this group of if
statements:

        r = omap_hwmod_register(h);
        if (!r)
                return r;

So, multiple instances of the same brokenness.

With those both fixed, we come to the next pile of BROKENNESS:

WARNING: at /home/rmk/git/linux-rmk/arch/arm/mach-omap2/omap_hwmod.c:1963 omap_hwmod_register+0x130/0x168()
omap_hwmod: sr1_hwmod: _register returned -22
Modules linked in:
Backtrace:
[<c0017920>] (dump_backtrace+0x0/0x10c) from [<c02d9918>] (dump_stack+0x18/0x1c) r7:c03f3ef0 r6:c03cc318 r5:c0370c9f r4:000007ab
[<c02d9900>] (dump_stack+0x0/0x1c) from [<c003ae88>] (warn_slowpath_common+0x58/0x70)
[<c003ae30>] (warn_slowpath_common+0x0/0x70) from [<c003af44>] (warn_slowpath_fmt+0x38/0x40)
 r8:c0433e84 r7:00000001 r6:c03f9550 r5:c03eb41c r4:c0402f4c
[<c003af0c>] (warn_slowpath_fmt+0x0/0x40) from [<c03cc318>] (omap_hwmod_register+0x130/0x168)
 r3:c0374aba r2:c037127b
[<c03cc1e8>] (omap_hwmod_register+0x0/0x168) from [<c03cdc70>] (omap3xxx_hwmod_init+0xd8/0x170)
 r8:c0818fb4 r7:c03f7968 r6:00000000 r5:00000000 r4:34300234
[<c03cdb98>] (omap3xxx_hwmod_init+0x0/0x170) from [<c03c9c70>] (omap3_init_early+0x24/0x30)
 r6:c03e6484 r5:c0818fe4 r4:c0932980
[<c03c9c4c>] (omap3_init_early+0x0/0x30) from [<c03c9cc8>] (omap3430_init_early+0x10/0x14)
[<c03c6a24>] (setup_arch+0x0/0x818) from [<c03c3638>] (start_kernel+0x80/0x308)
[<c03c35b8>] (start_kernel+0x0/0x308) from [<80008040>] (0x80008040)
 r8:80004059 r7:c03f789c r6:c03e79c8 r5:c03f4098 r4:10c53c7d
---[ end trace 1b75b31a2719ed1c ]---
------------[ cut here ]------------
WARNING: at /home/rmk/git/linux-rmk/arch/arm/mach-omap2/omap_hwmod.c:1963 omap_hwmod_register+0x130/0x168()
omap_hwmod: sr2_hwmod: _register returned -22
Modules linked in:
Backtrace:
[<c0017920>] (dump_backtrace+0x0/0x10c) from [<c02d9918>] (dump_stack+0x18/0x1c) r7:c03f3ef0 r6:c03cc318 r5:c0370c9f r4:000007ab
[<c02d9900>] (dump_stack+0x0/0x1c) from [<c003ae88>] (warn_slowpath_common+0x58/0x70)
[<c003ae30>] (warn_slowpath_common+0x0/0x70) from [<c003af44>] (warn_slowpath_fmt+0x38/0x40)
 r8:c0433e84 r7:00000001 r6:c03f9550 r5:c03eb420 r4:c0402fd0
[<c003af0c>] (warn_slowpath_fmt+0x0/0x40) from [<c03cc318>] (omap_hwmod_register+0x130/0x168)
 r3:c0374ac4 r2:c037127b
[<c03cc1e8>] (omap_hwmod_register+0x0/0x168) from [<c03cdc70>] (omap3xxx_hwmod_init+0xd8/0x170)
 r8:c0818fb4 r7:c03f7968 r6:00000000 r5:00000000 r4:34300234
[<c03cdb98>] (omap3xxx_hwmod_init+0x0/0x170) from [<c03c9c70>] (omap3_init_early+0x24/0x30)
 r6:c03e6484 r5:c0818fe4 r4:c0932980
[<c03c9c4c>] (omap3_init_early+0x0/0x30) from [<c03c9cc8>] (omap3430_init_early+0x10/0x14)
[<c03c9cb8>] (omap3430_init_early+0x0/0x14) from [<c03c7120>] (setup_arch+0x6fc/0x818)
[<c03c6a24>] (setup_arch+0x0/0x818) from [<c03c3638>] (start_kernel+0x80/0x308)
[<c03c35b8>] (start_kernel+0x0/0x308) from [<80008040>] (0x80008040)
 r8:80004059 r7:c03f789c r6:c03e79c8 r5:c03f4098 r4:10c53c7d
---[ end trace 1b75b31a2719ed1d ]---

Again, this is not specific to the LDP.  It's whinging about:

static __initdata struct omap_hwmod *omap3xxx_hwmods[] = {

btw, this should be:

static struct omap_hwmod *omap3xxx_hwmods[] __initdata = {

...
        &omap34xx_sr1_hwmod,		<<== XXX
        &omap34xx_sr2_hwmod,		<<== XXX
...
};

static __initdata struct omap_hwmod *omap34xx_hwmods[] = {
        &omap34xx_sr1_hwmod,		<<== XXX
        &omap34xx_sr2_hwmod,		<<== XXX
        &omap3xxx_usbhsotg_hwmod,
        NULL
};

Again, can never have been tested on OMAP3.

Does anyone apart from me bother doing any testing what so ever on OMAP3
platforms?  Am I the only one?

  reply	other threads:[~2011-11-07 21:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-07 17:56 [PATCH] arm: omap2+: hwmod: fix breakage introduced by d6504acd Felipe Balbi
2011-11-07 18:32 ` Russell King - ARM Linux
2011-11-07 19:39   ` Felipe Balbi
2011-11-07 21:27     ` Russell King - ARM Linux [this message]
2011-11-07 21:29       ` Paul Walmsley
2011-11-07 22:41         ` Russell King - ARM Linux
2011-11-07 22:51           ` Tony Lindgren
2011-11-07 22:55             ` Russell King - ARM Linux
2011-11-07 23:07               ` Tony Lindgren
2011-11-07 23:16                 ` Russell King - ARM Linux
2011-11-07 23:27                   ` Tony Lindgren
2011-11-07 21:30 ` Paul Walmsley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111107212707.GH15294@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox