Skip to content

Commit 9c426b7

Browse files
Talel ShenharMarc Zyngier
authored andcommitted
irqchip/al-fic: Add support for irq retrigger
Introduce interrupts retrigger support for Amazon's Annapurna Labs Fabric Interrupt Controller. Signed-off-by: Talel Shenhar <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent c9c96e3 commit 9c426b7

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

drivers/irqchip/irq-al-fic.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
/* FIC Registers */
1717
#define AL_FIC_CAUSE 0x00
18+
#define AL_FIC_SET_CAUSE 0x08
1819
#define AL_FIC_MASK 0x10
1920
#define AL_FIC_CONTROL 0x28
2021

@@ -126,6 +127,16 @@ static void al_fic_irq_handler(struct irq_desc *desc)
126127
chained_irq_exit(irqchip, desc);
127128
}
128129

130+
static int al_fic_irq_retrigger(struct irq_data *data)
131+
{
132+
struct irq_chip_generic *gc = irq_data_get_irq_chip_data(data);
133+
struct al_fic *fic = gc->private;
134+
135+
writel_relaxed(BIT(data->hwirq), fic->base + AL_FIC_SET_CAUSE);
136+
137+
return 1;
138+
}
139+
129140
static int al_fic_register(struct device_node *node,
130141
struct al_fic *fic)
131142
{
@@ -159,6 +170,7 @@ static int al_fic_register(struct device_node *node,
159170
gc->chip_types->chip.irq_unmask = irq_gc_mask_clr_bit;
160171
gc->chip_types->chip.irq_ack = irq_gc_ack_clr_bit;
161172
gc->chip_types->chip.irq_set_type = al_fic_irq_set_type;
173+
gc->chip_types->chip.irq_retrigger = al_fic_irq_retrigger;
162174
gc->chip_types->chip.flags = IRQCHIP_SKIP_SET_WAKE;
163175
gc->private = fic;
164176

0 commit comments

Comments
 (0)