Skip to content

Commit

Permalink
OMAP3: PM: Ack pending interrupts before entering suspend
Browse files Browse the repository at this point in the history
Suspending drivers may still generate interrupts just before their suspend is
completed. Any pending interrupts here will prevent sleep.

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 7284ce6 commit 2bbe3af
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions arch/arm/mach-omap2/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,4 +274,10 @@ void omap_intc_restore_context(void)
}
/* MIRs are saved and restore with other PRCM registers */
}

void omap3_intc_suspend(void)
{
/* A pending interrupt would prevent OMAP from entering suspend */
omap_ack_irq(0);
}
#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 @@ -578,6 +578,8 @@ static int omap3_pm_suspend(void)
}

omap_uart_prepare_suspend();
omap3_intc_suspend();

omap_sram_idle();

restore:
Expand Down
1 change: 1 addition & 0 deletions arch/arm/plat-omap/include/plat/irqs.h
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,7 @@ extern void omap_init_irq(void);
extern int omap_irq_pending(void);
void omap_intc_save_context(void);
void omap_intc_restore_context(void);
void omap3_intc_suspend(void);
#endif

#include <mach/hardware.h>
Expand Down

0 comments on commit 2bbe3af

Please sign in to comment.