linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
To: Vinod Koul <vkoul@kernel.org>
Cc: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	 Sean Wang <sean.wang@mediatek.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	 Rob Herring <robh+dt@kernel.org>,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	 dmaengine <dmaengine@vger.kernel.org>,
	LAK <linux-arm-kernel@lists.infradead.org>,
	 "moderated list:ARM/Mediatek SoC support"
	<linux-mediatek@lists.infradead.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 2/3] dmaengine: mediatek: mtk-hsdma: Use platform_get_irq() to get the interrupt
Date: Thu, 6 Jan 2022 08:44:25 +0000	[thread overview]
Message-ID: <CA+V-a8sO0AioGJh23jdFWoN_Qx9rm_3skYcCeyrWZVAuRtuOSw@mail.gmail.com> (raw)
In-Reply-To: <YdZ9rDvYtdu8L8Vb@matsya>

Hi Vinod,

Thank you for the review.

On Thu, Jan 6, 2022 at 5:27 AM Vinod Koul <vkoul@kernel.org> wrote:
>
> On 04-01-22, 16:35, Lad Prabhakar 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().
> >
> > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > ---
> > v1->v2
> > * No change
> > ---
> >  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);
>
> why not platform_get_irq_optional() here and 3rd patch ?
>
For patches #2 and #3 the driver expects the IRQ to be present
strictly, that is the reason platform_get_irq_optional() isn't used so
that the behavior of the driver is unchanged with this patch.

Cheers,
Prabhakar

> > +     if (err < 0)
> > +             return err;
> > +     hsdma->irq = err;
> >
> >       refcount_set(&hsdma->pc_refcnt, 0);
> >       spin_lock_init(&hsdma->lock);
> > --
> > 2.17.1
>
> --
> ~Vinod

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-01-06  8:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-04 16:35 [PATCH v2 0/3] dmaengine: Use platform_get_irq*() variants to fetch IRQ's Lad Prabhakar
2022-01-04 16:35 ` [PATCH v2 2/3] dmaengine: mediatek: mtk-hsdma: Use platform_get_irq() to get the interrupt Lad Prabhakar
2022-01-06  5:27   ` Vinod Koul
2022-01-06  8:44     ` Lad, Prabhakar [this message]
2022-01-04 16:35 ` [PATCH v2 3/3] dmaengine: mediatek-cqdma: " Lad Prabhakar
2022-01-05  9:56 ` [PATCH v2 0/3] dmaengine: Use platform_get_irq*() variants to fetch IRQ's Andy Shevchenko
2022-03-09 11:37 ` Lad, Prabhakar
2022-03-11 10:36   ` Vinod Koul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+V-a8sO0AioGJh23jdFWoN_Qx9rm_3skYcCeyrWZVAuRtuOSw@mail.gmail.com \
    --to=prabhakar.csengg@gmail.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=robh+dt@kernel.org \
    --cc=sean.wang@mediatek.com \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).