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>
diff --git a/src/soc/intel/common/block/usb4/pcie.c b/src/soc/intel/common/block/usb4/pcie.c
index 85292e2..0139647 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 @@
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 */