From: Thomas Gleixner <tglx@linutronix.de>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Mike Frysinger <vapier@gentoo.org>,
uclinux-dist-devel@blackfin.uclinux.org
Subject: [patch 1/2] bfin: Final irq cleanup
Date: Fri, 25 Mar 2011 13:32:55 -0000 [thread overview]
Message-ID: <20110325133202.943843371@linutronix.de> (raw)
In-Reply-To: <20110325133039.521553268@linutronix.de>
[-- Attachment #1: bfin-cleanup.patch --]
[-- Type: text/plain, Size: 2811 bytes --]
Use the trigger type in irq_data and check level type instead of
looking at desc->handle_irq.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: uclinux-dist-devel@blackfin.uclinux.org
---
arch/blackfin/mach-bf561/smp.c | 6 +++---
arch/blackfin/mach-common/ints-priority.c | 9 +++------
2 files changed, 6 insertions(+), 9 deletions(-)
Index: linux-2.6-tip/arch/blackfin/mach-bf561/smp.c
===================================================================
--- linux-2.6-tip.orig/arch/blackfin/mach-bf561/smp.c
+++ linux-2.6-tip/arch/blackfin/mach-bf561/smp.c
@@ -154,13 +154,13 @@ void platform_clear_ipi(unsigned int cpu
void __cpuinit bfin_local_timer_setup(void)
{
#if defined(CONFIG_TICKSOURCE_CORETMR)
- struct irq_chip *chip = get_irq_chip(IRQ_CORETMR);
- struct irq_desc *desc = irq_to_desc(IRQ_CORETMR);
+ struct irq_data *data = irq_get_irq_data(IRQ_CORETMR);
+ struct irq_chip *chip = irq_data_get_chip(data);
bfin_coretmr_init();
bfin_coretmr_clockevent_init();
- chip->irq_unmask(&desc->irq_data);
+ chip->irq_unmask(data);
#else
/* Power down the core timer, just to play safe. */
bfin_write_TCNTL(0);
Index: linux-2.6-tip/arch/blackfin/mach-common/ints-priority.c
===================================================================
--- linux-2.6-tip.orig/arch/blackfin/mach-common/ints-priority.c
+++ linux-2.6-tip/arch/blackfin/mach-common/ints-priority.c
@@ -578,10 +578,9 @@ static void bfin_gpio_ack_irq(struct irq
static void bfin_gpio_mask_ack_irq(struct irq_data *d)
{
unsigned int irq = d->irq;
- struct irq_desc *desc = irq_to_desc(irq);
u32 gpionr = irq_to_gpio(irq);
- if (desc->handle_irq == handle_edge_irq)
+ if (!irqd_is_level_type(d))
set_gpio_data(gpionr, 0);
set_gpio_maska(gpionr, 0);
@@ -837,12 +836,11 @@ void init_pint_lut(void)
static void bfin_gpio_ack_irq(struct irq_data *d)
{
- struct irq_desc *desc = irq_to_desc(d->irq);
u32 pint_val = irq2pint_lut[d->irq - SYS_IRQS];
u32 pintbit = PINT_BIT(pint_val);
u32 bank = PINT_2_BANK(pint_val);
- if ((desc->status & IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_EDGE_BOTH) {
+ if (irqd_get_trigger_type(d) == IRQ_TYPE_EDGE_BOTH) {
if (pint[bank]->invert_set & pintbit)
pint[bank]->invert_clear = pintbit;
else
@@ -854,12 +852,11 @@ static void bfin_gpio_ack_irq(struct irq
static void bfin_gpio_mask_ack_irq(struct irq_data *d)
{
- struct irq_desc *desc = irq_to_desc(d->irq);
u32 pint_val = irq2pint_lut[d->irq - SYS_IRQS];
u32 pintbit = PINT_BIT(pint_val);
u32 bank = PINT_2_BANK(pint_val);
- if ((desc->status & IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_EDGE_BOTH) {
+ if (irqd_get_trigger_type(d) == IRQ_TYPE_EDGE_BOTH) {
if (pint[bank]->invert_set & pintbit)
pint[bank]->invert_clear = pintbit;
else
next prev parent reply other threads:[~2011-03-25 13:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-25 13:32 [patch 0/2] blackfin: " Thomas Gleixner
2011-03-25 13:32 ` Thomas Gleixner [this message]
2011-03-25 13:32 ` [patch 2/2] bfin: Convert irq namespace Thomas Gleixner
2011-03-25 21:34 ` Mike Frysinger
2011-03-25 21:38 ` Mike Frysinger
2011-03-25 21:47 ` Thomas Gleixner
2011-03-25 21:58 ` [uclinux-dist-devel] " Mike Frysinger
2011-03-25 21:17 ` [patch 0/2] blackfin: Final irq cleanup Mike Frysinger
2011-03-30 4:49 ` Mike Frysinger
2011-03-30 8:32 ` Thomas Gleixner
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=20110325133202.943843371@linutronix.de \
--to=tglx@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=uclinux-dist-devel@blackfin.uclinux.org \
--cc=vapier@gentoo.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®