diff options
author | Kapil Porwal <kapilporwal@google.com> | 2022-11-28 18:53:40 +0530 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-12-05 14:32:04 +0000 |
commit | 65bcb57eea2c1c0a482f2678185920e24513b303 (patch) | |
tree | 3a31c9ab5cca65a786b51ad35dd7b9326aa300e3 /src/drivers/pcie | |
parent | 9b592f70d68575a4bb982bf3885ec034fa58e518 (diff) |
soc/intel/cmn/block/{pcie/rtd3,usb4}: Use helper functions for _DSD
BUG=b:259716145
TEST=Verified SSDT on google/rex.
Signed-off-by: Kapil Porwal <kapilporwal@google.com>
Change-Id: Ib57dea9b16e4590ca2d75ac1512fdaf773ec50f6
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70065
Reviewed-by: Tarun Tuli <taruntuli@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/drivers/pcie')
-rw-r--r-- | src/drivers/pcie/rtd3/device/chip.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/src/drivers/pcie/rtd3/device/chip.c b/src/drivers/pcie/rtd3/device/chip.c index 349dffd037..88b85f15a0 100644 --- a/src/drivers/pcie/rtd3/device/chip.c +++ b/src/drivers/pcie/rtd3/device/chip.c @@ -12,15 +12,6 @@ #include "chip.h" /* - * This UUID and the resulting ACPI Device Property is defined by the - * Power Management for Storage Hardware Devices: - * - * https://docs.microsoft.com/en-us/windows-hardware/design/component-guidelines/power-management-for-storage-hardware-devices-intro - */ -#define PCIE_RTD3_STORAGE_UUID "5025030F-842F-4AB4-A561-99A5189762D0" -#define PCIE_RTD3_STORAGE_PROPERTY "StorageD3Enable" - -/* * Writes the ACPI power resources for a PCI device so it can enter D3Cold. * * If the device is a storage class, then the StorageD3Enable _DSD will @@ -81,7 +72,6 @@ */ static void pcie_rtd3_device_acpi_fill_ssdt(const struct device *dev) { - struct acpi_dp *dsd, *pkg; const struct drivers_pcie_rtd3_device_config *config = config_of(dev); /* Copy the GPIOs to avoid discards 'const' qualifier error */ struct acpi_gpio reset_gpio = config->reset_gpio; @@ -114,11 +104,7 @@ static void pcie_rtd3_device_acpi_fill_ssdt(const struct device *dev) /* Storage devices won't enter D3 without this property */ if ((dev->class >> 16) == PCI_BASE_CLASS_STORAGE) { - dsd = acpi_dp_new_table("_DSD"); - pkg = acpi_dp_new_table(PCIE_RTD3_STORAGE_UUID); - acpi_dp_add_integer(pkg, PCIE_RTD3_STORAGE_PROPERTY, 1); - acpi_dp_add_package(dsd, pkg); - acpi_dp_write(dsd); + acpi_device_add_storage_d3_enable(NULL); printk(BIOS_INFO, "%s.%s: Added StorageD3Enable property\n", scope, name); } |