RE: [EXTERNAL] Re: [PATCH v3 4/5] spi: cadence: Allow to read basic xSPI configuration from ACPI

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

 



> On 18/04/2024 03:13, Witold Sadowski wrote:
> > From: Piyush Malgujar <pmalgujar@xxxxxxxxxxx>
> >
> > These changes enables to read the configs from ACPI tables as required
> > for successful probing in ACPI uefi environment.
> > In case of ACPI disabled/dts based environment, it will continue to
> > read configs from dts as before
> >
> 
> ...
> 
> >  	}
> > @@ -924,6 +989,21 @@ static int cdns_xspi_probe(struct platform_device
> *pdev)
> >  	return 0;
> >  }
> >
> > +#ifdef CONFIG_ACPI
> > +static const struct acpi_device_id cdns_xspi_acpi_match[] = {
> > +	{
> > +		.id = "cdns,xspi-nor",
> > +		.driver_data = (kernel_ulong_t) &cdns_driver_data,
> > +	},
> > +	{
> > +		.id = "mrvl,xspi-nor",
> > +		.driver_data = (kernel_ulong_t) &mrvl_driver_data,
> 
> UEFI provides compatibles for ACPI? I think that's first such format in
> the kernel.

Yes, that code is not doing what was expected.
Current usage scenario in ACPI mode is:
xSPI block with HID PRP0001, and additional compatible package set to
correct compatible string
With that approach only issue(in ACPI mode) is with matching device
with data field from of_device_id. It looks like there are functions
to match that when DTB is used, but in ACPI mode it fails.
I believe solution is to traverse dev->driver->of_match_table manually
To match device name with correct compatible data structure.
That will be included in next patchset.

> 
> Best regards,
> Krzysztof

Regards
Witek





[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux