From f13b6ebc89706b8298f6eea3ce70d9f1f9e020f0 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Wed, 17 Jun 2020 20:09:51 +0200 Subject: [PATCH] soc/amd/picasso/i2c: use config_of_soc() Change-Id: I2ebe072a5c887b16d2a39f029069bc8674f8eaea Signed-off-by: Felix Held Reviewed-on: https://review.coreboot.org/c/coreboot/+/42478 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin Reviewed-by: Raul Rangel Reviewed-by: Angel Pons --- src/soc/amd/picasso/i2c.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/soc/amd/picasso/i2c.c b/src/soc/amd/picasso/i2c.c index fa59b994a2..6f34573aa9 100644 --- a/src/soc/amd/picasso/i2c.c +++ b/src/soc/amd/picasso/i2c.c @@ -177,13 +177,10 @@ static void restore_i2c_pin_registers(uint8_t gpio, void sb_reset_i2c_slaves(void) { const struct soc_amd_picasso_config *cfg; - const struct device *dev = pcidev_path_on_root(GNB_DEVFN); struct soc_amd_i2c_save save_table[saved_pins_count]; uint8_t i, j, control; - if (!dev || !dev->chip_info) - return; - cfg = dev->chip_info; + cfg = config_of_soc(); control = cfg->i2c_scl_reset & GPIO_I2C_MASK; if (control == 0) return;