Skip to contentSkip to conversation

irqchip: al-fic: add support for irq retrigger

PATCH Applied Talel Shenhar 3 participants 4 messages Sep 9, 2019 – Oct 14, 2019

Subsystems (2)
lore
Share & tools
lore

Talel Shenhar

author maintainer
#0 lore raw

PATCH 1/1 irqchip: al-fic: add support for irq retrigger

Introduce interrupts retrigger support for Amazon's Annapurna Labs Fabric Interrupt Controller.

---
 drivers/irqchip/irq-al-fic.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
drivers/irqchip/irq-al-fic.c +12 -0
index 1a57cee..0b0a737 100644
@@ -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;
 
Signature · 1 line
2.7.4
#1 lore raw

On Mon, 09 Sep 2019 09:39:18 +0100,
Talel Shenhar <[email protected]> wrote:

Hi Talel,

Quoted 39 lines

Introduce interrupts retrigger support for Amazon's Annapurna Labs Fabric Interrupt Controller.

---
 drivers/irqchip/irq-al-fic.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
drivers/irqchip/irq-al-fic.c +11 -0
index 1a57cee..0b0a737 100644
@@ -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)
 {

drivers/irqchip/irq-al-fic.c static int al_fic_register(struct device_node *node, · line 175

Quoted 6 lines
drivers/irqchip/irq-al-fic.c +1 -0
@@ -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;

Looks good to me. Is this a fix or a new feature? If the former, I can queue it up for -rc1.

	M.
Signature · 1 line
Jazz is not dead, it just smells funny.
author maintainer
#2 lore raw
Quoted 52 lines · Marc Zyngier

On Mon, 09 Sep 2019 09:39:18 +0100,
Talel Shenhar <[email protected]> wrote:

Hi Talel,

Quoted 38 lines

Introduce interrupts retrigger support for Amazon's Annapurna Labs Fabric Interrupt Controller.

---
  drivers/irqchip/irq-al-fic.c | 12 ++++++++++++
  1 file changed, 12 insertions(+)
drivers/irqchip/irq-al-fic.c +11 -0
index 1a57cee..0b0a737 100644
@@ -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)
  {

drivers/irqchip/irq-al-fic.c static int al_fic_register(struct device_node *node, · line 175

Quoted 6 lines
drivers/irqchip/irq-al-fic.c +1 -0
@@ -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;

Looks good to me. Is this a fix or a new feature? If the former, I can queue it up for -rc1.

Quoted 1 line
	M.

This is an enhancement to the merged al-fic driver. queuing it up sounds good.

Thanks Marc!

merge bot Applied
#3 lore raw

[tip: irq/urgent] irqchip/al-fic: Add support for irq retrigger

In reply to Talel Shenhar
The following commit has been merged into the irq/urgent branch of tip:

The following commit has been merged into the irq/urgent branch of tip:

Commit-ID:     9c426b770bd088f18899f836093d810a83b59b98
Gitweb:        https://git.kernel.org/tip/9c426b770bd088f18899f836093d810a83b59b98
Author:        Talel Shenhar <[email protected]>
AuthorDate:    Mon, 09 Sep 2019 11:39:18 +03:00
Committer:     Marc Zyngier <[email protected]>
CommitterDate: Mon, 09 Sep 2019 18:11:47 +01:00

irqchip/al-fic: Add support for irq retrigger

Introduce interrupts retrigger support for Amazon's Annapurna Labs Fabric Interrupt Controller.

---
 drivers/irqchip/irq-al-fic.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
drivers/irqchip/irq-al-fic.c +12 -0
index 1a57cee..0b0a737 100644
@@ -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;