Commit 54bedcd0 authored by Gilles Chanteperdrix's avatar Gilles Chanteperdrix Committed by Philippe Gerum

pinctrl: ipipe: enable interrupt pipelining

Do the fixups in the generic pin controller driver required to channel
the incoming interrupts through the interrupt pipeline.
parent e14adb41
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include <linux/err.h> #include <linux/err.h>
#include <linux/list.h> #include <linux/list.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/ipipe.h>
#include <linux/irqchip/chained_irq.h> #include <linux/irqchip/chained_irq.h>
...@@ -185,7 +186,11 @@ struct pcs_device { ...@@ -185,7 +186,11 @@ struct pcs_device {
#define PCS_FEAT_PINCONF (1 << 0) #define PCS_FEAT_PINCONF (1 << 0)
struct property *missing_nr_pinctrl_cells; struct property *missing_nr_pinctrl_cells;
struct pcs_soc_data socdata; struct pcs_soc_data socdata;
#ifdef CONFIG_IPIPE
ipipe_spinlock_t lock;
#else /* !IPIPE */
raw_spinlock_t lock; raw_spinlock_t lock;
#endif /* !IPIPE */
struct mutex mutex; struct mutex mutex;
unsigned width; unsigned width;
unsigned fmask; unsigned fmask;
...@@ -1460,7 +1465,7 @@ static int pcs_irq_handle(struct pcs_soc_data *pcs_soc) ...@@ -1460,7 +1465,7 @@ static int pcs_irq_handle(struct pcs_soc_data *pcs_soc)
mask = pcs->read(pcswi->reg); mask = pcs->read(pcswi->reg);
raw_spin_unlock(&pcs->lock); raw_spin_unlock(&pcs->lock);
if (mask & pcs_soc->irq_status_mask) { if (mask & pcs_soc->irq_status_mask) {
generic_handle_irq(irq_find_mapping(pcs->domain, ipipe_handle_demuxed_irq(irq_find_mapping(pcs->domain,
pcswi->hwirq)); pcswi->hwirq));
count++; count++;
} }
...@@ -1480,8 +1485,14 @@ static int pcs_irq_handle(struct pcs_soc_data *pcs_soc) ...@@ -1480,8 +1485,14 @@ static int pcs_irq_handle(struct pcs_soc_data *pcs_soc)
static irqreturn_t pcs_irq_handler(int irq, void *d) static irqreturn_t pcs_irq_handler(int irq, void *d)
{ {
struct pcs_soc_data *pcs_soc = d; struct pcs_soc_data *pcs_soc = d;
unsigned long flags;
irqreturn_t ret;
return pcs_irq_handle(pcs_soc) ? IRQ_HANDLED : IRQ_NONE; flags = hard_cond_local_irq_save();
ret = pcs_irq_handle(pcs_soc) ? IRQ_HANDLED : IRQ_NONE;
hard_cond_local_irq_restore(flags);
return ret;
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment