summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Hasemeyer <markhas@google.com>2023-05-09 22:48:27 -0600
committerFelix Held <felix-coreboot@felixheld.de>2023-05-11 17:49:28 +0000
commit5d71a5aabb8a47a9f6d559391f16a93e5d5edd72 (patch)
tree9bb8731abe8d165df71c6d56fda1f2f49be3652b
parent3b56cffa8a5508db3e36c84ae5142e471d1d8046 (diff)
drivers/pcie/generic: Add DmaProperty to config
Adds the option to set the 'DmaProperty' in the device's _DSD. This can be done by setting "add_acpi_dma_property"="true". If not set (or set to false), the device descriptor generation behavior will remain unchanged. The naming convention for the config option was chosen to match that of other drivers. This partially reverts commit 5609f7a684c6 ("drivers/pcie/generic: Clean up driver") as the driver is now used on a couple mainboards which need the DmaProperty. Change-Id: I996fe4923948d13a20bf8b6b1a93dab0866d0fd4 Signed-off-by: Mark Hasemeyer <markhas@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/75094 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jan Samek <jan.samek@siemens.com> Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
-rw-r--r--src/drivers/pcie/generic/chip.h4
-rw-r--r--src/drivers/pcie/generic/generic.c2
2 files changed, 6 insertions, 0 deletions
diff --git a/src/drivers/pcie/generic/chip.h b/src/drivers/pcie/generic/chip.h
index 78285b9693..a5f261b842 100644
--- a/src/drivers/pcie/generic/chip.h
+++ b/src/drivers/pcie/generic/chip.h
@@ -9,6 +9,10 @@ struct drivers_pcie_generic_config {
const char *name;
unsigned int wake_gpe;
unsigned int wake_deepest;
+ /* When set to true, this will add a _DSD which contains a single
+ property, `DmaProperty`, set to 1, under the ACPI Device. */
+ bool add_acpi_dma_property;
+
};
#endif /* _PCIE_GENERIC_H_ */
diff --git a/src/drivers/pcie/generic/generic.c b/src/drivers/pcie/generic/generic.c
index 8b073405fd..1873e65895 100644
--- a/src/drivers/pcie/generic/generic.c
+++ b/src/drivers/pcie/generic/generic.c
@@ -42,6 +42,8 @@ static void pcie_generic_fill_ssdt(const struct device *dev)
if (config->wake_gpe)
acpigen_write_PRW(config->wake_gpe, config->wake_deepest);
+ if (config->add_acpi_dma_property)
+ acpi_device_add_dma_property(NULL);
acpigen_write_device_end();
acpigen_write_scope_end();