diff options
author | Aaron Durbin <adurbin@chromium.org> | 2018-01-25 17:52:59 -0700 |
---|---|---|
committer | Aaron Durbin <adurbin@chromium.org> | 2018-01-26 02:35:23 +0000 |
commit | 25794d2a65049e1427ef04c5944343d11b4b0054 (patch) | |
tree | ddac68b205e7155d61c4d88d4e7f648069e34584 /src/soc/amd | |
parent | 610e2e6faf3f7c1d106378a642976295ea1d5c4c (diff) | |
download | coreboot-25794d2a65049e1427ef04c5944343d11b4b0054.tar.xz |
soc/amd/stoneyridge: fix compilation error
The following two patches were independent, but they were
merged together. However, the first one changed the API
that the second was originally was written against. Fix build.
b94a2750 (i2c/designware: reduce API complication for bus config)
13101a7b (soc/amd/stoneyridge: Add I2C devicetree support)
BUG=b:72121803
Change-Id: I3678a8f414572dd2227c42ce5585daf6bc933df5
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/23445
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src/soc/amd')
-rw-r--r-- | src/soc/amd/stoneyridge/i2c.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/soc/amd/stoneyridge/i2c.c b/src/soc/amd/stoneyridge/i2c.c index d3e01090ff..d0d75a82d2 100644 --- a/src/soc/amd/stoneyridge/i2c.c +++ b/src/soc/amd/stoneyridge/i2c.c @@ -18,6 +18,7 @@ #include <console/console.h> #include <drivers/i2c/designware/dw_i2c.h> #include <soc/iomap.h> +#include <soc/pci_devs.h> #include "chip.h" #define I2C_BUS_ADDRESS(x) (I2C_BASE_ADDRESS + I2C_DEVICE_SIZE * (x)) @@ -41,10 +42,11 @@ uintptr_t dw_i2c_base_address(unsigned int bus) return bus < I2C_DEVICE_COUNT ? i2c_bus_address[bus] : 0; } -const struct dw_i2c_bus_config *dw_i2c_get_soc_cfg(unsigned int bus, - const struct device *dev) +const struct dw_i2c_bus_config *dw_i2c_get_soc_cfg(unsigned int bus) { const struct soc_amd_stoneyridge_config *config; + const struct device *dev = dev_find_slot(0, GNB_DEVFN); + if (!dev || !dev->chip_info) { printk(BIOS_ERR, "%s: Could not find SoC devicetree config!\n", __func__); |