Created
January 12, 2013 00:20
-
-
Save ssvb/4515166 to your computer and use it in GitHub Desktop.
Try to register performance monitoring unit irq for Allwinner A10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/arch/arm/mach-sun4i/devices.c b/arch/arm/mach-sun4i/devices.c | |
| index ff56e9a..e4425f8 100644 | |
| --- a/arch/arm/mach-sun4i/devices.c | |
| +++ b/arch/arm/mach-sun4i/devices.c | |
| @@ -35,6 +35,7 @@ | |
| #include <asm/mach/arch.h> | |
| #include <asm/mach/time.h> | |
| #include <asm/setup.h> | |
| +#include <asm/pmu.h> | |
| #include <mach/hardware.h> | |
| #include <mach/i2c.h> | |
| @@ -174,6 +175,22 @@ struct platform_device sun4i_twi2_device = { | |
| }, | |
| }; | |
| +static struct resource sun4i_pmu_resources[] = { | |
| + { | |
| + .start = SW_INT_IRQNO_PMU, | |
| + .end = SW_INT_IRQNO_PMU, | |
| + .flags = IORESOURCE_IRQ, | |
| + }, | |
| +}; | |
| + | |
| +struct platform_device sun4i_pmu_device = { | |
| + .name = "arm-pmu", | |
| + .id = ARM_PMU_DEVICE_CPU, | |
| + .resource = sun4i_pmu_resources, | |
| + .num_resources = ARRAY_SIZE(sun4i_pmu_resources), | |
| +}; | |
| + | |
| + | |
| #if defined(CONFIG_MALI_DRM) || defined(CONFIG_MALI_DRM_MODULE) | |
| static struct platform_device sun4i_device_mali_drm = { | |
| .name = "mali_drm", | |
| @@ -190,6 +207,7 @@ static struct platform_device *sw_pdevs[] __initdata = { | |
| &sun4i_twi0_device, | |
| &sun4i_twi1_device, | |
| &sun4i_twi2_device, | |
| + &sun4i_pmu_device, | |
| #if defined(CONFIG_MALI_DRM) || defined(CONFIG_MALI_DRM_MODULE) | |
| &sun4i_device_mali_drm, | |
| #endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Why not push this patch to https://github.com/linux-sunxi/linux-sunxi? It is a good patch to enable perf.