summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/pm24xx.c
diff options
context:
space:
mode:
authorJouni Hogander <jouni.hogander@nokia.com>2009-02-04 00:49:04 +0100
committerKevin Hilman <khilman@deeprootsystems.com>2009-05-28 19:59:04 +0200
commit94434535bd36ca010a81e1199f954beef2c4de64 (patch)
tree7abfddf6812d4b88bb4cc8bff5a6acbbc0664a1b /arch/arm/mach-omap2/pm24xx.c
parentOMAP2/3: PM: push core PM code from linux-omap (diff)
downloadlinux-94434535bd36ca010a81e1199f954beef2c4de64.tar.xz
linux-94434535bd36ca010a81e1199f954beef2c4de64.zip
OMAP: Add new function to check wether there is irq pending
Add common omap2/3 function to check wether there is irq pending. Switch to use it in omap2 pm code instead of its own. Signed-off-by: Jouni Hogander <jouni.hogander@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-omap2/pm24xx.c')
-rw-r--r--arch/arm/mach-omap2/pm24xx.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c
index 232b9f6032e8..d38f3121dde9 100644
--- a/arch/arm/mach-omap2/pm24xx.c
+++ b/arch/arm/mach-omap2/pm24xx.c
@@ -76,19 +76,6 @@ static int omap2_fclks_active(void)
return 0;
}
-static int omap2_irq_pending(void)
-{
- u32 pending_reg = 0x480fe098;
- int i;
-
- for (i = 0; i < 4; i++) {
- if (omap_readl(pending_reg))
- return 1;
- pending_reg += 0x20;
- }
- return 0;
-}
-
static void omap2_enter_full_retention(void)
{
u32 l;
@@ -127,7 +114,7 @@ static void omap2_enter_full_retention(void)
/* One last check for pending IRQs to avoid extra latency due
* to sleeping unnecessarily. */
- if (omap2_irq_pending())
+ if (omap_irq_pending())
goto no_sleep;
/* Jump to SRAM suspend code */
@@ -262,13 +249,13 @@ static void omap2_pm_idle(void)
local_fiq_disable();
if (!omap2_can_sleep()) {
- if (omap2_irq_pending())
+ if (omap_irq_pending())
goto out;
omap2_enter_mpu_retention();
goto out;
}
- if (omap2_irq_pending())
+ if (omap_irq_pending())
goto out;
omap2_enter_full_retention();