aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/devices.c
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2010-04-09 08:54:43 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-04-29 13:08:20 -0400
commit883413341e479d4e9f9c69def4884b4c6e1cef4e (patch)
treee1dfc5e7ee4f4d2dc8b3596c8dc850b28403c807 /arch/arm/mach-omap2/devices.c
parent28d7f4ec98a8edb029ef24c1ee4af6a1ccbc9633 (diff)
ARM: 6046/1: ARM: OMAP: register PMU IRQs during board initialisation
This patch updates the initialisation routines for the OMAP2 and OMAP3 boards so that they register their PMU IRQs with the PMU framework in the Kernel. Cc: Tony Lindgren <tony@atomide.com> Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-omap2/devices.c')
-rw-r--r--arch/arm/mach-omap2/devices.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 23e4d7733610..4a1c2328bcc3 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -17,8 +17,10 @@
17#include <linux/clk.h> 17#include <linux/clk.h>
18 18
19#include <mach/hardware.h> 19#include <mach/hardware.h>
20#include <mach/irqs.h>
20#include <asm/mach-types.h> 21#include <asm/mach-types.h>
21#include <asm/mach/map.h> 22#include <asm/mach/map.h>
23#include <asm/pmu.h>
22 24
23#include <plat/control.h> 25#include <plat/control.h>
24#include <plat/tc.h> 26#include <plat/tc.h>
@@ -453,6 +455,37 @@ static void omap_init_mcspi(void)
453static inline void omap_init_mcspi(void) {} 455static inline void omap_init_mcspi(void) {}
454#endif 456#endif
455 457
458static struct resource omap2_pmu_resource = {
459 .start = 3,
460 .end = 3,
461 .flags = IORESOURCE_IRQ,
462};
463
464static struct resource omap3_pmu_resource = {
465 .start = INT_34XX_BENCH_MPU_EMUL,
466 .end = INT_34XX_BENCH_MPU_EMUL,
467 .flags = IORESOURCE_IRQ,
468};
469
470static struct platform_device omap_pmu_device = {
471 .name = "arm-pmu",
472 .id = ARM_PMU_DEVICE_CPU,
473 .num_resources = 1,
474};
475
476static void omap_init_pmu(void)
477{
478 if (cpu_is_omap24xx())
479 omap_pmu_device.resource = &omap2_pmu_resource;
480 else if (cpu_is_omap34xx())
481 omap_pmu_device.resource = &omap3_pmu_resource;
482 else
483 return;
484
485 platform_device_register(&omap_pmu_device);
486}
487
488
456#ifdef CONFIG_OMAP_SHA1_MD5 489#ifdef CONFIG_OMAP_SHA1_MD5
457static struct resource sha1_md5_resources[] = { 490static struct resource sha1_md5_resources[] = {
458 { 491 {
@@ -797,6 +830,7 @@ static int __init omap2_init_devices(void)
797 omap_init_camera(); 830 omap_init_camera();
798 omap_init_mbox(); 831 omap_init_mbox();
799 omap_init_mcspi(); 832 omap_init_mcspi();
833 omap_init_pmu();
800 omap_hdq_init(); 834 omap_hdq_init();
801 omap_init_sti(); 835 omap_init_sti();
802 omap_init_sha1_md5(); 836 omap_init_sha1_md5();