diff options
-rw-r--r-- | src/soc/amd/common/block/i2c/i2c.c | 11 | ||||
-rw-r--r-- | src/soc/amd/common/block/include/amdblocks/gpio_banks.h | 5 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/soc/amd/common/block/i2c/i2c.c b/src/soc/amd/common/block/i2c/i2c.c index ba89e9c589..f2773235a6 100644 --- a/src/soc/amd/common/block/i2c/i2c.c +++ b/src/soc/amd/common/block/i2c/i2c.c @@ -129,22 +129,17 @@ struct device_operations soc_amd_i2c_mmio_ops = { .acpi_fill_ssdt = dw_i2c_acpi_fill_ssdt, }; -struct common_i2c_save { - uint32_t control_value; - uint8_t mux_value; -}; - /* * To program I2C pins without destroying their programming, the registers * that will be changed need to be saved first. */ -static void save_i2c_pin_registers(uint8_t gpio, struct common_i2c_save *save_table) +static void save_i2c_pin_registers(uint8_t gpio, struct soc_amd_gpio_register_save *save_table) { save_table->mux_value = iomux_read8(gpio); save_table->control_value = gpio_read32(gpio); } -static void restore_i2c_pin_registers(uint8_t gpio, struct common_i2c_save *save_table) +static void restore_i2c_pin_registers(uint8_t gpio, struct soc_amd_gpio_register_save *save_table) { /* Write and flush posted writes. */ iomux_write8(gpio, save_table->mux_value); @@ -172,7 +167,7 @@ static void drive_scl(const struct soc_i2c_peripheral_reset_info *reset_info, ui void sb_reset_i2c_peripherals(const struct soc_i2c_peripheral_reset_info *reset_info) { - struct common_i2c_save save_table[MAX_PIN_COUNT]; + struct soc_amd_gpio_register_save save_table[MAX_PIN_COUNT]; size_t i; if (!reset_info || !reset_info->i2c_scl || !reset_info->num_pins || diff --git a/src/soc/amd/common/block/include/amdblocks/gpio_banks.h b/src/soc/amd/common/block/include/amdblocks/gpio_banks.h index d17aa7aea7..8f36b24313 100644 --- a/src/soc/amd/common/block/include/amdblocks/gpio_banks.h +++ b/src/soc/amd/common/block/include/amdblocks/gpio_banks.h @@ -15,6 +15,11 @@ struct soc_amd_gpio { uint32_t flags; }; +struct soc_amd_gpio_register_save { + uint32_t control_value; + uint8_t mux_value; +}; + struct soc_amd_event { gpio_t gpio; uint8_t event; |