From: "Daniel Glöckner" <dg@emlix.com>
To: Chris Zankel <chris@zankel.net>
Cc: linux-kernel@vger.kernel.org, linux-xtensa@linux-xtensa.org,
"Daniel Glöckner" <dg@emlix.com>
Subject: [PATCH v2 1/2] xtensa: allow variant to initialize own irq chips
Date: Tue, 5 May 2009 17:03:21 +0200 [thread overview]
Message-ID: <1241535802-17516-1-git-send-email-dg@emlix.com> (raw)
In-Reply-To: <1237816990-29108-1-git-send-email-dg@emlix.com>
There was already a PLATFORM_NR_IRQS define, which is now accompanied
by a VARIANT_NR_IRQS. To be able to initialize these interrupts,
init_IRQ now calls a variant specific hook.
Changes compared to v1:
- adapted to new CONFIG_VARIANT_IRQ_EXT
- removed definition and call of platform_init_IRQ as there already
is a platform_init_irq defined in asm/platform.h with a weak default
in kernel/platform.c
- renamed variant_init_IRQ to variant_init_irq
Note that I could not find the call site of platform_init_irq although
it is stated in platform.h that it is called from init_IRQ.
Signed-off-by: Daniel Glöckner <dg@emlix.com>
---
arch/xtensa/include/asm/irq.h | 12 +++++++++++-
arch/xtensa/kernel/irq.c | 2 ++
2 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/arch/xtensa/include/asm/irq.h b/arch/xtensa/include/asm/irq.h
index 4a39bb5..f10ee86 100644
--- a/arch/xtensa/include/asm/irq.h
+++ b/arch/xtensa/include/asm/irq.h
@@ -11,6 +11,7 @@
#ifndef _XTENSA_IRQ_H
#define _XTENSA_IRQ_H
+#include <linux/init.h>
#include <platform/hardware.h>
#include <variant/core.h>
@@ -23,11 +24,20 @@ static inline void variant_irq_enable(unsigned int irq) { }
static inline void variant_irq_disable(unsigned int irq) { }
#endif
+#ifndef VARIANT_NR_IRQS
+# define VARIANT_NR_IRQS 0
+#endif
#ifndef PLATFORM_NR_IRQS
# define PLATFORM_NR_IRQS 0
#endif
#define XTENSA_NR_IRQS XCHAL_NUM_INTERRUPTS
-#define NR_IRQS (XTENSA_NR_IRQS + PLATFORM_NR_IRQS)
+#define NR_IRQS (XTENSA_NR_IRQS + VARIANT_NR_IRQS + PLATFORM_NR_IRQS)
+
+#if VARIANT_NR_IRQS == 0
+static inline void variant_init_irq(void) { }
+#else
+void variant_init_irq(void) __init;
+#endif
static __inline__ int irq_canonicalize(int irq)
{
diff --git a/arch/xtensa/kernel/irq.c b/arch/xtensa/kernel/irq.c
index a36c85e..a1badb3 100644
--- a/arch/xtensa/kernel/irq.c
+++ b/arch/xtensa/kernel/irq.c
@@ -197,4 +197,6 @@ void __init init_IRQ(void)
}
cached_irq_mask = 0;
+
+ variant_init_irq();
}
--
1.6.1.3
next prev parent reply other threads:[~2009-05-05 15:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-23 14:03 [patch 1/2] xtensa: allow platform and " Daniel Glöckner
2009-03-23 14:03 ` [patch 2/2] xtensa: support s6000 gpio irqs and alternate function selection Daniel Glöckner
2009-05-05 15:03 ` Daniel Glöckner [this message]
2009-05-05 15:03 ` [PATCH v2 " Daniel Glöckner
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=1241535802-17516-1-git-send-email-dg@emlix.com \
--to=dg@emlix.com \
--cc=chris@zankel.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xtensa@linux-xtensa.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
all inboxes | Powered by JetHome®