Skip to contentSkip to conversation

gpio: em: Use irq_domain_add_simple() to fix runtime error

PATCH In review Magnus Damm 3 participants 6 messages Feb 12, 2013 – Feb 14, 2013

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

PATCH 1/1 gpio: em: Use irq_domain_add_simple() to fix runtime error

From: Magnus Damm <[email protected]>

Adjust the gpio-em.c driver to reconsider the pdata->irq_base variable. Non-DT board code like for instance board-kzm9d.c needs to operate of a static IRQ range for platform devices.

So this patch is updating the code to make use of the function irq_domain_add_simple() instead of irq_domain_add_linear().

Fixes a EMEV2 / KZM9D runtime error caused by the following commit:
7385500 gpio/em: convert to linear IRQ domain

---

 drivers/gpio/gpio-em.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpio/gpio-em.c +2 -1
@@ -299,8 +299,9 @@ static int em_gio_probe(struct platform_
 	irq_chip->irq_set_type = em_gio_irq_set_type;
 	irq_chip->flags	= IRQCHIP_SKIP_SET_WAKE;
 
-	p->irq_domain = irq_domain_add_linear(pdev->dev.of_node,
+	p->irq_domain = irq_domain_add_simple(pdev->dev.of_node,
 					      pdata->number_of_pins,
+					      pdata->irq_base,
 					      &em_gio_irq_domain_ops, p);
 	if (!p->irq_domain) {
 		ret = -ENXIO;
Tested-by on v1 1/1
#1 lore raw
Quoted 6 lines · Magnus Damm

From: Magnus Damm <[email protected]>

Adjust the gpio-em.c driver to reconsider the pdata->irq_base variable. Non-DT board code like for instance board-kzm9d.c needs to operate of a static IRQ range for platform devices.

Quoted 8 lines

So this patch is updating the code to make use of the function irq_domain_add_simple() instead of irq_domain_add_linear().

Fixes a EMEV2 / KZM9D runtime error caused by the following commit:
7385500 gpio/em: convert to linear IRQ domain

This appears to be a regression between v3.7 and v3.8-rc1 which (possibly amongst other things) prevents the NIC on the KZM9D from functioning.

Quoted 19 lines

---

 drivers/gpio/gpio-em.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpio/gpio-em.c +2 -1
@@ -299,8 +299,9 @@ static int em_gio_probe(struct platform_
 	irq_chip->irq_set_type = em_gio_irq_set_type;
 	irq_chip->flags	= IRQCHIP_SKIP_SET_WAKE;
 
-	p->irq_domain = irq_domain_add_linear(pdev->dev.of_node,
+	p->irq_domain = irq_domain_add_simple(pdev->dev.of_node,
 					      pdata->number_of_pins,
+					      pdata->irq_base,
 					      &em_gio_irq_domain_ops, p);
 	if (!p->irq_domain) {
 		ret = -ENXIO;
#2 lore raw
In reply to Magnus Damm

Hi Simon,

Quoted 17 lines · Simon Horman
Quoted 6 lines · Magnus Damm

From: Magnus Damm <[email protected]>

Adjust the gpio-em.c driver to reconsider the pdata->irq_base variable. Non-DT board code like for instance board-kzm9d.c needs to operate of a static IRQ range for platform devices.

Quoted 8 lines

So this patch is updating the code to make use of the function irq_domain_add_simple() instead of irq_domain_add_linear().

Fixes a EMEV2 / KZM9D runtime error caused by the following commit:
7385500 gpio/em: convert to linear IRQ domain

Quoted 6 lines

This appears to be a regression between v3.7 and v3.8-rc1 which (possibly amongst other things) prevents the NIC on the KZM9D from functioning.

Thanks, Simon. I forgot to add you on the Reported-by. Good to see that you've tested the patch.

So how can we merge this one? From my point of view, if v3.8 is difficult timing wise then v3.9 is fine.

Thanks,

/ magnus

#3 lore raw
In reply to Magnus Damm
Quoted 27 lines · Magnus Damm

Hi Simon,

Quoted 17 lines · Simon Horman
Quoted 6 lines · Magnus Damm

From: Magnus Damm <[email protected]>

Adjust the gpio-em.c driver to reconsider the pdata->irq_base variable. Non-DT board code like for instance board-kzm9d.c needs to operate of a static IRQ range for platform devices.

Quoted 8 lines

So this patch is updating the code to make use of the function irq_domain_add_simple() instead of irq_domain_add_linear().

Fixes a EMEV2 / KZM9D runtime error caused by the following commit:
7385500 gpio/em: convert to linear IRQ domain

Quoted 6 lines

This appears to be a regression between v3.7 and v3.8-rc1 which (possibly amongst other things) prevents the NIC on the KZM9D from functioning.

Quoted 5 lines

Thanks, Simon. I forgot to add you on the Reported-by. Good to see that you've tested the patch.

So how can we merge this one? From my point of view, if v3.8 is difficult timing wise then v3.9 is fine.

I assumed it would go through the GIPO tree.
But I can handle it through the renesas tree if
that is preferred.

In any case I guess it should go into v3.9 and 3.8-stable.

#4 lore raw
In reply to Magnus Damm
Quoted 10 lines · Magnus Damm

[Simon]

Quoted 3 lines

This appears to be a regression between v3.7 and v3.8-rc1 which (possibly amongst other things) prevents the NIC on the KZM9D from functioning.

Thanks, Simon. I forgot to add you on the Reported-by. Good to see that you've tested the patch.

So how can we merge this one? From my point of view, if v3.8 is difficult timing wise then v3.9 is fine.

I've applied it to for-next with an Cc: stable tag.

Thanks,
Linus Walleij

#5 lore raw
In reply to Magnus Damm
Quoted 6 lines · Linus Walleij
Quoted 5 lines · Magnus Damm

[Simon]

Quoted 3 lines

This appears to be a regression between v3.7 and v3.8-rc1 which (possibly amongst other things) prevents the NIC on the KZM9D from functioning.

Quoted 7 lines
Quoted 5 lines

Thanks, Simon. I forgot to add you on the Reported-by. Good to see that you've tested the patch.

So how can we merge this one? From my point of view, if v3.8 is difficult timing wise then v3.9 is fine.

I've applied it to for-next with an Cc: stable tag.

Thanks.