From: thomas.abraham@linaro.org (Thomas Abraham)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 1/4] ARM: Exynos4: Simplify EINT number to linux irq number translation
Date: Wed, 22 Feb 2012 17:44:15 +0530 [thread overview]
Message-ID: <1329912858-32750-2-git-send-email-thomas.abraham@linaro.org> (raw)
In-Reply-To: <1329912858-32750-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/common.c | 26 +++-----------------------
1 files changed, 3 insertions(+), 23 deletions(-)
diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c
index ac5ac0e..7dd9dd0 100644
--- a/arch/arm/mach-exynos/common.c
+++ b/arch/arm/mach-exynos/common.c
@@ -550,27 +550,7 @@ void __init exynos4_init_uarts(struct s3c2410_uartcfg *cfg, int no)
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)
{
@@ -748,9 +728,9 @@ static 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:[~2012-02-22 12:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-22 12:14 [PATCH v3 0/4] ARM: Exynos4: Add irq domain and device tree support for wakeup interrupts Thomas Abraham
2012-02-22 12:14 ` Thomas Abraham [this message]
2012-02-22 12:14 ` [PATCH v3 2/4] ARM: Exynos4: Add irq_domain support for gpio " Thomas Abraham
2012-02-22 12:14 ` [PATCH v3 3/4] ARM: Exynos4: Remove arch_initcall for wakeup interrupt initialization Thomas Abraham
2012-02-22 12:14 ` [PATCH v3 4/4] ARM: Exynos4: Add device tree support for gpio wakeup interrupt controller Thomas Abraham
2012-02-22 17:38 ` Rob Herring
2012-03-09 16:32 ` [PATCH v3 0/4] ARM: Exynos4: Add irq domain and device tree support for wakeup interrupts Kukjin Kim
2012-03-09 16:43 ` Thomas Abraham
2012-03-14 10:02 ` 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=1329912858-32750-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).