[U-Boot] [PATCH 1/2] ARM: add wfi assembly macro

Albert ARIBAUD albert.u.boot at aribaud.net
Sun Feb 3 15:29:01 CET 2013


Hi Rob,

On Sun,  2 Dec 2012 21:06:21 -0600, Rob Herring <robherring2 at gmail.com>
wrote:

> From: Rob Herring <rob.herring at calxeda.com>
> 
> Since wfi instruction is only available on ARMv7, add a conditional
> macro for it.
> 
> Signed-off-by: Rob Herring <rob.herring at calxeda.com>
> ---
>  arch/arm/include/asm/system.h |    6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h
> index 2b28a26..2f6aecd 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;

Applied to u-boot-arm/master, thanks!

Amicalement,
-- 
Albert.


More information about the U-Boot mailing list