Re: [EXTERNAL] Re: [PATCH v8 3/4] spi: cadence: Allow to read basic xSPI configuration from ACPI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux