summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorRanjani Vaidyanathan <ra5478@freescale.com>2012-02-01 07:32:32 -0600
committerRanjani Vaidyanathan <ra5478@freescale.com>2012-02-01 08:22:50 -0600
commit203993cd89ec6395b6bfba948c2e424680dd622e (patch)
tree6398fad60b771106a7be92eb75c29098adcce7d5 /arch
parentf411fd9dfdcef18fd340a03a849ac6d0d1539695 (diff)
ENGR00173585: MX6: Added WAIT mode workaround for MX6Q TO1.1
There is small window where an interrupt can occur when the SOC is in the process of entering WAIT mode. The ARM core responds to this interrupt and can access the internal memories when their clocks are disabled. To avoid crashes generated due to this, WFI code should be executed from non-cacheable IRAM and enough delay should added after the WFI so that accesses to memories are prevented. This workaround assumes that all interrupts are routed to CPU0 only. This workaround is applicable to iMX6DL/Solo also. Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-mx6/system.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/arm/mach-mx6/system.c b/arch/arm/mach-mx6/system.c
index 9288b9f599ab..fae41383eaab 100644
--- a/arch/arm/mach-mx6/system.c
+++ b/arch/arm/mach-mx6/system.c
@@ -43,12 +43,12 @@
#define MODULE_CLKGATE (1 << 30)
#define MODULE_SFTRST (1 << 31)
-/* static DEFINE_SPINLOCK(wfi_lock); */
+static DEFINE_SPINLOCK(wfi_lock);
extern unsigned int gpc_wake_irq[4];
extern int mx6q_revision(void);
-/* static unsigned int cpu_idle_mask; */
+static unsigned int cpu_idle_mask;
static void __iomem *gpc_base = IO_ADDRESS(GPC_BASE_ADDR);
@@ -145,8 +145,7 @@ void mxc_cpu_lp_set(enum mxc_cpu_pwr_mode mode)
if ((num_online_cpus() == num_present_cpus())
&& mx6_wait_in_iram != NULL) {
mxc_cpu_lp_set(WAIT_UNCLOCKED_POWER_OFF);
- if (smp_processor_id() == 0 &&
- (mx6q_revision() <= IMX_CHIP_REVISION_1_0))
+ if (smp_processor_id() == 0)
mx6_wait_in_iram();
else
cpu_do_idle();