aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@linaro.org>2012-01-24 18:56:07 -0500
committerNicolas Ferre <nicolas.ferre@atmel.com>2012-02-03 07:42:19 -0500
commitb59160f6c017bfe33d3483ed9a6120701644af8a (patch)
treebebbb2ac6ff9aa7073874141816163bf1ba4824b
parentfa50ae9c100225964eafc7214c70a8c08e70e50e (diff)
ARM: at91: remove wait_for_interrupt definition
All the "wait_for_interrupt" definition are aliases to cpu_do_idle. Only the rm9200 has an asm routine to switch to wfi. But the cpu_do_idle for this platform has exactly the same asm routine. arch/arm/mm/proc-arm920.S .. ENTRY(cpu_arm920_do_idle) mcr p15, 0, r0, c7, c0, 4 @ Wait for interrupt .. Then it is safe to invoke cpu_do_idle for this platform. As all the wait_for_interrupts are definition for cpu_do_idle, let's remove it and replace its invokation by cpu_do_idle. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
-rw-r--r--arch/arm/mach-at91/pm.c2
-rw-r--r--arch/arm/mach-at91/pm.h9
2 files changed, 1 insertions, 10 deletions
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c
index 87be5aa18753..d7e8d4cbc5ef 100644
--- a/arch/arm/mach-at91/pm.c
+++ b/arch/arm/mach-at91/pm.c
@@ -262,7 +262,7 @@ static int at91_pm_enter(suspend_state_t state)
262 : /* no input */ 262 : /* no input */
263 : "r0"); 263 : "r0");
264 saved_lpr = sdram_selfrefresh_enable(); 264 saved_lpr = sdram_selfrefresh_enable();
265 wait_for_interrupt_enable(); 265 cpu_do_idle();
266 sdram_selfrefresh_disable(saved_lpr); 266 sdram_selfrefresh_disable(saved_lpr);
267 break; 267 break;
268 268
diff --git a/arch/arm/mach-at91/pm.h b/arch/arm/mach-at91/pm.h
index 715813ed73e3..38f9a13ee794 100644
--- a/arch/arm/mach-at91/pm.h
+++ b/arch/arm/mach-at91/pm.h
@@ -36,10 +36,6 @@ static inline u32 sdram_selfrefresh_enable(void)
36#define sdram_selfrefresh_disable(saved_lpr) \ 36#define sdram_selfrefresh_disable(saved_lpr) \
37 at91_sys_write(AT91_SDRAMC_LPR, saved_lpr) 37 at91_sys_write(AT91_SDRAMC_LPR, saved_lpr)
38 38
39#define wait_for_interrupt_enable() \
40 asm volatile ("mcr p15, 0, %0, c7, c0, 4" \
41 : : "r" (0))
42
43#elif defined(CONFIG_ARCH_AT91SAM9G45) 39#elif defined(CONFIG_ARCH_AT91SAM9G45)
44#include <mach/at91sam9_ddrsdr.h> 40#include <mach/at91sam9_ddrsdr.h>
45 41
@@ -76,8 +72,6 @@ static inline u32 sdram_selfrefresh_enable(void)
76 at91_ramc_write(1, AT91_DDRSDRC_LPR, saved_lpr1); \ 72 at91_ramc_write(1, AT91_DDRSDRC_LPR, saved_lpr1); \
77 } while (0) 73 } while (0)
78 74
79#define wait_for_interrupt_enable() cpu_do_idle()
80
81#else 75#else
82#include <mach/at91sam9_sdramc.h> 76#include <mach/at91sam9_sdramc.h>
83 77
@@ -104,9 +98,6 @@ static inline u32 sdram_selfrefresh_enable(void)
104#define sdram_selfrefresh_disable(saved_lpr) \ 98#define sdram_selfrefresh_disable(saved_lpr) \
105 at91_ramc_write(0, AT91_SDRAMC_LPR, saved_lpr) 99 at91_ramc_write(0, AT91_SDRAMC_LPR, saved_lpr)
106 100
107#define wait_for_interrupt_enable() \
108 cpu_do_idle()
109
110#endif 101#endif
111 102
112#endif 103#endif