From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/6] ARM: OMAP: register PMU IRQs during board initialisation
Date: Thu, 25 Mar 2010 15:16:35 +0000 [thread overview]
Message-ID: <1269530198-19572-4-git-send-email-will.deacon@arm.com> (raw)
In-Reply-To: <1269530198-19572-3-git-send-email-will.deacon@arm.com>
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>
---
arch/arm/mach-omap2/devices.c | 34 ++++++++++++++++++++++++++++++++++
1 files changed, 34 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 23e4d77..4a1c232 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -17,8 +17,10 @@
#include <linux/clk.h>
#include <mach/hardware.h>
+#include <mach/irqs.h>
#include <asm/mach-types.h>
#include <asm/mach/map.h>
+#include <asm/pmu.h>
#include <plat/control.h>
#include <plat/tc.h>
@@ -453,6 +455,37 @@ static void omap_init_mcspi(void)
static inline void omap_init_mcspi(void) {}
#endif
+static struct resource omap2_pmu_resource = {
+ .start = 3,
+ .end = 3,
+ .flags = IORESOURCE_IRQ,
+};
+
+static struct resource omap3_pmu_resource = {
+ .start = INT_34XX_BENCH_MPU_EMUL,
+ .end = INT_34XX_BENCH_MPU_EMUL,
+ .flags = IORESOURCE_IRQ,
+};
+
+static struct platform_device omap_pmu_device = {
+ .name = "arm-pmu",
+ .id = ARM_PMU_DEVICE_CPU,
+ .num_resources = 1,
+};
+
+static void omap_init_pmu(void)
+{
+ if (cpu_is_omap24xx())
+ omap_pmu_device.resource = &omap2_pmu_resource;
+ else if (cpu_is_omap34xx())
+ omap_pmu_device.resource = &omap3_pmu_resource;
+ else
+ return;
+
+ platform_device_register(&omap_pmu_device);
+}
+
+
#ifdef CONFIG_OMAP_SHA1_MD5
static struct resource sha1_md5_resources[] = {
{
@@ -797,6 +830,7 @@ static int __init omap2_init_devices(void)
omap_init_camera();
omap_init_mbox();
omap_init_mcspi();
+ omap_init_pmu();
omap_hdq_init();
omap_init_sti();
omap_init_sha1_md5();
--
1.6.3.3
next prev parent reply other threads:[~2010-03-25 15:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-25 15:16 [PATCH 0/6] ARM: pmu: provide a registration mechanism for IRQs [v3] Will Deacon
2010-03-25 15:16 ` [PATCH 1/6] ARM: pmu: register IRQs at runtime Will Deacon
2010-03-25 15:16 ` [PATCH 2/6] ARM: Realview: register PMU IRQs during board initialisation Will Deacon
2010-03-25 15:16 ` Will Deacon [this message]
2010-03-25 15:16 ` [PATCH 4/6] ARM: BCMRING: register PMU IRQ " Will Deacon
2010-03-25 15:16 ` [PATCH 5/6] ARM: iop3xx: register PMU IRQs " Will Deacon
2010-03-25 15:16 ` [PATCH 6/6] ARM: pxa: " Will Deacon
2010-03-25 17:35 ` [PATCH 4/6] ARM: BCMRING: register PMU IRQ " Leo (Hao) Chen
2010-03-25 15:36 ` [PATCH 1/6] ARM: pmu: register IRQs at runtime Jamie Iles
2010-04-28 21:36 ` [PATCH 0/6] ARM: pmu: provide a registration mechanism for IRQs [v3] Russell King - ARM Linux
2010-04-29 16:04 ` Will Deacon
2010-04-29 16:05 ` Russell King - ARM Linux
2010-04-29 16:15 ` Will Deacon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1269530198-19572-4-git-send-email-will.deacon@arm.com \
--to=will.deacon@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.