Commit 25591d4c authored by Alexandre Torgue's avatar Alexandre Torgue Committed by Marc Zyngier

irqchip/stm32: Add irq retrigger support

This commit introduces retrigger support for stm32_ext_h chip.
It consists to rise the GIC interrupt mapped to an EXTI line.
Signed-off-by: default avatarAlexandre Torgue <alexandre.torgue@st.com>
Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
Tested-by: default avatarMarek Vasut <marex@denx.de>
Link: https://lore.kernel.org/r/20200219143229.18084-2-alexandre.torgue@st.com
parent a1511107
...@@ -604,12 +604,24 @@ static void stm32_exti_h_syscore_deinit(void) ...@@ -604,12 +604,24 @@ static void stm32_exti_h_syscore_deinit(void)
unregister_syscore_ops(&stm32_exti_h_syscore_ops); unregister_syscore_ops(&stm32_exti_h_syscore_ops);
} }
static int stm32_exti_h_retrigger(struct irq_data *d)
{
struct stm32_exti_chip_data *chip_data = irq_data_get_irq_chip_data(d);
const struct stm32_exti_bank *stm32_bank = chip_data->reg_bank;
void __iomem *base = chip_data->host_data->base;
u32 mask = BIT(d->hwirq % IRQS_PER_BANK);
writel_relaxed(mask, base + stm32_bank->swier_ofst);
return 0;
}
static struct irq_chip stm32_exti_h_chip = { static struct irq_chip stm32_exti_h_chip = {
.name = "stm32-exti-h", .name = "stm32-exti-h",
.irq_eoi = stm32_exti_h_eoi, .irq_eoi = stm32_exti_h_eoi,
.irq_mask = stm32_exti_h_mask, .irq_mask = stm32_exti_h_mask,
.irq_unmask = stm32_exti_h_unmask, .irq_unmask = stm32_exti_h_unmask,
.irq_retrigger = irq_chip_retrigger_hierarchy, .irq_retrigger = stm32_exti_h_retrigger,
.irq_set_type = stm32_exti_h_set_type, .irq_set_type = stm32_exti_h_set_type,
.irq_set_wake = stm32_exti_h_set_wake, .irq_set_wake = stm32_exti_h_set_wake,
.flags = IRQCHIP_MASK_ON_SUSPEND, .flags = IRQCHIP_MASK_ON_SUSPEND,
......
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