From: Lars-Peter Clausen <lars@metafoo.de>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org, linux-kernel@vger.kernel.org,
Lars-Peter Clausen <lars@metafoo.de>
Subject: [PATCH 3/4] MIPS: JZ4740: GPIO: Simplify IRQ demuxer
Date: Fri, 3 Jun 2011 03:06:50 +0200 [thread overview]
Message-ID: <1307063211-10098-3-git-send-email-lars@metafoo.de> (raw)
In-Reply-To: <1307063211-10098-1-git-send-email-lars@metafoo.de>
We already know the base IRQ for a GPIO chip, so there is no need to recalculate
it in the demux handler.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
arch/mips/jz4740/gpio.c | 8 +-------
1 files changed, 1 insertions(+), 7 deletions(-)
diff --git a/arch/mips/jz4740/gpio.c b/arch/mips/jz4740/gpio.c
index ab583b8..f3590a2 100644
--- a/arch/mips/jz4740/gpio.c
+++ b/arch/mips/jz4740/gpio.c
@@ -301,22 +301,16 @@ static void jz_gpio_irq_demux_handler(unsigned int irq, struct irq_desc *desc)
{
uint32_t flag;
unsigned int gpio_irq;
- unsigned int gpio_bank;
struct jz_gpio_chip *chip = irq_desc_get_handler_data(desc);
- gpio_bank = JZ4740_IRQ_GPIO0 - irq;
-
flag = readl(chip->base + JZ_REG_GPIO_FLAG);
-
if (!flag)
return;
- gpio_irq = __fls(flag);
+ gpio_irq = chip->irq_base + __fls(flag);
jz_gpio_check_trigger_both(chip, irq);
- gpio_irq += (gpio_bank << 5) + JZ4740_IRQ_GPIO(0);
-
generic_handle_irq(gpio_irq);
};
--
1.7.2.5
next prev parent reply other threads:[~2011-06-03 1:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-03 1:06 [PATCH 1/4] PM / MIPS: Use struct syscore_ops instead of sysdevs for PM (v2) Lars-Peter Clausen
2011-06-03 1:06 ` [PATCH 2/4] MIPS: JZ4740: Use generic irq chip Lars-Peter Clausen
2011-08-18 18:11 ` Ralf Baechle
2011-06-03 1:06 ` Lars-Peter Clausen [this message]
2011-08-18 18:11 ` [PATCH 3/4] MIPS: JZ4740: GPIO: Simplify IRQ demuxer Ralf Baechle
2011-06-03 1:06 ` [PATCH 4/4] MIPS: JZ4740: GPIO: Check correct IRQ in demux handler Lars-Peter Clausen
2011-08-18 18:11 ` Ralf Baechle
2011-08-18 17:56 ` [PATCH 1/4] PM / MIPS: Use struct syscore_ops instead of sysdevs for PM (v2) Ralf Baechle
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=1307063211-10098-3-git-send-email-lars@metafoo.de \
--to=lars@metafoo.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.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®