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 5609f7a684
("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>
This commit is contained in:
parent
3b56cffa8a
commit
5d71a5aabb
|
@ -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_ */
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue