diff options
| author | Rob Herring <rob.herring@calxeda.com> | 2012-12-02 17:06:21 +0000 | 
|---|---|---|
| committer | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2013-02-03 14:43:58 +0100 | 
| commit | 2ff467c05115c709decd7702cbc21679ac449519 (patch) | |
| tree | 6d0144cce276706c0f8c2e52a5f034f6d33a4029 /arch/arm/include/asm/system.h | |
| parent | b0404ea1268540ebfe8c10b718990d82ee1d113f (diff) | |
| download | olio-uboot-2014.01-2ff467c05115c709decd7702cbc21679ac449519.tar.xz olio-uboot-2014.01-2ff467c05115c709decd7702cbc21679ac449519.zip | |
ARM: add wfi assembly macro
Since wfi instruction is only available on ARMv7, add a conditional
macro for it.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Diffstat (limited to 'arch/arm/include/asm/system.h')
| -rw-r--r-- | arch/arm/include/asm/system.h | 6 | 
1 files changed, 6 insertions, 0 deletions
| diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h index 78ca8e0a6..1918492ea 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; |