@@ -102,6 +102,20 @@ tmp2 .req r5
2:
.endm
+/*
+ * Put the processor to enter into Standby mode, wait for interrupt to wakeup
+ */
+ .macro _do_wfi
+
+#if defined(CONFIG_CPU_V7)
+ dsb
+ wfi @ Wait For Interrupt
+#else
+ mcr p15, 0, tmp1, c7, c0, 4
+#endif
+
+ .endm
+
.text
/* void at91_slow_clock(void __iomem *pmc, void __iomem *sdramc,
@@ -220,7 +234,7 @@ sdr_sr_done:
str tmp1, [pmc, #AT91_CKGR_MOR]
/* Wait for interrupt */
- mcr p15, 0, tmp1, c7, c0, 4
+ _do_wfi
/* Turn on the main oscillator */
ldr tmp1, [pmc, #AT91_CKGR_MOR]
Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> --- arch/arm/mach-at91/pm_slowclock.S | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)