On Thu, 27 Mar 2014 12:00:25 +0000
Mans Rullgard <[email protected]> wrote:

> The PMUs on sun7i use the undocumented IRQs 152 and 153 for core 0 and 1
> respectively.
> 
> Signed-off-by: Mans Rullgard <[email protected]>

Thanks, this is a really nice find and now we get ARM performance
counters working on all A1X/A20 devices.

If nobody complains about the IRQ numbers not getting their own named
constants in arch/arm/plat-sunxi/include/plat/irqs.h instead of the
magic numbers

Acked-by: Siarhei Siamashka <[email protected]>

> ---
>  arch/arm/plat-sunxi/devices.c | 16 +++++++---------
>  1 file changed, 7 insertions(+), 9 deletions(-)
> 
> diff --git a/arch/arm/plat-sunxi/devices.c b/arch/arm/plat-sunxi/devices.c
> index fdddc56..70fec7f 100644
> --- a/arch/arm/plat-sunxi/devices.c
> +++ b/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

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to