Commit ebcd241a authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux

Pull i2c bugfixes from Wolfram Sang:
 "A few driver bugfixes for 3.18"

* 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: omap: fix i207 errata handling
  i2c: designware: prevent early stop on TX FIFO empty
  i2c: omap: fix NACK and Arbitration Lost irq handling
parents 5dc62635 ccfc8663
...@@ -359,7 +359,7 @@ int i2c_dw_init(struct dw_i2c_dev *dev) ...@@ -359,7 +359,7 @@ int i2c_dw_init(struct dw_i2c_dev *dev)
} }
/* Configure Tx/Rx FIFO threshold levels */ /* 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); dw_writel(dev, 0, DW_IC_RX_TL);
/* configure the i2c master */ /* configure the i2c master */
......
...@@ -922,14 +922,12 @@ omap_i2c_isr_thread(int this_irq, void *dev_id) ...@@ -922,14 +922,12 @@ omap_i2c_isr_thread(int this_irq, void *dev_id)
if (stat & OMAP_I2C_STAT_NACK) { if (stat & OMAP_I2C_STAT_NACK) {
err |= OMAP_I2C_STAT_NACK; err |= OMAP_I2C_STAT_NACK;
omap_i2c_ack_stat(dev, OMAP_I2C_STAT_NACK); omap_i2c_ack_stat(dev, OMAP_I2C_STAT_NACK);
break;
} }
if (stat & OMAP_I2C_STAT_AL) { if (stat & OMAP_I2C_STAT_AL) {
dev_err(dev->dev, "Arbitration lost\n"); dev_err(dev->dev, "Arbitration lost\n");
err |= OMAP_I2C_STAT_AL; err |= OMAP_I2C_STAT_AL;
omap_i2c_ack_stat(dev, OMAP_I2C_STAT_AL); omap_i2c_ack_stat(dev, OMAP_I2C_STAT_AL);
break;
} }
/* /*
...@@ -954,11 +952,13 @@ omap_i2c_isr_thread(int this_irq, void *dev_id) ...@@ -954,11 +952,13 @@ omap_i2c_isr_thread(int this_irq, void *dev_id)
if (dev->fifo_size) if (dev->fifo_size)
num_bytes = dev->buf_len; num_bytes = dev->buf_len;
omap_i2c_receive_data(dev, num_bytes, true); if (dev->errata & I2C_OMAP_ERRATA_I207) {
if (dev->errata & I2C_OMAP_ERRATA_I207)
i2c_omap_errata_i207(dev, stat); i2c_omap_errata_i207(dev, stat);
num_bytes = (omap_i2c_read_reg(dev,
OMAP_I2C_BUFSTAT_REG) >> 8) & 0x3F;
}
omap_i2c_receive_data(dev, num_bytes, true);
omap_i2c_ack_stat(dev, OMAP_I2C_STAT_RDR); omap_i2c_ack_stat(dev, OMAP_I2C_STAT_RDR);
continue; continue;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment