From: Kevin Hilman <khilman@deeprootsystems.com>
To: Tero Kristo <tero.kristo@nokia.com>
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH 06/11] OMAP3: PM: Disable interrupt controller AUTOIDLE before WFI
Date: Wed, 11 Nov 2009 15:23:54 -0800 [thread overview]
Message-ID: <874op0zlv9.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1256313835-2391-7-git-send-email-tero.kristo@nokia.com> (Tero Kristo's message of "Fri\, 23 Oct 2009 19\:03\:50 +0300")
Tero Kristo <tero.kristo@nokia.com> writes:
> From: Tero Kristo <tero.kristo@nokia.com>
>
> OMAP interrupt controller goes to unknown state when there is right
> combination of l3,l4 sleep/wake-up transitions, l4 autoidle in
> interrupt controller and some interrupt. When this happens, interrupts
> are not delivered to ARM anymore and ARM will remain in WFI (wait for
> interrupt) until interrupt controller is forced to wake-up
> (i.e. lauterbach).
>
> Signed-off-by: Tero Kristo <tero.kristo@nokia.com>
Thanks, applying to PM branch, queuing for pm-fixes.
Kevin
> ---
> arch/arm/mach-omap2/irq.c | 12 ++++++++++++
> arch/arm/mach-omap2/pm34xx.c | 2 ++
> arch/arm/plat-omap/include/mach/irqs.h | 2 ++
> 3 files changed, 16 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
> index ee8c68a..9241b87 100644
> --- a/arch/arm/mach-omap2/irq.c
> +++ b/arch/arm/mach-omap2/irq.c
> @@ -272,4 +272,16 @@ void omap3_intc_suspend(void)
> /* A pending interrupt would prevent OMAP from entering suspend */
> omap_ack_irq(0);
> }
> +
> +void omap3_intc_prepare_idle(void)
> +{
> + /* Disable autoidle as it can stall interrupt controller */
> + intc_bank_write_reg(0, &irq_banks[0], INTC_SYSCONFIG);
> +}
> +
> +void omap3_intc_resume_idle(void)
> +{
> + /* Re-enable autoidle */
> + intc_bank_write_reg(1, &irq_banks[0], INTC_SYSCONFIG);
> +}
> #endif /* CONFIG_ARCH_OMAP3 */
> diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
> index 492458e..fec9c38 100644
> --- a/arch/arm/mach-omap2/pm34xx.c
> +++ b/arch/arm/mach-omap2/pm34xx.c
> @@ -431,6 +431,7 @@ void omap_sram_idle(void)
> prm_set_mod_reg_bits(OMAP3430_EN_IO, WKUP_MOD, PM_WKEN);
> omap3_enable_io_chain();
> }
> + omap3_intc_prepare_idle();
>
> /*
> * On EMU/HS devices ROM code restores a SRDC value
> @@ -487,6 +488,7 @@ void omap_sram_idle(void)
> OMAP3430_GR_MOD,
> OMAP3_PRM_VOLTCTRL_OFFSET);
> }
> + omap3_intc_resume_idle();
>
> /*
> * Enable smartreflex after WFI. Only needed if we entered
> diff --git a/arch/arm/plat-omap/include/mach/irqs.h b/arch/arm/plat-omap/include/mach/irqs.h
> index ff1faa8..b736c5d 100644
> --- a/arch/arm/plat-omap/include/mach/irqs.h
> +++ b/arch/arm/plat-omap/include/mach/irqs.h
> @@ -486,6 +486,8 @@ extern int omap_irq_pending(void);
> void omap3_intc_save_context(void);
> void omap3_intc_restore_context(void);
> void omap3_intc_suspend(void);
> +void omap3_intc_prepare_idle(void);
> +void omap3_intc_resume_idle(void);
> #endif
>
> #include <mach/hardware.h>
> --
> 1.5.4.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2009-11-11 23:23 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-23 16:03 [PATCHv2 0/11] Misc fixes [for PM branch] Tero Kristo
2009-10-23 16:03 ` [PATCH 01/11] OMAP3: PM: Fixed padconf save done check Tero Kristo
2009-10-23 16:03 ` [PATCH 02/11] OMAP3: Disable Smartreflex before pwrdm enters RET Tero Kristo
2009-10-23 16:03 ` [PATCH 03/11] OMAP2/3: DMTIMER: Clear pending interrupts when stopping a timer Tero Kristo
2009-10-23 16:03 ` [PATCH 04/11] OMAP3: PM: Ack pending interrupts before entering suspend Tero Kristo
2009-10-23 16:03 ` [PATCH 05/11] OMAP3: PM: Enable system control module autoidle Tero Kristo
2009-10-23 16:03 ` [PATCH 06/11] OMAP3: PM: Disable interrupt controller AUTOIDLE before WFI Tero Kristo
2009-10-23 16:03 ` [PATCH 07/11] OMAP3: Fixed ARM aux ctrl register save/restore Tero Kristo
2009-10-23 16:03 ` [PATCH 08/11] OMAP3: PM: Disabled I2C4 repeated start operation mode Tero Kristo
2009-10-23 16:03 ` [PATCH 09/11] OMAP3: PM: Added support for L2 aux ctrl register save and restore Tero Kristo
2009-10-23 16:03 ` [PATCH 10/11] OMAP3: PM: Write voltage and clock setup times dynamically in idle loop Tero Kristo
2009-10-23 16:03 ` [PATCH 11/11] OMAP3: PM: Disable OTG autoidle when waking up from off-mode Tero Kristo
2009-11-11 23:42 ` Kevin Hilman
2009-11-12 6:24 ` Gadiyar, Anand
2009-11-12 7:43 ` Gadiyar, Anand
2009-11-12 9:42 ` Tero.Kristo
2009-11-12 15:10 ` Kevin Hilman
2009-11-11 23:47 ` [PATCH 10/11] OMAP3: PM: Write voltage and clock setup times dynamically in idle loop Kevin Hilman
2009-11-11 23:44 ` [PATCH 09/11] OMAP3: PM: Added support for L2 aux ctrl register save and restore Kevin Hilman
2009-11-12 8:40 ` Tero.Kristo
2009-11-11 23:30 ` [PATCH 08/11] OMAP3: PM: Disabled I2C4 repeated start operation mode Kevin Hilman
2009-11-12 9:40 ` Tero.Kristo
2009-10-28 9:31 ` [PATCH 07/11] OMAP3: Fixed ARM aux ctrl register save/restore Gopinath, Thara
2009-10-28 10:54 ` Tero.Kristo
2009-10-28 11:02 ` Gopinath, Thara
2009-11-11 23:27 ` Kevin Hilman
2009-11-12 8:39 ` Tero.Kristo
2009-11-12 9:49 ` Gopinath, Thara
2009-11-12 15:20 ` Kevin Hilman
2009-11-11 23:23 ` Kevin Hilman [this message]
2009-11-11 23:19 ` [PATCH 04/11] OMAP3: PM: Ack pending interrupts before entering suspend Kevin Hilman
2009-11-11 23:18 ` [PATCH 03/11] OMAP2/3: DMTIMER: Clear pending interrupts when stopping a timer Kevin Hilman
2009-11-11 23:17 ` [PATCH 02/11] OMAP3: Disable Smartreflex before pwrdm enters RET Kevin Hilman
2009-11-11 23:16 ` [PATCH 01/11] OMAP3: PM: Fixed padconf save done check Kevin Hilman
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=874op0zlv9.fsf@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=linux-omap@vger.kernel.org \
--cc=tero.kristo@nokia.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