Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b59160f6 authored by Daniel Lezcano's avatar Daniel Lezcano Committed by Nicolas Ferre
Browse files

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: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
parent fa50ae9c
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -262,7 +262,7 @@ static int at91_pm_enter(suspend_state_t state)
					: /* no input */
					: /* no input */
					: "r0");
					: "r0");
			saved_lpr = sdram_selfrefresh_enable();
			saved_lpr = sdram_selfrefresh_enable();
			wait_for_interrupt_enable();
			cpu_do_idle();
			sdram_selfrefresh_disable(saved_lpr);
			sdram_selfrefresh_disable(saved_lpr);
			break;
			break;


+0 −9
Original line number Original line Diff line number Diff line
@@ -36,10 +36,6 @@ static inline u32 sdram_selfrefresh_enable(void)
#define sdram_selfrefresh_disable(saved_lpr) \
#define sdram_selfrefresh_disable(saved_lpr) \
	at91_sys_write(AT91_SDRAMC_LPR, saved_lpr)
	at91_sys_write(AT91_SDRAMC_LPR, saved_lpr)


#define wait_for_interrupt_enable() \
	asm volatile ("mcr p15, 0, %0, c7, c0, 4" \
		      : : "r" (0))

#elif defined(CONFIG_ARCH_AT91SAM9G45)
#elif defined(CONFIG_ARCH_AT91SAM9G45)
#include <mach/at91sam9_ddrsdr.h>
#include <mach/at91sam9_ddrsdr.h>


@@ -76,8 +72,6 @@ static inline u32 sdram_selfrefresh_enable(void)
		at91_ramc_write(1, AT91_DDRSDRC_LPR, saved_lpr1); \
		at91_ramc_write(1, AT91_DDRSDRC_LPR, saved_lpr1); \
	} while (0)
	} while (0)


#define wait_for_interrupt_enable()		cpu_do_idle()

#else
#else
#include <mach/at91sam9_sdramc.h>
#include <mach/at91sam9_sdramc.h>


@@ -104,9 +98,6 @@ static inline u32 sdram_selfrefresh_enable(void)
#define sdram_selfrefresh_disable(saved_lpr) \
#define sdram_selfrefresh_disable(saved_lpr) \
	at91_ramc_write(0, AT91_SDRAMC_LPR, saved_lpr)
	at91_ramc_write(0, AT91_SDRAMC_LPR, saved_lpr)


#define wait_for_interrupt_enable() \
	cpu_do_idle()

#endif
#endif


#endif
#endif