Skip to content
Permalink
Browse files

sun7i: enable performance counters

The PMUs on sun7i use the undocumented IRQs 152 and 153 for core 0 and 1
respectively.

Signed-off-by: Mans Rullgard <mans@mansr.com>
  • Loading branch information...
mansr authored and amery committed Mar 27, 2014
1 parent 5a467f6 commit 9c77e95e1e60d13699a67e440327b0b664eb9ff6
Showing with 7 additions and 9 deletions.
  1. +7 −9 arch/arm/plat-sunxi/devices.c
@@ -30,6 +30,7 @@
#include <linux/pda_power.h>
#include <linux/io.h>
#include <linux/i2c.h>
#include <linux/ioport.h>

#include <asm/mach-types.h>
#include <asm/mach/arch.h>
@@ -113,13 +114,13 @@ struct platform_device sw_pdev_nand =
.dev = {}
};

#ifndef CONFIG_ARCH_SUN7I
static struct resource sunxi_pmu_resources[] = {
{
.start = SW_INT_IRQNO_PLE_PFM,
.end = SW_INT_IRQNO_PLE_PFM,
.flags = IORESOURCE_IRQ,
},
#ifdef CONFIG_ARCH_SUN7I
DEFINE_RES_IRQ(152),
DEFINE_RES_IRQ(153),
#else
DEFINE_RES_IRQ(SW_INT_IRQNO_PLE_PFM),
#endif
};

struct platform_device sunxi_pmu_device = {
@@ -128,7 +129,6 @@ struct platform_device sunxi_pmu_device = {
.resource = sunxi_pmu_resources,
.num_resources = ARRAY_SIZE(sunxi_pmu_resources),
};
#endif

#if defined(CONFIG_MALI_DRM) || defined(CONFIG_MALI_DRM_MODULE)
static struct platform_device sunxi_device_mali_drm = {
@@ -143,9 +143,7 @@ static struct platform_device *sw_pdevs[] __initdata = {
#endif
&sw_pdev_dmac,
&sw_pdev_nand,
#ifndef CONFIG_ARCH_SUN7I
&sunxi_pmu_device,
#endif
#if defined(CONFIG_MALI_DRM) || defined(CONFIG_MALI_DRM_MODULE)
&sunxi_device_mali_drm,
#endif

0 comments on commit 9c77e95

Please sign in to comment.
You can’t perform that action at this time.