Skip to content

Commit

Permalink
sun7i: enable performance counters
Browse files Browse the repository at this point in the history
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 29, 2014
1 parent 5a467f6 commit 9c77e95
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions arch/arm/plat-sunxi/devices.c
Expand Up @@ -30,6 +30,7 @@
#include <linux/pda_power.h> #include <linux/pda_power.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/ioport.h>


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


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


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


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

0 comments on commit 9c77e95

Please sign in to comment.