drivers/i2c/designware: Unset IC_ENABLE when setting target address

To set address on AMD, IC_ENABLE == 0.

BUG=b:69416132
BRANCH=none
TEST=Test communication with i2c TPM on grunt and coral

Change-Id: I7faee8e11439deceab946cc82d30d274b529b90d
Signed-off-by: Chris Ching <chingcodes@chromium.org>
Reviewed-on: https://review.coreboot.org/23293
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
This commit is contained in:
Chris Ching 2018-01-16 11:38:17 -08:00
parent 65d78e880a
commit 1f27357829
1 changed files with 5 additions and 1 deletions

View File

@ -379,7 +379,11 @@ int dw_i2c_transfer(unsigned int bus,
}
/* Set target slave address */
if (read32(&regs->target_addr) != segments->slave) {
dw_i2c_disable(regs);
write32(&regs->target_addr, segments->slave);
dw_i2c_enable(regs);
}
/* Read or write each byte in segment */
for (byte = 0; byte < segments->len; byte++) {