Skip to content

Commit c2e55b4

Browse files
saipavaAndi Shyti
authored andcommitted
i2c: cadence: Avoid fifo clear after start
The Driver unintentionally programs ctrl reg to clear the fifo, which happens after the start of transaction. Previously, this was not an issue as it involved read-modified-write. However, this issue breaks i2c reads on QEMU, as i2c-read is executed before guest starts programming control register. Fixes: ff0cf7b ("i2c: cadence: Remove unnecessary register reads") Signed-off-by: Sai Pavan Boddu <[email protected]> Acked-by: Michal Simek <[email protected]> Signed-off-by: Andi Shyti <[email protected]>
1 parent dd5a440 commit c2e55b4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/i2c/busses/i2c-cadence.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -633,6 +633,7 @@ static void cdns_i2c_mrecv(struct cdns_i2c *id)
633633

634634
if (hold_clear) {
635635
ctrl_reg &= ~CDNS_I2C_CR_HOLD;
636+
ctrl_reg &= ~CDNS_I2C_CR_CLR_FIFO;
636637
/*
637638
* In case of Xilinx Zynq SOC, clear the HOLD bit before transfer size
638639
* register reaches '0'. This is an IP bug which causes transfer size

0 commit comments

Comments
 (0)