From: Paul Walmsley <paul@pwsan.com>
To: Tony Lindgren <tony@atomide.com>
Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Subject: Re: [PATCH 02/12] ARM: OMAP3: Use force-idle for UARTs because of DMA errata
Date: Tue, 16 Sep 2014 17:00:52 +0000 (UTC) [thread overview]
Message-ID: <alpine.DEB.2.02.1409161605200.23518@utopia.booyaka.com> (raw)
In-Reply-To: <1410837126-31553-2-git-send-email-tony@atomide.com>
Hi
A few comments
On Mon, 15 Sep 2014, Tony Lindgren wrote:
> In sprz318f.pdf "Usage Note 2.7" says that UARTs cannot acknowledge
> idle requests in smartidle mode when configured for DMA operations.
I don't have Rev. F here. But reading between the typos in Rev. E, all it
says that the UART should be placed into force-idle mode when there are no
DMA transfers scheduled, otherwise CORE won't go idle. However, this
patch does a lot more than that...
> This prevents L4 from going idle. So let's use force-idle mode
> instead and also force reconfiguring of the IO chain wake-up events.
>
> Otherwise systems using Sebastian's 8250 patches with DMA will
> never enter deeper idle states because of the errata above.
>
> Cc: Paul Walmsley <paul@pwsan.com>
> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
> arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 15 +++++++++++----
> 1 file changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
> index 61cd49d..55f088c 100644
> --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
> +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
> @@ -490,7 +490,9 @@ static struct omap_hwmod omap3xxx_uart1_hwmod = {
> .mpu_irqs = omap2_uart1_mpu_irqs,
> .sdma_reqs = omap2_uart1_sdma_reqs,
> .main_clk = "uart1_fck",
> - .flags = DEBUG_TI81XXUART1_FLAGS | HWMOD_SWSUP_SIDLE_ACT,
> + .flags = DEBUG_TI81XXUART1_FLAGS |
> + HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE |
> + HWMOD_FORCE_MSTANDBY | HWMOD_RECONFIG_IO_CHAIN,
... this patch makes four significant changes to the hwmod flags:
1. It changes HWMOD_SWSUP_SIDLE_ACT to HWMOD_SWSUP_SIDLE
2. It adds HWMOD_NO_OCP_AUTOIDLE
3. It adds HWMOD_FORCE_MSTANDBY
4. It adds HWMOD_RECONFIG_IO_CHAIN
As far as I can tell, the only change that actually matches the erratum
usage note is #1. And even that should only be activated when the UART is
in DMA mode.. PIO mode shouldn't need it. (We used to have a DMA-specific
workaround in the driver code for this years ago, which was only enabled
when DMA was used, but it got ripped out in the rush to get rid of the
platform_data function pointers.)
So that leaves the other three flag changes. Of those three, adding
HWMOD_FORCE_MSTANDBY is definitely not correct according to the 34xx
public TRM Rev. ZV, since the UART IP blocks:
a) have no master port,
b) do not contain DMA controllers (they rely on the SDMA), and
c) according to the SYSC_REG register documentation in Table 17-112 of the
above TRM, have no MIDLEMODE bit field.
So adding HWMOD_FORCE_MSTANDBY should have zero effect and it most likely
should be dropped.
Regarding the rest:
I'd be pretty surprised if HWMOD_RECONFIG_IO_CHAIN is needed. If that was
needed, I'd think we would have seen wakeup failures in this path a long
time ago, since the console serial port is the primary debug tool we used
for waking the chip up from deep idle states on demand.
As far as HWMOD_NO_OCP_AUTOIDLE goes: does adding this flag have an effect
when HWMOD_SWSUP_SIDLE is used? If so then this should probably go in as
a separate patch, because it's probably a separate bug than the one
described in the commit message.
...
So I'd suggest restricting this patch to simply change
HWMOD_SWSUP_SIDLE_ACT to HWMOD_SWSUP_SIDLE. Then if the other flags are
needed, would suggest adding them in separate patches, describing what
problems are fixed by adding them.
- Paul
next prev parent reply other threads:[~2014-09-16 17:00 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-16 3:11 [PATCH 01/12] ARM: OMAP2+: Add hwmod flag for HWMOD_RECONFIG_IO_CHAIN Tony Lindgren
2014-09-16 3:11 ` [PATCH 02/12] ARM: OMAP3: Use force-idle for UARTs because of DMA errata Tony Lindgren
2014-09-16 17:00 ` Paul Walmsley [this message]
2014-09-16 17:44 ` Tony Lindgren
2014-09-17 16:46 ` Paul Walmsley
2014-09-16 3:11 ` [PATCH 03/12] ARM: dts: omap3-overo: Fix UART wake-up events Tony Lindgren
2014-09-16 3:11 ` [PATCH 04/12] ARM: dts: omap: Remove WAKEUPENABLE mux options for UARTs Tony Lindgren
2014-09-16 3:11 ` [PATCH 05/12] ARM: dts: Do not set pulls for I2C lines Tony Lindgren
2014-09-16 3:12 ` [PATCH 06/12] ARM: dts: Add support for Ethernet on some N900 macro boards Tony Lindgren
2014-09-16 3:12 ` [PATCH 07/12] ARM: dts: Enable PMIC idle configuration for LDP Tony Lindgren
2014-09-16 3:12 ` [PATCH 08/12] ARM: omap2plus_defconfig: Shrink with savedefconfig Tony Lindgren
2014-09-16 4:56 ` Felipe Balbi
2014-09-18 15:57 ` Tony Lindgren
2014-09-18 16:03 ` Felipe Balbi
2014-09-16 3:12 ` [PATCH 09/12] ARM: omap2plus_defconfig: Add cpufreq to defconfig Tony Lindgren
2014-09-18 16:11 ` Nishanth Menon
2014-09-18 16:20 ` Tony Lindgren
2014-09-18 16:23 ` Nishanth Menon
2014-09-16 3:12 ` [PATCH 10/12] ARM: omap2plus_defconfig: Add support for distros with systemd Tony Lindgren
2014-09-18 7:01 ` Javier Martinez Canillas
2014-09-16 3:12 ` [PATCH 11/12] ARM: omap2plus_defconfig: Enable battery and reset drivers Tony Lindgren
2014-09-16 3:12 ` [PATCH 12/12] ARM: omap2plus_defconfig: Enable some display features Tony Lindgren
2014-09-16 16:04 ` [PATCH 01/12] ARM: OMAP2+: Add hwmod flag for HWMOD_RECONFIG_IO_CHAIN 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=alpine.DEB.2.02.1409161605200.23518@utopia.booyaka.com \
--to=paul@pwsan.com \
--cc=bigeasy@linutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=tony@atomide.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).