gpio: em: Use irq_domain_add_simple() to fix runtime error
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 ;
Quoted 6 lines · Magnus Damm
From: Magnus Damm <[email protected]>
Adjust the
gpio-em.cdriver to reconsider thepdata->irq_basevariable. Non-DT board code like for instanceboard-kzm9d.cneeds 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 ofirq_domain_add_linear().Fixes a EMEV2 / KZM9D runtime error caused by the following commit:
7385500 gpio/em: convert to linear IRQ domainSigned-off-by Magnus Damm <[email protected]>Acked-by Linus Walleij <[email protected]>
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 ;
Hi Simon,
Quoted 17 lines · Simon Horman
Quoted 6 lines · Magnus Damm
From: Magnus Damm <[email protected]>
Adjust the
gpio-em.cdriver to reconsider thepdata->irq_basevariable. Non-DT board code like for instanceboard-kzm9d.cneeds 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 ofirq_domain_add_linear().Fixes a EMEV2 / KZM9D runtime error caused by the following commit:
7385500 gpio/em: convert to linear IRQ domainSigned-off-by Magnus Damm <[email protected]>Acked-by Linus Walleij <[email protected]>
Quoted 6 lines
Tested-by Simon Horman <[email protected]>Reported-by Simon Horman <[email protected]>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
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.cdriver to reconsider thepdata->irq_basevariable. Non-DT board code like for instanceboard-kzm9d.cneeds 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 ofirq_domain_add_linear().Fixes a EMEV2 / KZM9D runtime error caused by the following commit:
7385500 gpio/em: convert to linear IRQ domainSigned-off-by Magnus Damm <[email protected]>Acked-by Linus Walleij <[email protected]>Quoted 6 lines
Tested-by Simon Horman <[email protected]>Reported-by Simon Horman <[email protected]>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.
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
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.