Attention is currently required from: Jason Glenesk, Raul Rangel, Marshall Dawson, Zheng Bao, Felix Held. Hello Zheng Bao,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/51566
to review the following change.
Change subject: [DEBUG]amd/common/i2c: Fix some issue ......................................................................
[DEBUG]amd/common/i2c: Fix some issue
This is for debugging. This should be squashed with 51404 in the stack.
Change-Id: I744530c3bb84dafc41d82a27174cd602889fc218 Signed-off-by: Zheng Bao fishbaozi@gmail.com --- M src/soc/amd/common/block/i2c/i2c.c 1 file changed, 6 insertions(+), 5 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/66/51566/1
diff --git a/src/soc/amd/common/block/i2c/i2c.c b/src/soc/amd/common/block/i2c/i2c.c index fbcf4e4..6c54374 100644 --- a/src/soc/amd/common/block/i2c/i2c.c +++ b/src/soc/amd/common/block/i2c/i2c.c @@ -168,9 +168,10 @@ */ for (i = 0; i < 9; i++) { for (j = 0; j < reset_info.num_pins; j++) { - if (control & reset_info.i2c_scl[i].pin_mask) - gpio_write32(reset_info.i2c_scl[i].pin.gpio, - GPIO_OUTPUT_ENABLE); + if (control & reset_info.i2c_scl[j].pin_mask) { + gpio_write32(reset_info.i2c_scl[j].pin.gpio, + GPIO_OUTPUT_OUT_HIGH); + } }
gpio_read32(0); /* Flush posted write */ @@ -181,8 +182,8 @@ udelay(4);
for (j = 0; j < reset_info.num_pins; j++) { - if (control & reset_info.i2c_scl[i].pin_mask) - gpio_write32(reset_info.i2c_scl[i].pin.gpio, 0); + if (control & reset_info.i2c_scl[j].pin_mask) + gpio_write32(reset_info.i2c_scl[j].pin.gpio, GPIO_OUTPUT_OUT_LOW); }
gpio_read32(0); /* Flush posted write */