From: Kuldip Dwivedi <kuldip.dwivedi@puresoftware.com>
To: Ard Biesheuvel <ard.biesheuvel@arm.com>, Mark Brown <broonie@kernel.org>
Cc: Ashish Kumar <ashish.kumar@nxp.com>,
Yogesh Gaur <yogeshgaur.83@gmail.com>,
linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
Varun Sethi <V.Sethi@nxp.com>, Arokia Samy <arokia.samy@nxp.com>,
Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>,
Paul Yang <Paul.Yang@arm.com>
Subject: RE: [PATCH v2] spi: spi-nxp-fspi: Add ACPI support
Date: Fri, 11 Sep 2020 17:32:24 +0530 [thread overview]
Message-ID: <01f42ace75808be76c78a4a67b78ec06@mail.gmail.com> (raw)
In-Reply-To: <9a6ce5d0-2f39-eb55-c3a9-cae2a8093fbc@arm.com>
> -----Original Message-----
> From: Ard Biesheuvel <ard.biesheuvel@arm.com>
> Sent: Friday, September 11, 2020 4:46 PM
> To: Mark Brown <broonie@kernel.org>; kuldip dwivedi
> <kuldip.dwivedi@puresoftware.com>
> Cc: Ashish Kumar <ashish.kumar@nxp.com>; Yogesh Gaur
> <yogeshgaur.83@gmail.com>; linux-spi@vger.kernel.org; linux-
> kernel@vger.kernel.org; Varun Sethi <V.Sethi@nxp.com>; Arokia Samy
> <arokia.samy@nxp.com>; Samer El-Haj-Mahmoud <Samer.El-Haj-
> Mahmoud@arm.com>; Paul Yang <Paul.Yang@arm.com>
> Subject: Re: [PATCH v2] spi: spi-nxp-fspi: Add ACPI support
>
> On 9/11/20 1:00 PM, Mark Brown wrote:
> > On Fri, Sep 11, 2020 at 01:58:06PM +0530, kuldip dwivedi wrote:
> >
> >> /* find the resources - configuration register address space */
> >> res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
> >> "fspi_base");
> >> +#ifdef CONFIG_ACPI
> >> + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); #endif
> >
> > This is buggy, it is equivalent to just removing the name based lookup
> > since we'll do the name based lookup then unconditionally overwrite
> > the results with an index based lookup.
> >
>
> Also, note that CONFIG_ACPI kernels may still boot in DT mode.
In case of ACPI we need to use indexed based lookup.
For reference Please see , Line :23 and Line:24
https://source.codeaurora.org/external/qoriq/qoriq-components/edk2-platfor
ms/tree/Platform/NXP/LX2160aRdbPkg/AcpiTables/Dsdt/FSPI.asl?h=LX2160_UEFI_
ACPI_EAR3
Here I can think two possible approaches
1. Changes in DT to use indexed based lookup
2. We Can check for ACPI fw node to distinguish between DT and ACPI like
below..
if (is_acpi_node(f->dev->fwnode))
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
else
res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
"fspi_base");
Please share your thoughts
Thanks
next prev parent reply other threads:[~2020-09-11 12:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-11 8:28 [PATCH v2] spi: spi-nxp-fspi: Add ACPI support kuldip dwivedi
2020-09-11 11:00 ` Mark Brown
2020-09-11 11:16 ` Ard Biesheuvel
2020-09-11 12:02 ` Kuldip Dwivedi [this message]
2020-09-11 12:17 ` Mark Brown
2020-09-11 12:28 ` [EXT] " Ashish Kumar
2020-09-11 12:34 ` Mark Brown
2020-09-11 13:32 ` Ashish Kumar
2020-09-15 6:52 ` Kuldip Dwivedi
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=01f42ace75808be76c78a4a67b78ec06@mail.gmail.com \
--to=kuldip.dwivedi@puresoftware.com \
--cc=Paul.Yang@arm.com \
--cc=Samer.El-Haj-Mahmoud@arm.com \
--cc=V.Sethi@nxp.com \
--cc=ard.biesheuvel@arm.com \
--cc=arokia.samy@nxp.com \
--cc=ashish.kumar@nxp.com \
--cc=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=yogeshgaur.83@gmail.com \
/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).