drivers/pcie/generic: Add support for custom ACPI name
This commit adds code to allow the driver to use an ACPI device name that is set in the device tree. BUG=b:237682766 TEST=Boot changes on Skyrim device, dumped SSDT Signed-off-by: Robert Zieba <robertzieba@google.com> Change-Id: Ie40a335e35b8ac83658e67d7cfba0750dd4784ad Reviewed-on: https://review.coreboot.org/c/coreboot/+/65798 Reviewed-by: Raul Rangel <rrangel@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
5609f7a684
commit
23e94a4e23
2 changed files with 7 additions and 1 deletions
|
@ -6,6 +6,7 @@
|
|||
#include <types.h>
|
||||
|
||||
struct drivers_pcie_generic_config {
|
||||
const char *name;
|
||||
};
|
||||
|
||||
#endif /* _PCIE_GENERIC_H_ */
|
||||
|
|
|
@ -9,7 +9,12 @@
|
|||
|
||||
static const char *pcie_generic_acpi_name(const struct device *dev)
|
||||
{
|
||||
return "DEV0";
|
||||
struct drivers_pcie_generic_config *config = dev->chip_info;
|
||||
|
||||
if (!config || !config->name)
|
||||
return "DEV0";
|
||||
|
||||
return config->name;
|
||||
}
|
||||
|
||||
static void pcie_generic_fill_ssdt(const struct device *dev)
|
||||
|
|
Loading…
Reference in a new issue