diff options
author | Santosh Shilimkar <santosh.shilimkar@ti.com> | 2011-07-18 10:55:10 +0400 |
---|---|---|
committer | Kevin Hilman <khilman@ti.com> | 2011-12-08 23:29:00 +0400 |
commit | 72826b9f8892957156e3d390b74d8bd5e0835d51 (patch) | |
tree | 9a5b68ec7e012115c824fba17dd3340930f21e00 /arch/arm/mach-omap2/pm44xx.c | |
parent | e97ca477e993da87769f967bd6f2602a7eab9715 (diff) | |
download | linux-72826b9f8892957156e3d390b74d8bd5e0835d51.tar.xz |
ARM: OMAP4: PM: Use custom omap_do_wfi() for default idle.
Default arch_idle() isn't good enough for OMAP4 because of aync bridge errata
and necessity of NOPs post WFI to avoid speculative prefetch aborts.
Hence Use OMAP4 custom omap_do_wfi() hook for default idle.
Later in the series, async bridge errata work-around patch updates the
omap_do_wfi() with necessary interconnects barriers.
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Jean Pihet <j-pihet@ti.com>
Reviewed-by: Kevin Hilman <khilman@ti.com>
Tested-by: Vishwanath BS <vishwanath.bs@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/pm44xx.c')
-rw-r--r-- | arch/arm/mach-omap2/pm44xx.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c index 781aadf98e32..72c745047514 100644 --- a/arch/arm/mach-omap2/pm44xx.c +++ b/arch/arm/mach-omap2/pm44xx.c @@ -108,6 +108,24 @@ static int __init pwrdms_setup(struct powerdomain *pwrdm, void *unused) } /** + * omap_default_idle - OMAP4 default ilde routine.' + * + * Implements OMAP4 memory, IO ordering requirements which can't be addressed + * with default arch_idle() hook. Used by all CPUs with !CONFIG_CPUIDLE and + * by secondary CPU with CONFIG_CPUIDLE. + */ +static void omap_default_idle(void) +{ + local_irq_disable(); + local_fiq_disable(); + + omap_do_wfi(); + + local_fiq_enable(); + local_irq_enable(); +} + +/** * omap4_pm_init - Init routine for OMAP4 PM * * Initializes all powerdomain and clockdomain target states @@ -175,6 +193,9 @@ static int __init omap4_pm_init(void) suspend_set_ops(&omap_pm_ops); #endif /* CONFIG_SUSPEND */ + /* Overwrite the default arch_idle() */ + pm_idle = omap_default_idle; + err2: return ret; } |