From 0292703b967f690f1770521804d0a5992941a37e Mon Sep 17 00:00:00 2001 From: Tim Wawrzynczak Date: Mon, 28 Feb 2022 08:57:09 -0700 Subject: drivers/wwan/fm: Include option to add ACPI _DSD for DmaProperty Similar to commit 09c047c, the WWAN device might be considered an untrusted device by some platforms, therefore add an option to add the same `DmaProperty` to the WWAN _DSD. BUG=b:215424986 BRANCH=brya TEST=dump SSDT, see new property Signed-off-by: Tim Wawrzynczak Change-Id: If485ac5314fae6e6faefac43fcfcea4f4cdd02c0 Reviewed-on: https://review.coreboot.org/c/coreboot/+/62436 Tested-by: build bot (Jenkins) Reviewed-by: EricR Lai --- src/drivers/wwan/fm/acpi_fm350gl.c | 9 +++++++++ src/drivers/wwan/fm/chip.h | 3 +++ 2 files changed, 12 insertions(+) (limited to 'src/drivers/wwan/fm') diff --git a/src/drivers/wwan/fm/acpi_fm350gl.c b/src/drivers/wwan/fm/acpi_fm350gl.c index 80370ad4ab..dbc4f2429d 100644 --- a/src/drivers/wwan/fm/acpi_fm350gl.c +++ b/src/drivers/wwan/fm/acpi_fm350gl.c @@ -241,6 +241,14 @@ static void wwan_fm350gl_acpi_fill_ssdt(const struct device *dev) wwan_fm350gl_acpi_method_shrf(parent, config); wwan_fm350gl_acpi_method_rst(parent, config); wwan_fm350gl_acpi_method_dpts(parent, config); + + if (config->add_acpi_dma_property) { + struct acpi_dp *dsd; + dsd = acpi_dp_new_table("_DSD"); + acpi_dp_add_integer(dsd, "DmaProperty", 1); + acpi_dp_write(dsd); + } + /* NOTE: the 5G driver will call MRST._RST to trigger a cold reset * during firmware update. */ @@ -249,6 +257,7 @@ static void wwan_fm350gl_acpi_fill_ssdt(const struct device *dev) acpigen_write_ADR(0); wwan_fm350gl_acpi_method_mrst_rst(parent, config); } + acpigen_write_device_end(); /* Device */ } acpigen_write_device_end(); /* Device */ diff --git a/src/drivers/wwan/fm/chip.h b/src/drivers/wwan/fm/chip.h index 635178bd16..19bc4c9008 100644 --- a/src/drivers/wwan/fm/chip.h +++ b/src/drivers/wwan/fm/chip.h @@ -20,6 +20,9 @@ struct drivers_wwan_fm_config { /* Pointer to the corresponding RTD3 */ DEVTREE_CONST struct device *rtd3dev; + + /* Add `DmaProperty` in _DSD */ + bool add_acpi_dma_property; }; #endif /* __DRIVERS_WWAN_FM_CHIP_H__ */ -- cgit v1.2.3