diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2020-06-26 10:22:24 +0300 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2020-12-12 19:48:49 +0000 |
commit | cd8d0e6ce628e112840c870e6934afc0c387b314 (patch) | |
tree | deb20d56ba6c3935e0a7545436fc70793a3f2d45 /src/soc/amd/picasso | |
parent | 6a8c96f16991b135e94943727c9dd301a6ab613f (diff) |
soc/amd/common: Refactor ACPIMMIO posted writes
Change-Id: Ic1a5c17c789dd79fea8f348d1a9d32d4301ced88
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/42825
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/amd/picasso')
-rw-r--r-- | src/soc/amd/picasso/i2c.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/soc/amd/picasso/i2c.c b/src/soc/amd/picasso/i2c.c index 1eb0720dc9..af4c41f8a6 100644 --- a/src/soc/amd/picasso/i2c.c +++ b/src/soc/amd/picasso/i2c.c @@ -169,9 +169,11 @@ static void save_i2c_pin_registers(uint8_t gpio, static void restore_i2c_pin_registers(uint8_t gpio, struct soc_amd_i2c_save *save_table) { + /* Write and flush posted writes. */ iomux_write8(gpio, save_table->mux_value); iomux_read8(gpio); - gpio_write32_rb(gpio, save_table->control_value); + gpio_write32(gpio, save_table->control_value); + gpio_read32(gpio); } /* Slaves to be reset are controlled by devicetree register i2c_scl_reset */ |