summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKapil Porwal <kapilporwal@google.com>2022-11-26 20:10:47 +0530
committerSubrata Banik <subratabanik@google.com>2022-11-29 19:48:59 +0000
commit0b20a174db2cdb11ca9e6f193d645d5dd0bd5c3b (patch)
treef3a445e99977b8feb854f4e20b6eb39e53100a1f
parentddc52a6481f2529c6f7a676f20f9f35853aac48b (diff)
drivers/{wifi,wwan}: Use helper function to add DmaProperty in _DSD
BUG=b:259716145 TEST=Build google/rex Signed-off-by: Kapil Porwal <kapilporwal@google.com> Change-Id: I991bc822fbb72cfaa9485abe882950fc7bcef498 Reviewed-on: https://review.coreboot.org/c/coreboot/+/70023 Reviewed-by: Subrata Banik <subratabanik@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-rw-r--r--src/drivers/wifi/generic/acpi.c14
-rw-r--r--src/drivers/wwan/fm/acpi_fm350gl.c13
2 files changed, 4 insertions, 23 deletions
diff --git a/src/drivers/wifi/generic/acpi.c b/src/drivers/wifi/generic/acpi.c
index 57b7f5f74e..3996739d62 100644
--- a/src/drivers/wifi/generic/acpi.c
+++ b/src/drivers/wifi/generic/acpi.c
@@ -30,9 +30,6 @@
/* Unique ID for the WIFI _DSM */
#define ACPI_DSM_OEM_WIFI_UUID "F21202BF-8F78-4DC6-A5B3-1F738E285ADE"
-/* ID for the Wifi DmaProperty _DSD */
-#define ACPI_DSD_DMA_PROPERTY_UUID "70D24161-6DD5-4C9E-8070-705531292865"
-
/* Unique ID for CnviDdrRfim entry in WIFI _DSM */
#define ACPI_DSM_RFIM_WIFI_UUID "7266172C-220B-4B29-814F-75E4DD26B5FD"
@@ -522,15 +519,8 @@ static void wifi_ssdt_write_properties(const struct device *dev, const char *sco
acpigen_write_PRW(config->wake, ACPI_S3);
/* Add _DSD for DmaProperty property. */
- if (config->add_acpi_dma_property) {
- struct acpi_dp *dsd, *pkg;
-
- dsd = acpi_dp_new_table("_DSD");
- pkg = acpi_dp_new_table(ACPI_DSD_DMA_PROPERTY_UUID);
- acpi_dp_add_integer(pkg, "DmaProperty", 1);
- acpi_dp_add_package(dsd, pkg);
- acpi_dp_write(dsd);
- }
+ if (config->add_acpi_dma_property)
+ acpi_device_add_dma_property(NULL);
}
/* Fill regulatory domain structure */
diff --git a/src/drivers/wwan/fm/acpi_fm350gl.c b/src/drivers/wwan/fm/acpi_fm350gl.c
index 7ff8b2b465..6e3688842e 100644
--- a/src/drivers/wwan/fm/acpi_fm350gl.c
+++ b/src/drivers/wwan/fm/acpi_fm350gl.c
@@ -5,9 +5,6 @@
#include "chip.h"
#include "soc/intel/common/block/pcie/rtd3/chip.h"
-/* ID for the DmaProperty in _DSD */
-#define ACPI_DSD_DMA_PROPERTY_UUID "70D24161-6DD5-4C9E-8070-705531292865"
-
/* FCPO# to RESET# delay time during WWAN ON */
#define FM350GL_TN2B 20
/* RESET# to PERST# delay time during WWAN ON */
@@ -245,14 +242,8 @@ static void wwan_fm350gl_acpi_fill_ssdt(const struct device *dev)
wwan_fm350gl_acpi_method_rst(parent, config);
wwan_fm350gl_acpi_method_dpts(parent, config);
- if (config->add_acpi_dma_property) {
- struct acpi_dp *dsd, *pkg;
- dsd = acpi_dp_new_table("_DSD");
- pkg = acpi_dp_new_table(ACPI_DSD_DMA_PROPERTY_UUID);
- acpi_dp_add_integer(pkg, "DmaProperty", 1);
- acpi_dp_add_package(dsd, pkg);
- acpi_dp_write(dsd);
- }
+ if (config->add_acpi_dma_property)
+ acpi_device_add_dma_property(NULL);
/* NOTE: the 5G driver will call MRST._RST to trigger a cold reset
* during firmware update.