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>
This commit is contained in:
parent
3f2467032e
commit
bdd5031ad2
|
@ -322,7 +322,9 @@ static struct device_operations lpc_ops = {
|
||||||
.read_resources = lpc_read_resources,
|
.read_resources = lpc_read_resources,
|
||||||
.set_resources = lpc_set_resources,
|
.set_resources = lpc_set_resources,
|
||||||
.enable_resources = lpc_enable_resources,
|
.enable_resources = lpc_enable_resources,
|
||||||
|
#if CONFIG(HAVE_ACPI_TABLES)
|
||||||
.write_acpi_tables = southbridge_write_acpi_tables,
|
.write_acpi_tables = southbridge_write_acpi_tables,
|
||||||
|
#endif
|
||||||
.init = lpc_init,
|
.init = lpc_init,
|
||||||
.scan_bus = scan_static_bus,
|
.scan_bus = scan_static_bus,
|
||||||
.ops_pci = &pci_dev_ops_pci,
|
.ops_pci = &pci_dev_ops_pci,
|
||||||
|
|
Loading…
Reference in New Issue