From: Rob Herring Date: Sun, 2 Dec 2012 17:06:21 +0000 (+0000) Subject: ARM: add wfi assembly macro X-Git-Tag: v2013.04-rc1~48^2~31 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=2ff467c05115c709decd7702cbc21679ac449519;p=oweals%2Fu-boot.git ARM: add wfi assembly macro Since wfi instruction is only available on ARMv7, add a conditional macro for it. Signed-off-by: Rob Herring --- diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h index 78ca8e0a6d..1918492eae 100644 --- a/arch/arm/include/asm/system.h +++ b/arch/arm/include/asm/system.h @@ -61,6 +61,12 @@ #define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t"); +#ifdef __ARM_ARCH_7A__ +#define wfi() __asm__ __volatile__ ("wfi" : : : "memory") +#else +#define wfi() +#endif + static inline unsigned int get_cr(void) { unsigned int val;