Skip to content

Commit

Permalink
i2c: designware: prevent early stop on TX FIFO empty
Browse files Browse the repository at this point in the history
If the Designware core is configured with IC_EMPTYFIFO_HOLD_MASTER_EN
set to zero, allowing the TX FIFO to become empty causes a STOP
condition to be generated on the I2C bus. If the transmit FIFO
threshold is set too high, an erroneous STOP condition can be
generated on long transfers - particularly where the interrupt
latency is extended.

Signed-off-by: Andrew Jackson <[email protected]>
Signed-off-by: Liviu Dudau <[email protected]>
Tested-by: Mika Westerberg <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
  • Loading branch information
Andrew Jackson authored and Wolfram Sang committed Nov 21, 2014
1 parent 27caca9 commit d39f77b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/i2c/busses/i2c-designware-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ int i2c_dw_init(struct dw_i2c_dev *dev)
}

/* Configure Tx/Rx FIFO threshold levels */
dw_writel(dev, dev->tx_fifo_depth - 1, DW_IC_TX_TL);
dw_writel(dev, dev->tx_fifo_depth / 2, DW_IC_TX_TL);
dw_writel(dev, 0, DW_IC_RX_TL);

/* configure the i2c master */
Expand Down

0 comments on commit d39f77b

Please sign in to comment.