linux-mediatek.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	 Sean Wang <sean.wang@mediatek.com>,
	Vinod Koul <vkoul@kernel.org>,
	 Matthias Brugger <matthias.bgg@gmail.com>,
	dmaengine <dmaengine@vger.kernel.org>,
	 linux-arm Mailing List <linux-arm-kernel@lists.infradead.org>,
	 "moderated list:ARM/Mediatek SoC support"
	<linux-mediatek@lists.infradead.org>,
	Rob Herring <robh+dt@kernel.org>,
	 Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	 Linux-Renesas <linux-renesas-soc@vger.kernel.org>
Subject: Re: [PATCH 1/3] dmaengine: nbpfaxi: Use platform_get_irq_optional() to get the interrupt
Date: Sat, 25 Dec 2021 23:50:46 +0000	[thread overview]
Message-ID: <CA+V-a8sXwS2FMjgNhLAGcsTT46kAjuh+N4BC78MUFvvptnjjtA@mail.gmail.com> (raw)
In-Reply-To: <CAHp75VfC-1Lt2JZ-e_ReySNQTOwOfBi6JLOjEHUMNEyYk5JVyg@mail.gmail.com>

Hi Andy,

Thank you for the review.

On Sat, Dec 25, 2021 at 5:47 PM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
>
> On Fri, Dec 24, 2021 at 3:14 PM Lad Prabhakar
> <prabhakar.mahadev-lad.rj@bp.renesas.com> 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.
>
Will do.

Cheers,
Prabhakar

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

  reply	other threads:[~2021-12-25 23:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-22 16:15 [PATCH 0/3] dmaengine: Use platform_get_irq*() variants to fetch IRQ's Lad Prabhakar
2021-12-22 16:15 ` [PATCH 1/3] dmaengine: nbpfaxi: Use platform_get_irq_optional() to get the interrupt Lad Prabhakar
2021-12-25 17:46   ` Andy Shevchenko
2021-12-25 23:50     ` Lad, Prabhakar [this message]
2021-12-22 16:15 ` [PATCH 2/3] dmaengine: mediatek: mtk-hsdma: Use platform_get_irq() " Lad Prabhakar
2021-12-22 16:15 ` [PATCH 3/3] dmaengine: mediatek-cqdma: " Lad Prabhakar

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-a8sXwS2FMjgNhLAGcsTT46kAjuh+N4BC78MUFvvptnjjtA@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=linux-renesas-soc@vger.kernel.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).