arm: realview: specify PMU types
authorMark Rutland <mark.rutland@arm.com>
Fri, 23 May 2014 11:12:04 +0000 (12:12 +0100)
committerOlof Johansson <olof@lixom.net>
Fri, 6 Feb 2015 08:12:55 +0000 (00:12 -0800)
Now that we can specify which PMU variant we're likely to deal with, do
so in the realview board code. This will allow us to split the ARMv6,
ARMv7, and XScale PMU drivers.

The Realview EB may be used with ARMv6 or ARMv7 CPUs, but luckily
there's only a single ARMv7 CPU, so we can match that explicitly to
determine whether or not we have an ARMv7 PMU.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Olof Johansson <olof@lixom.net>
Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Olof Johansson <olof@lixom.net>
arch/arm/mach-realview/realview_eb.c
arch/arm/mach-realview/realview_pb1176.c
arch/arm/mach-realview/realview_pb11mp.c
arch/arm/mach-realview/realview_pba8.c
arch/arm/mach-realview/realview_pbx.c

index 739d4f11309773e7ffa5e259bc626604f0008f5b..64c88d657f9efc6360600380910248a51fd3c73b 100644 (file)
@@ -37,6 +37,7 @@
 #include <asm/pgtable.h>
 #include <asm/hardware/cache-l2x0.h>
 #include <asm/smp_twd.h>
+#include <asm/system_info.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -296,7 +297,6 @@ static struct resource pmu_resources[] = {
 };
 
 static struct platform_device pmu_device = {
-       .name                   = "arm-pmu",
        .id                     = -1,
        .num_resources          = ARRAY_SIZE(pmu_resources),
        .resource               = pmu_resources,
@@ -451,6 +451,7 @@ static void __init realview_eb_init(void)
                 */
                l2x0_init(__io_address(REALVIEW_EB11MP_L220_BASE), 0x00790000, 0xfe000fff);
 #endif
+               pmu_device.name = core_tile_a9mp() ? "armv7-pmu" : "armv6-pmu";
                platform_device_register(&pmu_device);
        }
 
index b0e0dcaed944857f18b7d731969f3f773a1957bc..ce92c182349468244dd02c02fc3abd5e1e93ea6d 100644 (file)
@@ -280,7 +280,7 @@ static struct resource pmu_resource = {
 };
 
 static struct platform_device pmu_device = {
-       .name                   = "arm-pmu",
+       .name                   = "armv6-pmu",
        .id                     = -1,
        .num_resources          = 1,
        .resource               = &pmu_resource,
index 47bf55fdbf27d9bcbacbf04f891d00ecc23d577d..15c45e25095f58963b21f8755840211e871bdefc 100644 (file)
@@ -262,7 +262,7 @@ static struct resource pmu_resources[] = {
 };
 
 static struct platform_device pmu_device = {
-       .name                   = "arm-pmu",
+       .name                   = "armv6-pmu",
        .id                     = -1,
        .num_resources          = ARRAY_SIZE(pmu_resources),
        .resource               = pmu_resources,
index 4e57a8599265b6d69c70285a7573957f3da9347d..4c64662f54370f31b54089f90b869355a66030b8 100644 (file)
@@ -240,7 +240,7 @@ static struct resource pmu_resource = {
 };
 
 static struct platform_device pmu_device = {
-       .name                   = "arm-pmu",
+       .name                   = "armv7-pmu",
        .id                     = -1,
        .num_resources          = 1,
        .resource               = &pmu_resource,
index d89eb40234674e8d639594dbb13ffa5b88e717bc..9a22b864219f32562b66706ab1d083ffd46ed1fc 100644 (file)
@@ -280,7 +280,7 @@ static struct resource pmu_resources[] = {
 };
 
 static struct platform_device pmu_device = {
-       .name                   = "arm-pmu",
+       .name                   = "armv7-pmu",
        .id                     = -1,
        .num_resources          = ARRAY_SIZE(pmu_resources),
        .resource               = pmu_resources,