aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Miao <eric.miao@linaro.org>2011-11-24 20:03:06 +0800
committerEric Miao <eric.miao@linaro.org>2011-11-24 20:04:11 +0800
commit4dd301e01871d3721d5bdea03fec1e3a2b156c54 (patch)
treef531ebffa31c13e41d90bc2024ba74f80c27052d
parent4d1dfb48184858a2a209b8df65a4056e90f0315c (diff)
downloadlinux-linaro-4dd301e01871d3721d5bdea03fec1e3a2b156c54.tar.gz
SAUCE: add arm-pmu device
BugLink: http://launchpad.net/bugs/893653 Signed-off-by: Eric Miao <eric.miao@linaro.org>
-rw-r--r--arch/arm/mach-mx5/mm.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-mx5/mm.c b/arch/arm/mach-mx5/mm.c
index 72e2a88f246..293810134e1 100644
--- a/arch/arm/mach-mx5/mm.c
+++ b/arch/arm/mach-mx5/mm.c
@@ -16,6 +16,7 @@
#include <linux/dma-mapping.h>
#include <asm/mach/map.h>
+#include <asm/pmu.h>
#include <mach/hardware.h>
#include <mach/common.h>
@@ -142,6 +143,21 @@ static struct sdma_platform_data imx53_sdma_pdata __initdata = {
.script_addrs = &imx53_sdma_script,
};
+static struct resource mx5_pmu_resources[] = {
+ {
+ /* MX51/53 share the same IRQ number */
+ .start = MX51_INT_PMU,
+ .flags = IORESOURCE_IRQ,
+ }
+};
+
+static struct platform_device mx5_pmu_device = {
+ .name = "arm-pmu",
+ .id = ARM_PMU_DEVICE_CPU,
+ .resource = &mx5_pmu_resources,
+ .num_resources = 1,
+};
+
void __init imx51_soc_init(void)
{
/* i.mx51 has the i.mx31 type gpio */
@@ -154,6 +170,8 @@ void __init imx51_soc_init(void)
imx_add_imx_sdma("imx35-sdma", MX51_SDMA_BASE_ADDR, MX51_INT_SDMA, &imx51_sdma_pdata);
imx_cpuidle_init(&mx5_cpuidle_data);
+
+ platform_device_register(&mx5_pmu_device);
}
void __init imx53_soc_init(void)
@@ -171,4 +189,6 @@ void __init imx53_soc_init(void)
imx_add_imx_sdma("imx35-sdma", MX53_SDMA_BASE_ADDR, MX53_INT_SDMA, &imx53_sdma_pdata);
imx_cpuidle_init(&mx5_cpuidle_data);
+
+ platform_device_register(&mx5_pmu_device);
}