Changes in kernel/arch/arm32/include/arch/asm.h [6ecf5b8:3ee38a9] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/arm32/include/arch/asm.h
r6ecf5b8 r3ee38a9 38 38 39 39 #include <typedefs.h> 40 #include <arch/cp15.h> 40 41 #include <arch/stack.h> 41 42 #include <config.h> … … 43 44 #include <trace.h> 44 45 45 /** No such instruction on ARM to sleep CPU. */ 46 /** CPU specific way to sleep cpu. 47 * 48 * ARMv7 introduced wait for event and wait for interrupt (wfe/wfi). 49 * ARM920T has custom coprocessor action to do the same. See ARM920T Technical 50 * Reference Manual ch 4.9 p. 4-23 (103 in the PDF) 51 * ARM926EJ-S uses the same coprocessor instruction as ARM920T. See ARM926EJ-S 52 * chapter 2.3.8 p.2-22 (52 in the PDF) 53 * 54 * @note Although CP15WFI (mcr p15, 0, R0, c7, c0, 4) is defined in ARM 55 * Architecture reference manual for armv4/5, CP15 implementation is mandatory 56 * only for armv6+. 57 */ 46 58 NO_TRACE static inline void cpu_sleep(void) 47 59 { 60 #ifdef PROCESSOR_ARCH_armv7_a 61 asm volatile ( "wfe" ); 62 #elif defined(PROCESSOR_ARCH_armv6) | defined(PROCESSOR_arm926ej_s) | defined(PROCESSOR_arm920t) 63 WFI_write(0); 64 #endif 48 65 } 49 66
Note:
See TracChangeset
for help on using the changeset viewer.