From: Sergey Shtylyov <s.shtylyov@omp.ru>
To: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>,
Damien Le Moal <damien.lemoal@opensource.wdc.com>,
<linux-ide@vger.kernel.org>
Cc: Rob Herring <robh+dt@kernel.org>, <linux-kernel@vger.kernel.org>,
Prabhakar <prabhakar.csengg@gmail.com>
Subject: Re: [PATCH] ata: pata_of_platform: Use of_irq_to_resource() to populate IRQ resource
Date: Fri, 17 Dec 2021 12:32:59 +0300 [thread overview]
Message-ID: <ca168723-f113-8620-056d-ab2ee801d8fe@omp.ru> (raw)
In-Reply-To: <20211217001238.16298-1-prabhakar.mahadev-lad.rj@bp.renesas.com>
Hello!
On 17.12.2021 3:12, 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 bypassed the hierarchical setup and messed up the
> irq chaining.
>
> In preparation for removal of static setup of IRQ resource from DT core
> code use of_irq_to_resource().
>
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> ---
> Hi,
>
> 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
> ---
> drivers/ata/pata_of_platform.c | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/ata/pata_of_platform.c b/drivers/ata/pata_of_platform.c
> index 35aa158fc976..557f349eb533 100644
> --- a/drivers/ata/pata_of_platform.c
> +++ b/drivers/ata/pata_of_platform.c
[...]
> @@ -45,7 +47,9 @@ static int pata_of_platform_probe(struct platform_device *ofdev)
> return -EINVAL;
> }
>
> - irq_res = platform_get_resource(ofdev, IORESOURCE_IRQ, 0);
> + irq = of_irq_to_resource(dn, 0, &irq_res);
Why not use platform_get_irq_optional()?
> + if (irq <= 0 && irq != -ENXIO)
> + return irq ? irq : -ENXIO;
>
> of_property_read_u32(dn, "reg-shift", ®_shift);
>
[...]
MBR, Sergey
next prev parent reply other threads:[~2021-12-17 9:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-17 0:12 Lad Prabhakar
2021-12-17 0:23 ` Damien Le Moal
2021-12-17 1:16 ` Lad, Prabhakar
2021-12-17 0:39 ` Rob Herring
2021-12-17 0:44 ` Lad, Prabhakar
2021-12-17 9:32 ` Sergey Shtylyov [this message]
2021-12-17 14:14 ` 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=ca168723-f113-8620-056d-ab2ee801d8fe@omp.ru \
--to=s.shtylyov@omp.ru \
--cc=damien.lemoal@opensource.wdc.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=prabhakar.csengg@gmail.com \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
--cc=robh+dt@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
all inboxes | Powered by JetHome®