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/[email protected]/
Changes for v3:
* Included Ack from Andy.
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 | 14 ++++++--------
3 files changed, 14 insertions(+), 23 deletions(-)
--
2.17.1
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 <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
---
drivers/dma/mediatek/mtk-hsdma.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/drivers/dma/mediatek/mtk-hsdma.c b/drivers/dma/mediatek/mtk-hsdma.c
index 6ad8afbb95f2..c0fffde7fe08 100644
--- a/drivers/dma/mediatek/mtk-hsdma.c
+++ b/drivers/dma/mediatek/mtk-hsdma.c
@@ -923,13 +923,10 @@ static int mtk_hsdma_probe(struct platform_device *pdev)
return PTR_ERR(hsdma->clk);
}
- res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
- if (!res) {
- dev_err(&pdev->dev, "No irq resource for %s\n",
- dev_name(&pdev->dev));
- return -EINVAL;
- }
- hsdma->irq = res->start;
+ err = platform_get_irq(pdev, 0);
+ if (err < 0)
+ return err;
+ hsdma->irq = err;
refcount_set(&hsdma->pc_refcnt, 0);
spin_lock_init(&hsdma->lock);
--
2.17.1
Hi Vinod,
On Mon, Apr 4, 2022 at 4:56 PM Lad Prabhakar
<[email protected]> wrote:
>
> 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.
>
Fyi.. the OF core changes have landed into -next [0].
[0] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?h=next-20220406&id=a1a2b7125e1079cfcc13a116aa3af3df2f9e002b
Cheers,
Prabhakar
> Dropping usage of platform_get_resource() was agreed based on
> the discussion [0].
>
> [0] https://patchwork.kernel.org/project/linux-renesas-soc/
> patch/[email protected]/
>
> Changes for v3:
> * Included Ack from Andy.
>
> 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 | 14 ++++++--------
> 3 files changed, 14 insertions(+), 23 deletions(-)
>
> --
> 2.17.1
>
On 07-04-22, 03:52, Lad, Prabhakar wrote:
> Hi Vinod,
>
> On Mon, Apr 4, 2022 at 4:56 PM Lad Prabhakar
> <[email protected]> wrote:
> >
> > 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.
> >
> Fyi.. the OF core changes have landed into -next [0].
>
> [0] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?h=next-20220406&id=a1a2b7125e1079cfcc13a116aa3af3df2f9e002b
Is this series dependent on this?
--
~Vinod
Hi Vinod,
On Fri, Apr 8, 2022 at 6:46 PM Vinod Koul <[email protected]> wrote:
>
> On 07-04-22, 03:52, Lad, Prabhakar wrote:
> > Hi Vinod,
> >
> > On Mon, Apr 4, 2022 at 4:56 PM Lad Prabhakar
> > <[email protected]> wrote:
> > >
> > > 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.
> > >
> > Fyi.. the OF core changes have landed into -next [0].
> >
> > [0] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?h=next-20220406&id=a1a2b7125e1079cfcc13a116aa3af3df2f9e002b
>
> Is this series dependent on this?
>
Yes, if this series doesn't hit soon this will break the drivers.
Cheers,
Prabhakar
On 04-04-22, 16:55, Lad Prabhakar wrote:
> 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].
Applied, thanks
--
~Vinod