Re: [RFC 02/10] property: add fwnode_get_match_data()

Clément Léger
2022-02-22T15:18:19Z

Le Tue, 22 Feb 2022 11:20:54 +0100,
Greg Kroah-Hartman <gregkh@linuxfoundation.org> a écrit :

> >
> > The problem that I see is not only duplication but also that the PCIe
> > card won't work out of the box and will need a specific SSDT overlays
> > each time it is used. According to your document about SSDT overlays,
> > there is no way to load this from the driver. This means that the user
> > will have to compile a platform specific .aml file to match its
> > platform configuration. If the user wants to change the PCIe port, than
> > I guess it will have to load another .aml file. I do not think a user
> > expect to do so when plugging a PCIe card.
> >
> > Moreover, the APCI documentation [1] says the following:
> >
> > "PCI devices, which are below the host bridge, generally do not need to
> > be described via ACPI. The OS can discover them via the standard PCI
> > enumeration mechanism, using config accesses to discover and identify
> > devices and read and size their BARs. However, ACPI may describe PCI
> > devices if it provides power management or hotplug functionality for
> > them or if the device has INTx interrupts connected by platform
> > interrupt controllers and a _PRT is needed to describe those
> > connections."
> >
> > The device I want to use (a PCIe switch) does not fall into these
> > categories so there should be no need to describe it using ACPI.
>
> There should not be any need to describe it in any way, the device
> should provide all of the needed information. PCIe devices do not need
> a DT entry, as that does not make sense.
>
> thanks,
>
> greg k-h

In my opinion, yes, there should be no need for an "external"
description. Loading any kind of description (either with ACPI or DT)
defeat the purpose of the PCI since the card won't be able to be
plug-and-play anymore on multiple platform.

The driver however should be self-contained and contain its own
"description" of the hardware, no matter the platform on which the card
is plugged. The PCIe card is independent of the platform, I do not
think describing it with a platform specific description language is
maintainable nor user acceptable for the user.

--
Clément Léger,
Embedded Linux and Kernel engineer at Bootlin