linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/4] ARM i.MX avic: add handle_irq function
Date: Mon, 26 Sep 2011 11:46:06 +0200	[thread overview]
Message-ID: <1317030369-29352-2-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1317030369-29352-1-git-send-email-s.hauer@pengutronix.de>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/plat-mxc/avic.c                |   13 +++++++++++++
 arch/arm/plat-mxc/include/mach/common.h |   10 ++++++++++
 2 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-mxc/avic.c b/arch/arm/plat-mxc/avic.c
index 55d2534..4d68c5a 100644
--- a/arch/arm/plat-mxc/avic.c
+++ b/arch/arm/plat-mxc/avic.c
@@ -116,6 +116,19 @@ static struct mxc_irq_chip mxc_avic_chip = {
 #endif
 };
 
+asmlinkage void __exception_irq_entry avic_handle_irq(struct pt_regs *regs)
+{
+	u32 nivector;
+
+	do {
+		nivector = __raw_readl(avic_base + AVIC_NIVECSR) >> 16;
+		if (nivector == 0xffff)
+			break;
+
+		handle_IRQ(nivector, regs);
+	} while (1);
+}
+
 /*
  * This function initializes the AVIC hardware and disables all the
  * interrupts. It registers the interrupt enable and disable functions
diff --git a/arch/arm/plat-mxc/include/mach/common.h b/arch/arm/plat-mxc/include/mach/common.h
index 4e3d978..6a6182d 100644
--- a/arch/arm/plat-mxc/include/mach/common.h
+++ b/arch/arm/plat-mxc/include/mach/common.h
@@ -72,4 +72,14 @@ extern void mxc_arch_reset_init(void __iomem *);
 extern void mx51_efikamx_reset(void);
 extern int mx53_revision(void);
 extern int mx53_display_revision(void);
+
+void avic_handle_irq(struct pt_regs *);
+
+#define imx1_handle_irq avic_handle_irq
+#define imx21_handle_irq avic_handle_irq
+#define imx25_handle_irq avic_handle_irq
+#define imx27_handle_irq avic_handle_irq
+#define imx31_handle_irq avic_handle_irq
+#define imx35_handle_irq avic_handle_irq
+
 #endif
-- 
1.7.6.3

  reply	other threads:[~2011-09-26  9:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-26  9:46 [PATCH v2] i.MX: use CONFIG_MULTI_IRQ_HANDLER Sascha Hauer
2011-09-26  9:46 ` Sascha Hauer [this message]
2011-09-26 11:21   ` [PATCH 1/4] ARM i.MX avic: add handle_irq function Russell King - ARM Linux
2011-09-26 12:25     ` Sascha Hauer
2011-09-26  9:46 ` [PATCH 2/4] ARM i.MX tzic: " Sascha Hauer
2011-09-26  9:46 ` [PATCH 3/4] ARM i.MX boards: use CONFIG_MULTI_IRQ_HANDLER Sascha Hauer
2011-09-26  9:46 ` [PATCH 4/4] ARM i.MX entry-macro.S: remove now unused code Sascha Hauer
  -- strict thread matches above, loose matches on Subject: below --
2011-09-20 12:49 [PATCH] i.MX: use CONFIG_MULTI_IRQ_HANDLER Sascha Hauer
2011-09-20 12:49 ` [PATCH 1/4] ARM i.MX avic: add handle_irq function Sascha Hauer

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=1317030369-29352-2-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).