Patchwork [U-Boot,2/2] ARM: highbank: use wfi macro instead of inline asm

login
register
mail settings
Submitter Rob Herring
Date Dec. 3, 2012, 3:06 a.m.
Message ID <1354503982-1124-2-git-send-email-robherring2@gmail.com>
Download mbox | patch
Permalink /patch/203280/
State Accepted
Delegated to: Albert ARIBAUD
Headers show

Comments

Rob Herring - Dec. 3, 2012, 3:06 a.m.
From: Rob Herring <rob.herring@calxeda.com>

Older compilers don't recognize v7 wfi instruction, so use wfi macro to
fix builds on old compilers.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
---
 board/highbank/highbank.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Albert ARIBAUD - Feb. 3, 2013, 2:29 p.m.
Hi Rob,

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

> From: Rob Herring <rob.herring@calxeda.com>
> 
> Older compilers don't recognize v7 wfi instruction, so use wfi macro to
> fix builds on old compilers.
> 
> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
> ---
>  board/highbank/highbank.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/board/highbank/highbank.c b/board/highbank/highbank.c
> index f41bf05..09cd45d 100644
> --- a/board/highbank/highbank.c
> +++ b/board/highbank/highbank.c
> @@ -88,5 +88,6 @@ void dram_init_banksize(void)
>  void reset_cpu(ulong addr)
>  {
>  	writel(HB_PWR_HARD_RESET, HB_SREG_A9_PWR_REQ);
> -	asm("	wfi");
> +
> +	wfi();
>  }

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

Amicalement,

Patch

diff --git a/board/highbank/highbank.c b/board/highbank/highbank.c
index f41bf05..09cd45d 100644
--- a/board/highbank/highbank.c
+++ b/board/highbank/highbank.c
@@ -88,5 +88,6 @@  void dram_init_banksize(void)
 void reset_cpu(ulong addr)
 {
 	writel(HB_PWR_HARD_RESET, HB_SREG_A9_PWR_REQ);
-	asm("	wfi");
+
+	wfi();
 }