ARM: OMAP: convert idle handlers from pm_idle to arm_pm_idle
Signed-off-by: Nicolas Pitre <nico@linaro.org> Tested-by: Tony Lindgren <tony@atomide.com>
This commit is contained in:
parent
4fa20439a8
commit
0bcd24b0f4
4 changed files with 6 additions and 20 deletions
|
@ -42,9 +42,9 @@
|
|||
#include <linux/sysfs.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/atomic.h>
|
||||
|
||||
#include <asm/irq.h>
|
||||
#include <linux/atomic.h>
|
||||
#include <asm/mach/time.h>
|
||||
#include <asm/mach/irq.h>
|
||||
|
||||
|
@ -108,13 +108,7 @@ void omap1_pm_idle(void)
|
|||
__u32 use_idlect1 = arm_idlect1_mask;
|
||||
int do_sleep = 0;
|
||||
|
||||
local_irq_disable();
|
||||
local_fiq_disable();
|
||||
if (need_resched()) {
|
||||
local_fiq_enable();
|
||||
local_irq_enable();
|
||||
return;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_OMAP_MPU_TIMER) && !defined(CONFIG_OMAP_DM_TIMER)
|
||||
#warning Enable 32kHz OS timer in order to allow sleep states in idle
|
||||
|
@ -157,14 +151,12 @@ void omap1_pm_idle(void)
|
|||
omap_writel(saved_idlect1, ARM_IDLECT1);
|
||||
|
||||
local_fiq_enable();
|
||||
local_irq_enable();
|
||||
return;
|
||||
}
|
||||
omap_sram_suspend(omap_readl(ARM_IDLECT1),
|
||||
omap_readl(ARM_IDLECT2));
|
||||
|
||||
local_fiq_enable();
|
||||
local_irq_enable();
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -684,7 +676,7 @@ static int __init omap_pm_init(void)
|
|||
return -ENODEV;
|
||||
}
|
||||
|
||||
pm_idle = omap1_pm_idle;
|
||||
arm_pm_idle = omap1_pm_idle;
|
||||
|
||||
if (cpu_is_omap7xx())
|
||||
setup_irq(INT_7XX_WAKE_UP_REQ, &omap_wakeup_irq);
|
||||
|
|
|
@ -232,7 +232,6 @@ static int omap2_can_sleep(void)
|
|||
|
||||
static void omap2_pm_idle(void)
|
||||
{
|
||||
local_irq_disable();
|
||||
local_fiq_disable();
|
||||
|
||||
if (!omap2_can_sleep()) {
|
||||
|
@ -249,7 +248,6 @@ static void omap2_pm_idle(void)
|
|||
|
||||
out:
|
||||
local_fiq_enable();
|
||||
local_irq_enable();
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SUSPEND
|
||||
|
@ -468,7 +466,7 @@ static int __init omap2_pm_init(void)
|
|||
}
|
||||
|
||||
suspend_set_ops(&omap_pm_ops);
|
||||
pm_idle = omap2_pm_idle;
|
||||
arm_pm_idle = omap2_pm_idle;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -418,10 +418,9 @@ void omap_sram_idle(void)
|
|||
|
||||
static void omap3_pm_idle(void)
|
||||
{
|
||||
local_irq_disable();
|
||||
local_fiq_disable();
|
||||
|
||||
if (omap_irq_pending() || need_resched())
|
||||
if (omap_irq_pending())
|
||||
goto out;
|
||||
|
||||
trace_power_start(POWER_CSTATE, 1, smp_processor_id());
|
||||
|
@ -434,7 +433,6 @@ static void omap3_pm_idle(void)
|
|||
|
||||
out:
|
||||
local_fiq_enable();
|
||||
local_irq_enable();
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SUSPEND
|
||||
|
@ -848,7 +846,7 @@ static int __init omap3_pm_init(void)
|
|||
suspend_set_ops(&omap_pm_ops);
|
||||
#endif /* CONFIG_SUSPEND */
|
||||
|
||||
pm_idle = omap3_pm_idle;
|
||||
arm_pm_idle = omap3_pm_idle;
|
||||
omap3_idle_init();
|
||||
|
||||
/*
|
||||
|
|
|
@ -178,13 +178,11 @@ static int __init pwrdms_setup(struct powerdomain *pwrdm, void *unused)
|
|||
*/
|
||||
static void omap_default_idle(void)
|
||||
{
|
||||
local_irq_disable();
|
||||
local_fiq_disable();
|
||||
|
||||
omap_do_wfi();
|
||||
|
||||
local_fiq_enable();
|
||||
local_irq_enable();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -256,7 +254,7 @@ static int __init omap4_pm_init(void)
|
|||
#endif /* CONFIG_SUSPEND */
|
||||
|
||||
/* Overwrite the default arch_idle() */
|
||||
pm_idle = omap_default_idle;
|
||||
arm_pm_idle = omap_default_idle;
|
||||
|
||||
omap4_idle_init();
|
||||
|
||||
|
|
Loading…
Reference in a new issue