aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLudovic Barre <ludovic.barre@st.com>2017-11-06 12:03:36 -0500
committerMarc Zyngier <marc.zyngier@arm.com>2017-11-07 06:44:43 -0500
commit90af7c254ffb94b0df47bf6f613e3f3173df05d1 (patch)
tree16c4de9e24a4d167750515c4a3b48f85ef155b8a
parent2ca6b9bcaad4a78af255be9e16b3f3062a6d7c32 (diff)
irqchip/stm32: Move the wakeup on interrupt mask
Move irq_set_wake on interrupt mask, needed to wake up from low power mode as the event mask is not able to do so. Signed-off-by: Ludovic Barre <ludovic.barre@st.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
-rw-r--r--drivers/irqchip/irq-stm32-exti.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/irqchip/irq-stm32-exti.c b/drivers/irqchip/irq-stm32-exti.c
index 477d0faf0ea2..31ab0dee2ce7 100644
--- a/drivers/irqchip/irq-stm32-exti.c
+++ b/drivers/irqchip/irq-stm32-exti.c
@@ -156,16 +156,16 @@ static int stm32_irq_set_wake(struct irq_data *data, unsigned int on)
156 struct irq_chip_generic *gc = irq_data_get_irq_chip_data(data); 156 struct irq_chip_generic *gc = irq_data_get_irq_chip_data(data);
157 const struct stm32_exti_bank *stm32_bank = gc->private; 157 const struct stm32_exti_bank *stm32_bank = gc->private;
158 int pin = data->hwirq % IRQS_PER_BANK; 158 int pin = data->hwirq % IRQS_PER_BANK;
159 u32 emr; 159 u32 imr;
160 160
161 irq_gc_lock(gc); 161 irq_gc_lock(gc);
162 162
163 emr = irq_reg_readl(gc, stm32_bank->emr_ofst); 163 imr = irq_reg_readl(gc, stm32_bank->imr_ofst);
164 if (on) 164 if (on)
165 emr |= BIT(pin); 165 imr |= BIT(pin);
166 else 166 else
167 emr &= ~BIT(pin); 167 imr &= ~BIT(pin);
168 irq_reg_writel(gc, emr, stm32_bank->emr_ofst); 168 irq_reg_writel(gc, imr, stm32_bank->imr_ofst);
169 169
170 irq_gc_unlock(gc); 170 irq_gc_unlock(gc);
171 171