aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/common/block/usb4/pcie.c
diff options
context:
space:
mode:
authorKapil Porwal <kapilporwal@google.com>2022-11-28 18:53:40 +0530
committerFelix Held <felix-coreboot@felixheld.de>2022-12-05 14:32:04 +0000
commit65bcb57eea2c1c0a482f2678185920e24513b303 (patch)
tree3a31c9ab5cca65a786b51ad35dd7b9326aa300e3 /src/soc/intel/common/block/usb4/pcie.c
parent9b592f70d68575a4bb982bf3885ec034fa58e518 (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/soc/intel/common/block/usb4/pcie.c')
-rw-r--r--src/soc/intel/common/block/usb4/pcie.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/soc/intel/common/block/usb4/pcie.c b/src/soc/intel/common/block/usb4/pcie.c
index 85292e228f..0139647949 100644
--- a/src/soc/intel/common/block/usb4/pcie.c
+++ b/src/soc/intel/common/block/usb4/pcie.c
@@ -9,15 +9,12 @@
#include "chip.h"
-#define PCI_HOTPLUG_IN_D3_UUID "6211E2C0-58A3-4AF3-90E1-927A4E0C55A4"
-#define PCI_EXTERNAL_PORT_UUID "EFCC06CC-73AC-4BC3-BFF0-76143807C389"
-
#if CONFIG(HAVE_ACPI_TABLES)
static void usb4_pcie_acpi_fill_ssdt(const struct device *dev)
{
const struct soc_intel_common_block_usb4_config *config;
const struct device *parent;
- struct acpi_dp *dsd, *pkg;
+ struct acpi_dp *dsd;
const char *usb4_path;
int port_id;
@@ -56,15 +53,11 @@ static void usb4_pcie_acpi_fill_ssdt(const struct device *dev)
acpi_dp_add_integer(dsd, "usb4-port-number", port_id);
/* Indicate that device supports hotplug in D3. */
- pkg = acpi_dp_new_table(PCI_HOTPLUG_IN_D3_UUID);
- acpi_dp_add_integer(pkg, "HotPlugSupportInD3", 1);
- acpi_dp_add_package(dsd, pkg);
+ acpi_device_add_hotplug_support_in_d3(dsd);
/* Indicate that port is external. */
- pkg = acpi_dp_new_table(PCI_EXTERNAL_PORT_UUID);
- acpi_dp_add_integer(pkg, "ExternalFacingPort", 1);
+ acpi_device_add_external_facing_port(dsd);
- acpi_dp_add_package(dsd, pkg);
acpi_dp_write(dsd);
acpigen_pop_len(); /* Scope */