Hi All,
This patch series aims to drop using platform_get_resource() for IRQ types
in preparation for removal of static setup of IRQ resource from DT core
code.
Dropping usage of platform_get_resource() was agreed based on
the discussion [0].
[0] https://patchwork.kernel.org/project/linux-renesas-soc/
patch/20211209001056.29774-1-prabhakar.mahadev-lad.rj@bp.renesas.com/
Cheers,
Prabhakar
Lad Prabhakar (3):
dmaengine: nbpfaxi: Use platform_get_irq_optional() to get the
interrupt
dmaengine: mediatek: mtk-hsdma: Use platform_get_irq() to get the
interrupt
dmaengine: mediatek-cqdma: Use platform_get_irq() to get the interrupt
drivers/dma/mediatek/mtk-cqdma.c | 12 ++++--------
drivers/dma/mediatek/mtk-hsdma.c | 11 ++++-------
drivers/dma/nbpfaxi.c | 13 ++++++-------
3 files changed, 14 insertions(+), 22 deletions(-)
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue
when using hierarchical interrupt domains using "interrupts" property
in the node as this bypasses the hierarchical setup and messes up the
irq chaining.
In preparation for removal of static setup of IRQ resource from DT core
code use platform_get_irq_optional().
There are no non-DT users for this driver so interrupt range
(irq_res->start-irq_res->end) is no longer required and with DT we will
be sure it will be a single IRQ resource for each index.
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
drivers/dma/nbpfaxi.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
From: Andy Shevchenko <hidden> Date: 2021-12-25 17:47:25
On Fri, Dec 24, 2021 at 3:14 PM Lad Prabhakar
[off-list ref] wrote:
platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue
when using hierarchical interrupt domains using "interrupts" property
in the node as this bypasses the hierarchical setup and messes up the
irq chaining.
In preparation for removal of static setup of IRQ resource from DT core
code use platform_get_irq_optional().
There are no non-DT users for this driver so interrupt range
(irq_res->start-irq_res->end) is no longer required and with DT we will
be sure it will be a single IRQ resource for each index.
for (i = 0; irqs < ARRAY_SIZE(irqbuf); i++) {
- irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, i);
- if (!irq_res)
+ irq = platform_get_irq_optional(pdev, i);
+ if (irq == -ENXIO)
break;
-
- for (irq = irq_res->start; irq <= irq_res->end;
- irq++, irqs++)
- irqbuf[irqs] = irq;
+ if (irq < 0)
+ return irq;
+ irqbuf[irqs++] = irq;
}
Same comment as per other patch(es), i.e. consider 0 as no IRQ.
--
With Best Regards,
Andy Shevchenko
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Hi Andy,
Thank you for the review.
On Sat, Dec 25, 2021 at 5:47 PM Andy Shevchenko
[off-list ref] wrote:
On Fri, Dec 24, 2021 at 3:14 PM Lad Prabhakar
[off-list ref] wrote:
quoted
platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue
when using hierarchical interrupt domains using "interrupts" property
in the node as this bypasses the hierarchical setup and messes up the
irq chaining.
In preparation for removal of static setup of IRQ resource from DT core
code use platform_get_irq_optional().
There are no non-DT users for this driver so interrupt range
(irq_res->start-irq_res->end) is no longer required and with DT we will
be sure it will be a single IRQ resource for each index.
quoted
for (i = 0; irqs < ARRAY_SIZE(irqbuf); i++) {
- irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, i);
- if (!irq_res)
+ irq = platform_get_irq_optional(pdev, i);
+ if (irq == -ENXIO)
break;
-
- for (irq = irq_res->start; irq <= irq_res->end;
- irq++, irqs++)
- irqbuf[irqs] = irq;
+ if (irq < 0)
+ return irq;
+ irqbuf[irqs++] = irq;
}
Same comment as per other patch(es), i.e. consider 0 as no IRQ.
platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue
when using hierarchical interrupt domains using "interrupts" property
in the node as this bypasses the hierarchical setup and messes up the
irq chaining.
In preparation for removal of static setup of IRQ resource from DT core
code use platform_get_irq().
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
drivers/dma/mediatek/mtk-hsdma.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue
when using hierarchical interrupt domains using "interrupts" property
in the node as this bypasses the hierarchical setup and messes up the
irq chaining.
In preparation for removal of static setup of IRQ resource from DT core
code use platform_get_irq().
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
drivers/dma/mediatek/mtk-cqdma.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)