Skip to contentSkip to conversation

ARM: imx: support edge irq trigger for gpc

PATCH New Anson Huang 3 participants 3 messages Oct 19, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: imx: support edge irq trigger for gpc

GPC irq domain is a child domain of GIC, now all of platform irqs are inside GPC domain, during the module populate, all devices irq should have correct type setting in GIC, however, there is no .irq_set_type callback setting in GPC, so the irq_set_type will be skipped and cause edge raising type of irq work abnormally after kernel boot up.

Since GPC has no irq type, so just tell kernel to use irq_chip_set_type_parent instead.

---
 arch/arm/mach-imx/gpc.c | 1 +
 1 file changed, 1 insertion(+)
arch/arm/mach-imx/gpc.c +1 -0
index 10bf715..b3a7a74 100644
@@ -176,6 +176,7 @@ static struct irq_chip imx_gpc_chip = {
 	.irq_unmask		= imx_gpc_irq_unmask,
 	.irq_retrigger		= irq_chip_retrigger_hierarchy,
 	.irq_set_wake		= imx_gpc_irq_set_wake,
+	.irq_set_type           = irq_chip_set_type_parent,
 #ifdef CONFIG_SMP
 	.irq_set_affinity	= irq_chip_set_affinity_parent,
 #endif
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 ARM: imx: support edge irq trigger for gpc

Am Dienstag, den 20.10.2015, 01:02 +0800 schrieb Anson Huang:

Quoted 8 lines

GPC irq domain is a child domain of GIC, now all of platform irqs are inside GPC domain, during the module populate, all devices irq should have correct type setting in GIC, however, there is no .irq_set_type callback setting in GPC, so the irq_set_type will be skipped and cause edge raising type of irq work abnormally after kernel boot up.

What are the symptoms of this "abnormal" working?

Quoted 3 lines

Since GPC has no irq type, so just tell kernel to use irq_chip_set_type_parent instead.

The change itself looks good, but the description needs some work. Also please don't wrap the commit message too early, it makes it harder than necessary to read.

Quoted 1 line

I think this needs a stable annotation.

Quoted 16 lines
---
 arch/arm/mach-imx/gpc.c | 1 +
 1 file changed, 1 insertion(+)
arch/arm/mach-imx/gpc.c +1 -0
index 10bf715..b3a7a74 100644
@@ -176,6 +176,7 @@ static struct irq_chip imx_gpc_chip = {
 	.irq_unmask		= imx_gpc_irq_unmask,
 	.irq_retrigger		= irq_chip_retrigger_hierarchy,
 	.irq_set_wake		= imx_gpc_irq_set_wake,
+	.irq_set_type           = irq_chip_set_type_parent,
 #ifdef CONFIG_SMP
 	.irq_set_affinity	= irq_chip_set_affinity_parent,
 #endif
Signature · 2 lines
Pengutronix e.K.             | Lucas Stach                 |
Industrial Linux Solutions   | http://www.pengutronix.de/  |
#2 lore raw

PATCH 1/1 ARM: imx: support edge irq trigger for gpc

In reply to Anson Huang
Quoted 8 lines · On Tue, 20 Oct 2015 01:02:12 +0800 Anson Huang <[email protected]> wrote:

GPC irq domain is a child domain of GIC, now all of platform irqs are inside GPC domain, during the module populate, all devices irq should have correct type setting in GIC, however, there is no .irq_set_type callback setting in GPC, so the irq_set_type will be skipped and cause edge raising type of irq work abnormally after kernel boot up.

Quoted 4 lines

Since GPC has no irq type, so just tell kernel to use irq_chip_set_type_parent instead.

Looks good to me.

	M.
Signature · 1 line
Jazz is not dead. It just smells funny.