diff mbox

[3/3] ARM: omap2: use get_auxcr for aux ctrl register read

Message ID 1358391205-23943-3-git-send-email-robherring2@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Rob Herring Jan. 17, 2013, 2:53 a.m. UTC
From: Rob Herring <rob.herring@calxeda.com>

Use get_auxcr instead of inline assembly to read the CP15 aux ctrl
register.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/pm34xx.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Nicolas Pitre Jan. 17, 2013, 4:41 a.m. UTC | #1
On Wed, 16 Jan 2013, Rob Herring wrote:

> From: Rob Herring <rob.herring@calxeda.com>
> 
> Use get_auxcr instead of inline assembly to read the CP15 aux ctrl
> register.
> 
> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
> Cc: Kevin Hilman <khilman@ti.com>
> Cc: Tony Lindgren <tony@atomide.com>

Looks trivial enough.

Acked-by: Nicolas Pitre <nico@linaro.org>


> ---
>  arch/arm/mach-omap2/pm34xx.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
> index 7be3622..bef8ef6 100644
> --- a/arch/arm/mach-omap2/pm34xx.c
> +++ b/arch/arm/mach-omap2/pm34xx.c
> @@ -33,6 +33,7 @@
>  
>  #include <trace/events/power.h>
>  
> +#include <asm/cp15.h>
>  #include <asm/fncpy.h>
>  #include <asm/suspend.h>
>  #include <asm/system_misc.h>
> @@ -216,9 +217,8 @@ static void omap34xx_save_context(u32 *save)
>  	u32 val;
>  
>  	/* Read Auxiliary Control Register */
> -	asm("mrc p15, 0, %0, c1, c0, 1" : "=r" (val));
>  	*save++ = 1;
> -	*save++ = val;
> +	*save++ = get_auxcr();
>  
>  	/* Read L2 AUX ctrl register */
>  	asm("mrc p15, 1, %0, c9, c0, 2" : "=r" (val));
> -- 
> 1.7.10.4
>
Santosh Shilimkar Jan. 17, 2013, 8:30 a.m. UTC | #2
On Thursday 17 January 2013 08:23 AM, Rob Herring wrote:
> From: Rob Herring <rob.herring@calxeda.com>
>
> Use get_auxcr instead of inline assembly to read the CP15 aux ctrl
> register.
>
> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
> Cc: Kevin Hilman <khilman@ti.com>
> Cc: Tony Lindgren <tony@atomide.com>
> ---
This patch and the rest of the series looks fine to me.

Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Tony Lindgren Jan. 17, 2013, 5:07 p.m. UTC | #3
* Santosh Shilimkar <santosh.shilimkar@ti.com> [130117 00:33]:
> On Thursday 17 January 2013 08:23 AM, Rob Herring wrote:
> >From: Rob Herring <rob.herring@calxeda.com>
> >
> >Use get_auxcr instead of inline assembly to read the CP15 aux ctrl
> >register.
> >
> >Signed-off-by: Rob Herring <rob.herring@calxeda.com>
> >Cc: Kevin Hilman <khilman@ti.com>
> >Cc: Tony Lindgren <tony@atomide.com>
> >---
> This patch and the rest of the series looks fine to me.
> 
> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>

The series looks good to me too:

Acked-by: Tony Lindgren <tony@atomide.com>
diff mbox

Patch

diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 7be3622..bef8ef6 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -33,6 +33,7 @@ 
 
 #include <trace/events/power.h>
 
+#include <asm/cp15.h>
 #include <asm/fncpy.h>
 #include <asm/suspend.h>
 #include <asm/system_misc.h>
@@ -216,9 +217,8 @@  static void omap34xx_save_context(u32 *save)
 	u32 val;
 
 	/* Read Auxiliary Control Register */
-	asm("mrc p15, 0, %0, c1, c0, 1" : "=r" (val));
 	*save++ = 1;
-	*save++ = val;
+	*save++ = get_auxcr();
 
 	/* Read L2 AUX ctrl register */
 	asm("mrc p15, 1, %0, c9, c0, 2" : "=r" (val));