|
@@ -382,8 +382,10 @@ static void cdns_i2c_mrecv(struct cdns_i2c *id)
|
|
|
* Check for the message size against FIFO depth and set the
|
|
* Check for the message size against FIFO depth and set the
|
|
|
* 'hold bus' bit if it is greater than FIFO depth.
|
|
* 'hold bus' bit if it is greater than FIFO depth.
|
|
|
*/
|
|
*/
|
|
|
- if (id->recv_count > CDNS_I2C_FIFO_DEPTH)
|
|
|
|
|
|
|
+ if ((id->recv_count > CDNS_I2C_FIFO_DEPTH) || id->bus_hold_flag)
|
|
|
ctrl_reg |= CDNS_I2C_CR_HOLD;
|
|
ctrl_reg |= CDNS_I2C_CR_HOLD;
|
|
|
|
|
+ else
|
|
|
|
|
+ ctrl_reg = ctrl_reg & ~CDNS_I2C_CR_HOLD;
|
|
|
|
|
|
|
|
cdns_i2c_writereg(ctrl_reg, CDNS_I2C_CR_OFFSET);
|
|
cdns_i2c_writereg(ctrl_reg, CDNS_I2C_CR_OFFSET);
|
|
|
|
|
|
|
@@ -440,8 +442,11 @@ static void cdns_i2c_msend(struct cdns_i2c *id)
|
|
|
* Check for the message size against FIFO depth and set the
|
|
* Check for the message size against FIFO depth and set the
|
|
|
* 'hold bus' bit if it is greater than FIFO depth.
|
|
* 'hold bus' bit if it is greater than FIFO depth.
|
|
|
*/
|
|
*/
|
|
|
- if (id->send_count > CDNS_I2C_FIFO_DEPTH)
|
|
|
|
|
|
|
+ if ((id->send_count > CDNS_I2C_FIFO_DEPTH) || id->bus_hold_flag)
|
|
|
ctrl_reg |= CDNS_I2C_CR_HOLD;
|
|
ctrl_reg |= CDNS_I2C_CR_HOLD;
|
|
|
|
|
+ else
|
|
|
|
|
+ ctrl_reg = ctrl_reg & ~CDNS_I2C_CR_HOLD;
|
|
|
|
|
+
|
|
|
cdns_i2c_writereg(ctrl_reg, CDNS_I2C_CR_OFFSET);
|
|
cdns_i2c_writereg(ctrl_reg, CDNS_I2C_CR_OFFSET);
|
|
|
|
|
|
|
|
/* Clear the interrupts in interrupt status register. */
|
|
/* Clear the interrupts in interrupt status register. */
|