diff options
Diffstat (limited to 'src/drivers/pcie/generic/generic.c')
-rw-r--r-- | src/drivers/pcie/generic/generic.c | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/src/drivers/pcie/generic/generic.c b/src/drivers/pcie/generic/generic.c index 0a9a243518..a8dd1d9745 100644 --- a/src/drivers/pcie/generic/generic.c +++ b/src/drivers/pcie/generic/generic.c @@ -9,17 +9,12 @@ static const char *pcie_generic_acpi_name(const struct device *dev) { - struct drivers_pcie_generic_config *config = dev->chip_info; - - if (config->companion_dev) - return acpi_device_name(config->companion_dev); return "DEV0"; } static void pcie_generic_fill_ssdt(const struct device *dev) { struct drivers_pcie_generic_config *config; - struct acpi_dp *dsd; if (!is_dev_enabled(dev)) return; @@ -27,28 +22,20 @@ static void pcie_generic_fill_ssdt(const struct device *dev) pci_rom_ssdt(dev); config = dev->chip_info; - if (!config || !config->is_untrusted || !dev->bus || !dev->bus->dev) + if (!config || !dev->bus || !dev->bus->dev) return; const char *scope; const char *name; - /* Code will be generated under companion device instead if present. */ - if (config->companion_dev) - scope = acpi_device_path(config->companion_dev); - else - scope = acpi_device_path(dev->bus->dev); + scope = acpi_device_path(dev->bus->dev); name = acpi_device_name(dev); + acpigen_write_scope(scope); - if (!config->companion_dev) { - acpigen_write_device(name); - acpigen_write_ADR_pci_device(dev); - } - dsd = acpi_dp_new_table("_DSD"); - acpi_dp_add_integer(dsd, "DmaProperty", 1); - acpi_dp_write(dsd); - if (!config->companion_dev) - acpigen_write_device_end(); + acpigen_write_device(name); + acpigen_write_ADR_pci_device(dev); + + acpigen_write_device_end(); acpigen_write_scope_end(); printk(BIOS_INFO, "%s.%s: Enable ACPI properties for %s (%s)\n", scope, name, |