diff mbox

[6/6] arm: omap: specify PMUs are for ARMv7 CPUs

Message ID 1416397800-12457-7-git-send-email-mark.rutland@arm.com
State Accepted
Commit 279806bfca71c5f7893da59a5a7e7b65250260c8
Headers show

Commit Message

Mark Rutland Nov. 19, 2014, 11:50 a.m. UTC
Now that we can specify which PMU variant we're likely to deal with, do
so in the omap board code. This will allow us to split the ARMv6, ARMv7,
and XScale PMU drivers.

The unnecessary include of asm/pmu.h is also removed.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Olof Johansson <olof@lixom.net>
Cc: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-omap2/pmu.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Tony Lindgren Nov. 21, 2014, 11:15 p.m. UTC | #1
* Mark Rutland <mark.rutland@arm.com> [141119 03:53]:
> Now that we can specify which PMU variant we're likely to deal with, do
> so in the omap board code. This will allow us to split the ARMv6, ARMv7,
> and XScale PMU drivers.
> 
> The unnecessary include of asm/pmu.h is also removed.
> 
> Signed-off-by: Mark Rutland <mark.rutland@arm.com>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: Olof Johansson <olof@lixom.net>
> Cc: Arnd Bergmann <arnd@arndb.de>

Looks OK to me:

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

> ---
>  arch/arm/mach-omap2/pmu.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/pmu.c b/arch/arm/mach-omap2/pmu.c
> index 33c8846..a69e9a3 100644
> --- a/arch/arm/mach-omap2/pmu.c
> +++ b/arch/arm/mach-omap2/pmu.c
> @@ -13,7 +13,7 @@
>   */
>  #include <linux/of.h>
>  
> -#include <asm/pmu.h>
> +#include <asm/system_info.h>
>  
>  #include "soc.h"
>  #include "omap_hwmod.h"
> @@ -37,7 +37,8 @@ static int __init omap2_init_pmu(unsigned oh_num, char *oh_names[])
>  {
>  	int i;
>  	struct omap_hwmod *oh[3];
> -	char *dev_name = "arm-pmu";
> +	char *dev_name = cpu_architecture() == CPU_ARCH_ARMv6 ?
> +			 "armv6-pmu" : "armv7-pmu";
>  
>  	if ((!oh_num) || (oh_num > 3))
>  		return -EINVAL;
> -- 
> 1.9.1
>
diff mbox

Patch

diff --git a/arch/arm/mach-omap2/pmu.c b/arch/arm/mach-omap2/pmu.c
index 33c8846..a69e9a3 100644
--- a/arch/arm/mach-omap2/pmu.c
+++ b/arch/arm/mach-omap2/pmu.c
@@ -13,7 +13,7 @@ 
  */
 #include <linux/of.h>
 
-#include <asm/pmu.h>
+#include <asm/system_info.h>
 
 #include "soc.h"
 #include "omap_hwmod.h"
@@ -37,7 +37,8 @@  static int __init omap2_init_pmu(unsigned oh_num, char *oh_names[])
 {
 	int i;
 	struct omap_hwmod *oh[3];
-	char *dev_name = "arm-pmu";
+	char *dev_name = cpu_architecture() == CPU_ARCH_ARMv6 ?
+			 "armv6-pmu" : "armv7-pmu";
 
 	if ((!oh_num) || (oh_num > 3))
 		return -EINVAL;