]> git.sur5r.net Git - u-boot/commitdiff
ARM: add wfi assembly macro
authorRob Herring <rob.herring@calxeda.com>
Sun, 2 Dec 2012 17:06:21 +0000 (17:06 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Sun, 3 Feb 2013 13:43:58 +0000 (14:43 +0100)
Since wfi instruction is only available on ARMv7, add a conditional
macro for it.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
arch/arm/include/asm/system.h

index 78ca8e0a6dc10741469753edff8d73cc96b61d29..1918492eaed7e6f19845a283d78ab6341446b038 100644 (file)
 
 #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;