projects
/
oweals
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b0404ea
)
ARM: add wfi assembly macro
author
Rob Herring
<rob.herring@calxeda.com>
Sun, 2 Dec 2012 17:06:21 +0000
(17:06 +0000)
committer
Albert 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
patch
|
blob
|
history
diff --git
a/arch/arm/include/asm/system.h
b/arch/arm/include/asm/system.h
index 78ca8e0a6dc10741469753edff8d73cc96b61d29..1918492eaed7e6f19845a283d78ab6341446b038 100644
(file)
--- 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;