summaryrefslogtreecommitdiff
path: root/drivers/irqchip/irq-al-fic.c
diff options
context:
space:
mode:
authorTalel Shenhar <talel@amazon.com>2019-09-09 11:39:18 +0300
committerMarc Zyngier <maz@kernel.org>2019-09-09 18:11:47 +0100
commit9c426b770bd088f18899f836093d810a83b59b98 (patch)
tree8bd884a856d7c17a2d64170deba03a61a9e76bcc /drivers/irqchip/irq-al-fic.c
parentc9c96e30ecaa0aafa225aa1a5392cb7db17c7a82 (diff)
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 <talel@amazon.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/1568018358-18985-1-git-send-email-talel@amazon.com
Diffstat (limited to 'drivers/irqchip/irq-al-fic.c')
-rw-r--r--drivers/irqchip/irq-al-fic.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/irqchip/irq-al-fic.c b/drivers/irqchip/irq-al-fic.c
index 1a57cee3efab..0b0a73739756 100644
--- a/drivers/irqchip/irq-al-fic.c
+++ b/drivers/irqchip/irq-al-fic.c
@@ -15,6 +15,7 @@
/* FIC Registers */
#define AL_FIC_CAUSE 0x00
+#define AL_FIC_SET_CAUSE 0x08
#define AL_FIC_MASK 0x10
#define AL_FIC_CONTROL 0x28
@@ -126,6 +127,16 @@ static void al_fic_irq_handler(struct irq_desc *desc)
chained_irq_exit(irqchip, desc);
}
+static int al_fic_irq_retrigger(struct irq_data *data)
+{
+ struct irq_chip_generic *gc = irq_data_get_irq_chip_data(data);
+ struct al_fic *fic = gc->private;
+
+ writel_relaxed(BIT(data->hwirq), fic->base + AL_FIC_SET_CAUSE);
+
+ return 1;
+}
+
static int al_fic_register(struct device_node *node,
struct al_fic *fic)
{
@@ -159,6 +170,7 @@ static int al_fic_register(struct device_node *node,
gc->chip_types->chip.irq_unmask = irq_gc_mask_clr_bit;
gc->chip_types->chip.irq_ack = irq_gc_ack_clr_bit;
gc->chip_types->chip.irq_set_type = al_fic_irq_set_type;
+ gc->chip_types->chip.irq_retrigger = al_fic_irq_retrigger;
gc->chip_types->chip.flags = IRQCHIP_SKIP_SET_WAKE;
gc->private = fic;