Skip to content

Commit

Permalink
OMAP3: PM: Disable interrupt controller AUTOIDLE before WFI
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
  • Loading branch information
Tero Kristo authored and Kevin Hilman committed Jan 21, 2010
1 parent b296c81 commit f18cc2f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
12 changes: 12 additions & 0 deletions arch/arm/mach-omap2/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,4 +280,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 */
2 changes: 2 additions & 0 deletions arch/arm/mach-omap2/pm34xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,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
Expand Down Expand Up @@ -438,6 +439,7 @@ void omap_sram_idle(void)
OMAP3430_GR_MOD,
OMAP3_PRM_VOLTCTRL_OFFSET);
}
omap3_intc_resume_idle();

/* PER */
if (per_next_state < PWRDM_POWER_ON) {
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/plat-omap/include/plat/irqs.h
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,8 @@ extern int omap_irq_pending(void);
void omap_intc_save_context(void);
void omap_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>
Expand Down

0 comments on commit f18cc2f

Please sign in to comment.