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:
parent
65d78e880a
commit
1f27357829
|
@ -379,7 +379,11 @@ int dw_i2c_transfer(unsigned int bus,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set target slave address */
|
/* Set target slave address */
|
||||||
|
if (read32(®s->target_addr) != segments->slave) {
|
||||||
|
dw_i2c_disable(regs);
|
||||||
write32(®s->target_addr, segments->slave);
|
write32(®s->target_addr, segments->slave);
|
||||||
|
dw_i2c_enable(regs);
|
||||||
|
}
|
||||||
|
|
||||||
/* Read or write each byte in segment */
|
/* Read or write each byte in segment */
|
||||||
for (byte = 0; byte < segments->len; byte++) {
|
for (byte = 0; byte < segments->len; byte++) {
|
||||||
|
|
Loading…
Reference in New Issue