soc/amd/picasso/i2c: use config_of_soc()

Change-Id: I2ebe072a5c887b16d2a39f029069bc8674f8eaea
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/42478
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
Felix Held 2020-06-17 20:09:51 +02:00 committed by Felix Held
parent 71800909f3
commit f13b6ebc89
1 changed files with 1 additions and 4 deletions

View File

@ -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;