[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zml6ARdI3ek6sVF1@finisterre.sirena.org.uk>
Date: Wed, 12 Jun 2024 11:35:45 +0100
From: Mark Brown <broonie@...nel.org>
To: Witold Sadowski <wsadowski@...vell.com>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-spi@...r.kernel.org" <linux-spi@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"robh@...nel.org" <robh@...nel.org>,
"krzysztof.kozlowski+dt@...aro.org" <krzysztof.kozlowski+dt@...aro.org>,
"conor+dt@...nel.org" <conor+dt@...nel.org>,
"pthombar@...ence.com" <pthombar@...ence.com>,
Piyush Malgujar <pmalgujar@...vell.com>
Subject: Re: [EXTERNAL] Re: [PATCH v8 3/4] spi: cadence: Allow to read basic
xSPI configuration from ACPI
On Tue, Jun 11, 2024 at 09:57:09PM +0000, Witold Sadowski wrote:
> > > These changes enable reading the configurations from ACPI tables as
> > > required for successful probing in an ACPI UEFI environment. In the
> > > case of an ACPI-disabled or DTS-based environment, it will continue to
> > > read configurations from DTS as before.
> > This doesn't describe what the ACPI tables are supposed to look like or
> > anything, it's hard to review this...
> There should be an example of ACPI table in commit message?
No sign of one in the patch that got sent, nor in the cover letter.
> > > +#ifdef CONFIG_ACPI
> > > +static bool cdns_xspi_supports_op(struct spi_mem *mem,
> > > + const struct spi_mem_op *op)
> > > +{
> > > + if (!acpi_dev_get_property(adev, "spi-tx-bus-width",
> > ACPI_TYPE_INTEGER,
> > > + &obj)) {
> > > + if (!acpi_dev_get_property(adev, "spi-rx-bus-width",
> > ACPI_TYPE_INTEGER,
> > > + &obj)) {
> > Why is this Cadence specific?
> So that part should do to generic spi? I think right now it is not
> Supported to read tx/rx bus width from acpi.
I think I meant to say Marvell there rather than Cadence.
> > > - cdns_xspi->iobase = devm_platform_ioremap_resource_byname(pdev,
> > "io");
> > > + cdns_xspi->iobase = devm_platform_ioremap_resource(pdev, 0);
> >
> > > - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "sdma");
> > > + res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
> >
> > > - cdns_xspi->auxbase = devm_platform_ioremap_resource_byname(pdev,
> > "aux");
> > > + cdns_xspi->auxbase = devm_platform_ioremap_resource(pdev, 2);
> > This causes us to ignore naming on resources, that's an ABI break for
> > other systems.
> In that case acpi tables are not able to find resource by name. Or at
> least I wasn't able to find a way to handle that in different way.
> Is there better solution for that part?
Try by name and then fall back on numbers?
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists