From: gerlando.falauto@keymile.com (Gerlando Falauto)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 3/9] gpio: mvebu: convert to usage of *pmask_cache within irq_chip_type
Date: Mon, 18 Mar 2013 15:00:49 +0100 [thread overview]
Message-ID: <1363615255-18200-4-git-send-email-gerlando.falauto@keymile.com> (raw)
In-Reply-To: <1363615255-18200-1-git-send-email-gerlando.falauto@keymile.com>
Since we have now introduced pmask_cache within irq_chip_type to also
handle per-chip-type mask registers, convert gpio-mvebu driver to use
this new pointer.
Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>
---
drivers/gpio/gpio-mvebu.c | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
index 456663c..81384f4 100644
--- a/drivers/gpio/gpio-mvebu.c
+++ b/drivers/gpio/gpio-mvebu.c
@@ -302,48 +302,52 @@ static void mvebu_gpio_irq_ack(struct irq_data *d)
static void mvebu_gpio_edge_irq_mask(struct irq_data *d)
{
struct irq_chip_generic *gc = irq_data_get_irq_chip_data(d);
+ struct irq_chip_type *ct = irq_data_get_chip_type(d);
struct mvebu_gpio_chip *mvchip = gc->private;
u32 mask = 1 << (d->irq - gc->irq_base);
irq_gc_lock(gc);
- gc->mask_cache &= ~mask;
- writel_relaxed(gc->mask_cache, mvebu_gpioreg_edge_mask(mvchip));
+ *ct->pmask_cache &= ~mask;
+ writel_relaxed(*ct->pmask_cache, mvebu_gpioreg_edge_mask(mvchip));
irq_gc_unlock(gc);
}
static void mvebu_gpio_edge_irq_unmask(struct irq_data *d)
{
struct irq_chip_generic *gc = irq_data_get_irq_chip_data(d);
+ struct irq_chip_type *ct = irq_data_get_chip_type(d);
struct mvebu_gpio_chip *mvchip = gc->private;
u32 mask = 1 << (d->irq - gc->irq_base);
irq_gc_lock(gc);
- gc->mask_cache |= mask;
- writel_relaxed(gc->mask_cache, mvebu_gpioreg_edge_mask(mvchip));
+ *ct->pmask_cache |= mask;
+ writel_relaxed(*ct->pmask_cache, mvebu_gpioreg_edge_mask(mvchip));
irq_gc_unlock(gc);
}
static void mvebu_gpio_level_irq_mask(struct irq_data *d)
{
struct irq_chip_generic *gc = irq_data_get_irq_chip_data(d);
+ struct irq_chip_type *ct = irq_data_get_chip_type(d);
struct mvebu_gpio_chip *mvchip = gc->private;
u32 mask = 1 << (d->irq - gc->irq_base);
irq_gc_lock(gc);
- gc->mask_cache &= ~mask;
- writel_relaxed(gc->mask_cache, mvebu_gpioreg_level_mask(mvchip));
+ *ct->pmask_cache &= ~mask;
+ writel_relaxed(*ct->pmask_cache, mvebu_gpioreg_level_mask(mvchip));
irq_gc_unlock(gc);
}
static void mvebu_gpio_level_irq_unmask(struct irq_data *d)
{
struct irq_chip_generic *gc = irq_data_get_irq_chip_data(d);
+ struct irq_chip_type *ct = irq_data_get_chip_type(d);
struct mvebu_gpio_chip *mvchip = gc->private;
u32 mask = 1 << (d->irq - gc->irq_base);
irq_gc_lock(gc);
- gc->mask_cache |= mask;
- writel_relaxed(gc->mask_cache, mvebu_gpioreg_level_mask(mvchip));
+ *ct->pmask_cache |= mask;
+ writel_relaxed(*ct->pmask_cache, mvebu_gpioreg_level_mask(mvchip));
irq_gc_unlock(gc);
}
--
1.7.10.1
next prev parent reply other threads:[~2013-03-18 14:00 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-14 16:10 [PATCH] genirq: allow an alternative setup for the mask cache Holger Brunck
2013-03-14 17:45 ` Simon Guinot
2013-03-15 10:43 ` Holger Brunck
2013-03-15 11:02 ` Thomas Gleixner
2013-03-15 16:26 ` Gerlando Falauto
2013-03-15 19:55 ` Thomas Gleixner
2013-03-14 19:08 ` Thomas Gleixner
2013-03-14 19:42 ` Ezequiel Garcia
2013-03-18 11:05 ` Gerlando Falauto
2013-03-15 19:36 ` [PATCH v2 0/2] refactoring for mask_cache Gerlando Falauto
2013-03-15 19:36 ` [PATCH 1/2] genirq: cosmetic: remove cur_regs Gerlando Falauto
2013-03-15 19:36 ` [PATCH 2/2] genirq: move mask_cache into struct irq_chip_type Gerlando Falauto
2013-03-15 20:47 ` Thomas Gleixner
2013-03-18 7:59 ` Gerlando Falauto
2013-03-18 8:56 ` Thomas Gleixner
2013-03-15 21:25 ` [PATCH v2 0/2] refactoring for mask_cache Andrew Lunn
2013-03-15 23:34 ` Simon Guinot
2013-03-18 14:00 ` [PATCH v3 0/9] " Gerlando Falauto
2013-03-18 14:00 ` [PATCH v3 1/9] genirq: cosmetic: remove cur_regs Gerlando Falauto
2013-03-18 14:00 ` [PATCH v3 2/9] genirq: add mask_cache and pmask_cache into struct irq_chip_type Gerlando Falauto
2013-03-19 11:32 ` Thomas Gleixner
2013-03-18 14:00 ` Gerlando Falauto [this message]
2013-03-18 14:00 ` [PATCH v3 4/9] MIPS: JZ4740: convert to usage of *pmask_cache within irq_chip_type Gerlando Falauto
2013-03-18 14:00 ` [PATCH v3 5/9] ARM: SAMSUNG: " Gerlando Falauto
2013-03-18 14:00 ` [PATCH v3 6/9] genirq: rename mask_cache to shared_mask_cache Gerlando Falauto
2013-03-18 14:00 ` [PATCH v3 7/9] genirq: handle separate mask registers Gerlando Falauto
2013-03-18 14:00 ` [PATCH v3 8/9] orion-gpio: enable IRQ_GC_SEPARATE_MASK_REGISTERS Gerlando Falauto
2013-03-18 14:00 ` [PATCH v3 9/9] gpio: mvebu: " Gerlando Falauto
2013-03-18 14:28 ` [PATCH v3 0/9] refactoring for mask_cache Simon Guinot
2013-03-18 14:39 ` Simon Guinot
2013-03-19 10:03 ` Ezequiel Garcia
2013-03-19 10:09 ` Gerlando Falauto
2013-03-19 11:25 ` Ezequiel Garcia
2013-03-19 11:06 ` Jason Cooper
2013-03-19 11:10 ` Gerlando Falauto
2013-03-19 11:44 ` Jason Cooper
2013-03-19 11:56 ` Jason Cooper
2013-03-20 17:40 ` Gerlando Falauto
2013-03-20 21:42 ` Thomas Gleixner
2013-03-21 10:37 ` Gerlando Falauto
2013-03-21 10:59 ` Simon Guinot
2013-03-19 11:19 ` Ezequiel Garcia
2013-03-21 10:51 ` Simon Guinot
2013-03-21 11:24 ` Gerlando Falauto
2013-04-04 9:31 ` Ezequiel Garcia
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=1363615255-18200-4-git-send-email-gerlando.falauto@keymile.com \
--to=gerlando.falauto@keymile.com \
--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).