2022-04-05 02:09:36

by Prabhakar Mahadev Lad

[permalink] [raw]
Subject: [PATCH v3 0/3] dmaengine: Use platform_get_irq*() variants to fetch IRQ's

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


2022-04-05 02:23:01

by Prabhakar Mahadev Lad

[permalink] [raw]
Subject: [PATCH v3 2/3] dmaengine: mediatek: mtk-hsdma: Use platform_get_irq() to get the interrupt

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

2022-04-07 08:23:05

by Prabhakar

[permalink] [raw]
Subject: Re: [PATCH v3 0/3] dmaengine: Use platform_get_irq*() variants to fetch IRQ's

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
>

2022-04-08 21:00:55

by Vinod Koul

[permalink] [raw]
Subject: Re: [PATCH v3 0/3] dmaengine: Use platform_get_irq*() variants to fetch IRQ's

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

2022-04-11 16:32:03

by Prabhakar

[permalink] [raw]
Subject: Re: [PATCH v3 0/3] dmaengine: Use platform_get_irq*() variants to fetch IRQ's

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

2022-04-12 22:44:15

by Vinod Koul

[permalink] [raw]
Subject: Re: [PATCH v3 0/3] dmaengine: Use platform_get_irq*() variants to fetch IRQ's

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