Commit 6b85638b authored by Santosh Shilimkar's avatar Santosh Shilimkar

ARM: OMAP2+: PM: Remove bogus fiq_[enable/disable] tuple

On OMAP platform, FIQ is reserved for secure environment only. If at all
the FIQ needs to be disabled, it involves going through security
API call. Hence the local_fiq_[enable/disable]() in the OMAP code is bogus.
On GP devices too, the fiq is disabled for non-secure software.

So just get rid of it.
Signed-off-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
parent f98d5fe8
...@@ -107,8 +107,6 @@ static int __omap3_enter_idle(struct cpuidle_device *dev, ...@@ -107,8 +107,6 @@ static int __omap3_enter_idle(struct cpuidle_device *dev,
{ {
struct omap3_idle_statedata *cx = &omap3_idle_data[index]; struct omap3_idle_statedata *cx = &omap3_idle_data[index];
local_fiq_disable();
if (omap_irq_pending() || need_resched()) if (omap_irq_pending() || need_resched())
goto return_sleep_time; goto return_sleep_time;
...@@ -143,7 +141,6 @@ static int __omap3_enter_idle(struct cpuidle_device *dev, ...@@ -143,7 +141,6 @@ static int __omap3_enter_idle(struct cpuidle_device *dev,
clkdm_allow_idle(mpu_pd->pwrdm_clkdms[0]); clkdm_allow_idle(mpu_pd->pwrdm_clkdms[0]);
return_sleep_time: return_sleep_time:
local_fiq_enable();
return index; return index;
} }
......
...@@ -70,10 +70,7 @@ static int omap4_enter_idle_simple(struct cpuidle_device *dev, ...@@ -70,10 +70,7 @@ static int omap4_enter_idle_simple(struct cpuidle_device *dev,
struct cpuidle_driver *drv, struct cpuidle_driver *drv,
int index) int index)
{ {
local_fiq_disable();
omap_do_wfi(); omap_do_wfi();
local_fiq_enable();
return index; return index;
} }
...@@ -84,8 +81,6 @@ static int omap4_enter_idle_coupled(struct cpuidle_device *dev, ...@@ -84,8 +81,6 @@ static int omap4_enter_idle_coupled(struct cpuidle_device *dev,
struct omap4_idle_statedata *cx = &omap4_idle_data[index]; struct omap4_idle_statedata *cx = &omap4_idle_data[index];
int cpu_id = smp_processor_id(); int cpu_id = smp_processor_id();
local_fiq_disable();
/* /*
* CPU0 has to wait and stay ON until CPU1 is OFF state. * CPU0 has to wait and stay ON until CPU1 is OFF state.
* This is necessary to honour hardware recommondation * This is necessary to honour hardware recommondation
...@@ -158,8 +153,6 @@ static int omap4_enter_idle_coupled(struct cpuidle_device *dev, ...@@ -158,8 +153,6 @@ static int omap4_enter_idle_coupled(struct cpuidle_device *dev,
cpuidle_coupled_parallel_barrier(dev, &abort_barrier); cpuidle_coupled_parallel_barrier(dev, &abort_barrier);
cpu_done[dev->cpu] = false; cpu_done[dev->cpu] = false;
local_fiq_enable();
return index; return index;
} }
......
...@@ -200,22 +200,17 @@ static int omap2_can_sleep(void) ...@@ -200,22 +200,17 @@ static int omap2_can_sleep(void)
static void omap2_pm_idle(void) static void omap2_pm_idle(void)
{ {
local_fiq_disable();
if (!omap2_can_sleep()) { if (!omap2_can_sleep()) {
if (omap_irq_pending()) if (omap_irq_pending())
goto out; return;
omap2_enter_mpu_retention(); omap2_enter_mpu_retention();
goto out; return;
} }
if (omap_irq_pending()) if (omap_irq_pending())
goto out; return;
omap2_enter_full_retention(); omap2_enter_full_retention();
out:
local_fiq_enable();
} }
static void __init prcm_setup_regs(void) static void __init prcm_setup_regs(void)
......
...@@ -346,19 +346,14 @@ void omap_sram_idle(void) ...@@ -346,19 +346,14 @@ void omap_sram_idle(void)
static void omap3_pm_idle(void) static void omap3_pm_idle(void)
{ {
local_fiq_disable();
if (omap_irq_pending()) if (omap_irq_pending())
goto out; return;
trace_cpu_idle(1, smp_processor_id()); trace_cpu_idle(1, smp_processor_id());
omap_sram_idle(); omap_sram_idle();
trace_cpu_idle(PWR_EVENT_EXIT, smp_processor_id()); trace_cpu_idle(PWR_EVENT_EXIT, smp_processor_id());
out:
local_fiq_enable();
} }
#ifdef CONFIG_SUSPEND #ifdef CONFIG_SUSPEND
...@@ -757,14 +752,12 @@ int __init omap3_pm_init(void) ...@@ -757,14 +752,12 @@ int __init omap3_pm_init(void)
pr_err("Memory allocation failed when allocating for secure sram context\n"); pr_err("Memory allocation failed when allocating for secure sram context\n");
local_irq_disable(); local_irq_disable();
local_fiq_disable();
omap_dma_global_context_save(); omap_dma_global_context_save();
omap3_save_secure_ram_context(); omap3_save_secure_ram_context();
omap_dma_global_context_restore(); omap_dma_global_context_restore();
local_irq_enable(); local_irq_enable();
local_fiq_enable();
} }
omap3_save_scratchpad_contents(); omap3_save_scratchpad_contents();
......
...@@ -131,11 +131,7 @@ static int __init pwrdms_setup(struct powerdomain *pwrdm, void *unused) ...@@ -131,11 +131,7 @@ static int __init pwrdms_setup(struct powerdomain *pwrdm, void *unused)
*/ */
static void omap_default_idle(void) static void omap_default_idle(void)
{ {
local_fiq_disable();
omap_do_wfi(); omap_do_wfi();
local_fiq_enable();
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment