lkml.org 
[lkml]   [2015]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
Subject[PATCH/RFC 01/03] irqchip: renesas-irqc: Add irq_enable() and irq_disable()
From: Magnus Damm <damm+renesas@opensource.se>

Hook up ->irq_enable() and ->irq_disable() together with
->irq_mask() and ->irq_unmask(). This should not adjust
any code behaviour at all.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
---

drivers/irqchip/irq-renesas-irqc.c | 24 ++++++++++++++++++------
1 file changed, 18 insertions(+), 6 deletions(-)

--- 0001/drivers/irqchip/irq-renesas-irqc.c
+++ work/drivers/irqchip/irq-renesas-irqc.c 2015-04-21 23:09:53.116371520 +0900
@@ -76,24 +76,34 @@ static void irqc_dbg(struct irqc_irq *i,
str, i->requested_irq, i->hw_irq, i->domain_irq);
}

-static void irqc_irq_enable(struct irq_data *d)
+static void irqc_irq_unmask(struct irq_data *d)
{
struct irqc_priv *p = irq_data_get_irq_chip_data(d);
int hw_irq = irqd_to_hwirq(d);

- irqc_dbg(&p->irq[hw_irq], "enable");
+ irqc_dbg(&p->irq[hw_irq], "unmask");
iowrite32(BIT(hw_irq), p->cpu_int_base + IRQC_EN_SET);
}

-static void irqc_irq_disable(struct irq_data *d)
+static void irqc_irq_mask(struct irq_data *d)
{
struct irqc_priv *p = irq_data_get_irq_chip_data(d);
int hw_irq = irqd_to_hwirq(d);

- irqc_dbg(&p->irq[hw_irq], "disable");
+ irqc_dbg(&p->irq[hw_irq], "mask");
iowrite32(BIT(hw_irq), p->cpu_int_base + IRQC_EN_STS);
}

+static void irqc_irq_enable(struct irq_data *d)
+{
+ irqc_irq_unmask(d);
+}
+
+static void irqc_irq_disable(struct irq_data *d)
+{
+ irqc_irq_mask(d);
+}
+
static unsigned char irqc_sense[IRQ_TYPE_SENSE_MASK + 1] = {
[IRQ_TYPE_LEVEL_LOW] = 0x01,
[IRQ_TYPE_LEVEL_HIGH] = 0x02,
@@ -244,8 +254,10 @@ static int irqc_probe(struct platform_de

irq_chip = &p->irq_chip;
irq_chip->name = name;
- irq_chip->irq_mask = irqc_irq_disable;
- irq_chip->irq_unmask = irqc_irq_enable;
+ irq_chip->irq_enable = irqc_irq_enable;
+ irq_chip->irq_disable = irqc_irq_disable;
+ irq_chip->irq_mask = irqc_irq_mask;
+ irq_chip->irq_unmask = irqc_irq_unmask;
irq_chip->irq_set_type = irqc_irq_set_type;
irq_chip->irq_set_wake = irqc_irq_set_wake;
irq_chip->flags = IRQCHIP_MASK_ON_SUSPEND;

\
 
 \ /
  Last update: 2015-04-21 17:41    [W:0.065 / U:1.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site