From: thomas.abraham@linaro.org (Thomas Abraham)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/4] arm: exynos4: simplify EINT number to linux irq number translation
Date: Wed, 07 Dec 2011 19:29:49 +0530 [thread overview]
Message-ID: <1323266392-28330-2-git-send-email-thomas.abraham@linaro.org> (raw)
In-Reply-To: <1323266392-28330-1-git-send-email-thomas.abraham@linaro.org>
The exynos4_get_irq_nr function that converts a given wakeup interrupt
source number to a linux irq number is simplified and replaced with
the new macro exynos4_irq_eint_to_gic_irq.
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
---
arch/arm/mach-exynos/irq-eint.c | 25 +++----------------------
1 files changed, 3 insertions(+), 22 deletions(-)
diff --git a/arch/arm/mach-exynos/irq-eint.c b/arch/arm/mach-exynos/irq-eint.c
index badb8c6..5e89412 100644
--- a/arch/arm/mach-exynos/irq-eint.c
+++ b/arch/arm/mach-exynos/irq-eint.c
@@ -29,26 +29,7 @@ static DEFINE_SPINLOCK(eint_lock);
static unsigned int eint0_15_data[16];
-static unsigned int exynos4_get_irq_nr(unsigned int number)
-{
- u32 ret = 0;
-
- switch (number) {
- case 0 ... 3:
- ret = (number + IRQ_EINT0);
- break;
- case 4 ... 7:
- ret = (number + (IRQ_EINT4 - 4));
- break;
- case 8 ... 15:
- ret = (number + (IRQ_EINT8 - 8));
- break;
- default:
- printk(KERN_ERR "number available : %d\n", number);
- }
-
- return ret;
-}
+#define exynos4_irq_eint_to_gic_irq(number) (IRQ_EINT0 + number)
static inline void exynos4_irq_eint_mask(struct irq_data *data)
{
@@ -225,9 +206,9 @@ int __init exynos4_init_irq_eint(void)
for (irq = 0 ; irq <= 15 ; irq++) {
eint0_15_data[irq] = IRQ_EINT(irq);
- irq_set_handler_data(exynos4_get_irq_nr(irq),
+ irq_set_handler_data(exynos4_irq_eint_to_gic_irq(irq),
&eint0_15_data[irq]);
- irq_set_chained_handler(exynos4_get_irq_nr(irq),
+ irq_set_chained_handler(exynos4_irq_eint_to_gic_irq(irq),
exynos4_irq_eint0_15);
}
--
1.6.6.rc2
next prev parent reply other threads:[~2011-12-07 13:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-07 13:59 [PATCH 0/4] arm: exynos4: add irq domain and device tree support for wakeup interrupts Thomas Abraham
2011-12-07 13:59 ` Thomas Abraham [this message]
2011-12-07 13:59 ` [PATCH 2/4] arm: exynos4: add irq_domain " Thomas Abraham
2011-12-07 13:59 ` [PATCH 3/4] arm: exynos4: remove arch_initcall for wakeup interrupt source initialization Thomas Abraham
2011-12-07 13:59 ` [PATCH 4/4] arm: exynos4: add device tree support for external wakeup interrupt controller Thomas Abraham
2011-12-07 16:16 ` Rob Herring
2011-12-07 16:49 ` Thomas Abraham
2011-12-07 16:24 ` [PATCH 2/4] arm: exynos4: add irq_domain support for wakeup interrupts Rob Herring
2011-12-07 17:04 ` Thomas Abraham
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=1323266392-28330-2-git-send-email-thomas.abraham@linaro.org \
--to=thomas.abraham@linaro.org \
--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).