summaryrefslogtreecommitdiff
path: root/src/soc/amd/common/block/lpc
diff options
context:
space:
mode:
authorZheng Bao <fishbaozi@gmail.com>2021-01-26 18:27:46 +0800
committerFelix Held <felix-coreboot@felixheld.de>2021-01-27 15:24:58 +0000
commitbdd5031ad2bd70cff6de1f16237dc3f1507c7a64 (patch)
tree366a1fa6c279f23b7185e64bc8df716d73c6f6b5 /src/soc/amd/common/block/lpc
parent3f2467032e3e40cd456d2d9fe5120a60283784aa (diff)
soc/amd/common: Only set write_acpi_tables if ACPI table is enabled
In ./include/device/device.h, the struct device_operations is defined as below. ------------------------------------ #if CONFIG(HAVE_ACPI_TABLES) unsigned long (*write_acpi_tables)(const struct device *dev, unsigned long start, struct acpi_rsdp *rsdp); void (*acpi_fill_ssdt)(const struct device *dev); void (*acpi_inject_dsdt)(const struct device *dev); const char *(*acpi_name)(const struct device *dev); /* Returns the optional _HID (Hardware ID) */ const char *(*acpi_hid)(const struct device *dev); #endif ------------------------------------ So we also need to add the same #if in the C source. Change-Id: I488eceacb260ebe091495cdc3448c931cc4a1ae3 Signed-off-by: Zheng Bao <fishbaozi@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/49928 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Diffstat (limited to 'src/soc/amd/common/block/lpc')
-rw-r--r--src/soc/amd/common/block/lpc/lpc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/soc/amd/common/block/lpc/lpc.c b/src/soc/amd/common/block/lpc/lpc.c
index 8a7dc34c6c..0be5b740eb 100644
--- a/src/soc/amd/common/block/lpc/lpc.c
+++ b/src/soc/amd/common/block/lpc/lpc.c
@@ -322,7 +322,9 @@ static struct device_operations lpc_ops = {
.read_resources = lpc_read_resources,
.set_resources = lpc_set_resources,
.enable_resources = lpc_enable_resources,
+#if CONFIG(HAVE_ACPI_TABLES)
.write_acpi_tables = southbridge_write_acpi_tables,
+#endif
.init = lpc_init,
.scan_bus = scan_static_bus,
.ops_pci = &pci_dev_ops_pci,