From 78816983389392a1fcae462fd82f717a3914009c Mon Sep 17 00:00:00 2001 From: Felix Held Date: Sat, 4 Nov 2023 05:07:49 +0100 Subject: soc/amd/common/block/i2c: add pre-processor guards for ACPI Signed-off-by: Felix Held Change-Id: I8dc93b12b81abee41f6f225f41d1f9953d1d93e1 Reviewed-on: https://review.coreboot.org/c/coreboot/+/78898 Tested-by: build bot (Jenkins) Reviewed-by: Eric Lai --- src/soc/amd/common/block/i2c/i2c.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/soc') diff --git a/src/soc/amd/common/block/i2c/i2c.c b/src/soc/amd/common/block/i2c/i2c.c index 57819fbe8f..3c3e9d393a 100644 --- a/src/soc/amd/common/block/i2c/i2c.c +++ b/src/soc/amd/common/block/i2c/i2c.c @@ -44,6 +44,7 @@ const struct dw_i2c_bus_config *dw_i2c_get_soc_cfg(unsigned int bus) return &cfg[bus]; } +#if CONFIG(HAVE_ACPI_TABLES) static const char *i2c_acpi_name(const struct device *dev) { size_t i; @@ -71,6 +72,7 @@ static void i2c_acpi_fill_ssdt(const struct device *dev) acpigen_write_store_int_to_namestr(acpi_device_status(dev), "STAT"); acpigen_pop_len(); /* Scope */ } +#endif int dw_i2c_soc_dev_to_bus(const struct device *dev) { @@ -138,8 +140,10 @@ struct device_operations soc_amd_i2c_mmio_ops = { .read_resources = i2c_read_resources, .set_resources = noop_set_resources, .scan_bus = scan_smbus, +#if CONFIG(HAVE_ACPI_TABLES) .acpi_name = i2c_acpi_name, .acpi_fill_ssdt = i2c_acpi_fill_ssdt, +#endif .ops_i2c_bus = &dw_i2c_bus_ops, }; -- cgit v1.2.3