From: Tony Lindgren <tony@atomide.com>
To: Paul Walmsley <paul@pwsan.com>
Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] ARM: OMAP2+: hwmod: Rearm wake-up interrupts for DT when MUSB is idled
Date: Wed, 27 Aug 2014 10:00:26 -0700 [thread overview]
Message-ID: <20140827170025.GD16006@atomide.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1408271632550.21249@utopia.booyaka.com>
* Paul Walmsley <paul@pwsan.com> [140827 09:38]:
> On Mon, 25 Aug 2014, Tony Lindgren wrote:
>
> > Looks like MUSB cable removal can cause wake-up interrupts to
> > stop working for device tree based booting at least for UART3
> > even as nothing is dynamically remuxed. This can be fixed by
> > calling reconfigure_io_chain() for device tree based booting
> > in hwmod code.
>
> Weird, nice find. Do you know if this applies to all OMAPs, or just
> OMAP3?
I guess it may also apply to others too, but so far I've only
seen this on omap3 occasionally.
> > Note that we already do that for legacy booting
> > if the legacy mux is configured.
> >
> > My guess is that this is related to UART3 and MUSB ULPI
> > hsusb0_data0 and hsusb0_data1 support for Carkit mode that
> > somehow affect the configured IO chain for UART3 and require
> > rearming the wake-up interrupts.
> >
> > In general, for device tree based booting, pinctrl-single
> > calls the rearm hook that in turn calls reconfigure_io_chain
> > so calling reconfigure_io_chain should not be needed from the
> > hwmod code for other events.
> >
> > So let's limit the hwmod rearming of iochain only to
> > HWMOD_FORCE_MSTANDBY where MUSB is currently the only user
> > of it. If we see other devices needing similar changes we can
> > add more checks for it.
>
> Could you please add a new hwmod flag for this case? Maybe something like
> HWMOD_RECONFIG_IO_CHAIN? I think that would make the code easier to read
> and more maintainable, since the workaround would then be explicitly
> connected with that particular workaround's flag. Looks like we have
> several flag bits left. Plus if we wind up having to set
> HWMOD_FORCE_MSTANDBY for other devices that might not need the I/O chain
> reconfiguration, we won't have to reimplement this flag workaround.
OK that's a good idea as this may not be always HWMOD_FORCE_MSTANDBY.
I guess I initially assumed that this was always related to
HWMOD_FORCE_MSTANDBY as that's what seemed to hang the system until
I figured it was just the wake-up events that stopped working :)
I'll do that as a follow-up patch as I already sent the pull request
for the $subject one as it was hanging my tests occasionally.
Regards,
Tony
WARNING: multiple messages have this Message-ID (diff)
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: OMAP2+: hwmod: Rearm wake-up interrupts for DT when MUSB is idled
Date: Wed, 27 Aug 2014 10:00:26 -0700 [thread overview]
Message-ID: <20140827170025.GD16006@atomide.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1408271632550.21249@utopia.booyaka.com>
* Paul Walmsley <paul@pwsan.com> [140827 09:38]:
> On Mon, 25 Aug 2014, Tony Lindgren wrote:
>
> > Looks like MUSB cable removal can cause wake-up interrupts to
> > stop working for device tree based booting at least for UART3
> > even as nothing is dynamically remuxed. This can be fixed by
> > calling reconfigure_io_chain() for device tree based booting
> > in hwmod code.
>
> Weird, nice find. Do you know if this applies to all OMAPs, or just
> OMAP3?
I guess it may also apply to others too, but so far I've only
seen this on omap3 occasionally.
> > Note that we already do that for legacy booting
> > if the legacy mux is configured.
> >
> > My guess is that this is related to UART3 and MUSB ULPI
> > hsusb0_data0 and hsusb0_data1 support for Carkit mode that
> > somehow affect the configured IO chain for UART3 and require
> > rearming the wake-up interrupts.
> >
> > In general, for device tree based booting, pinctrl-single
> > calls the rearm hook that in turn calls reconfigure_io_chain
> > so calling reconfigure_io_chain should not be needed from the
> > hwmod code for other events.
> >
> > So let's limit the hwmod rearming of iochain only to
> > HWMOD_FORCE_MSTANDBY where MUSB is currently the only user
> > of it. If we see other devices needing similar changes we can
> > add more checks for it.
>
> Could you please add a new hwmod flag for this case? Maybe something like
> HWMOD_RECONFIG_IO_CHAIN? I think that would make the code easier to read
> and more maintainable, since the workaround would then be explicitly
> connected with that particular workaround's flag. Looks like we have
> several flag bits left. Plus if we wind up having to set
> HWMOD_FORCE_MSTANDBY for other devices that might not need the I/O chain
> reconfiguration, we won't have to reimplement this flag workaround.
OK that's a good idea as this may not be always HWMOD_FORCE_MSTANDBY.
I guess I initially assumed that this was always related to
HWMOD_FORCE_MSTANDBY as that's what seemed to hang the system until
I figured it was just the wake-up events that stopped working :)
I'll do that as a follow-up patch as I already sent the pull request
for the $subject one as it was hanging my tests occasionally.
Regards,
Tony
next prev parent reply other threads:[~2014-08-27 17:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-25 17:14 [PATCH] ARM: OMAP2+: hwmod: Rearm wake-up interrupts for DT when MUSB is idled Tony Lindgren
2014-08-25 17:14 ` Tony Lindgren
2014-08-27 16:38 ` Paul Walmsley
2014-08-27 16:38 ` Paul Walmsley
2014-08-27 17:00 ` Tony Lindgren [this message]
2014-08-27 17:00 ` Tony Lindgren
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=20140827170025.GD16006@atomide.com \
--to=tony@atomide.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=paul@pwsan.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.