Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 173857
b: refs/heads/master
c: 26ea15b
h: refs/heads/master
i:
  173855: fd0b4c8
v: v3
  • Loading branch information
Shinya Kuribayashi authored and Ben Dooks committed Dec 9, 2009
1 parent 34df553 commit 898c643
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 81e798b73aec2d7ce06d18bd191b088c233e554f
refs/heads/master: 26ea15b1f584de02bc85e9c3968d523386332f65
7 changes: 4 additions & 3 deletions trunk/drivers/i2c/busses/i2c-designware.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ i2c_dw_xfer_msg(struct dw_i2c_dev *dev)
int rx_limit = dev->rx_fifo_depth - readl(dev->base + DW_IC_RXFLR);
u32 addr = msgs[dev->msg_write_idx].addr;
u32 buf_len = dev->tx_buf_len;
u8 *buf = dev->tx_buf;;

intr_mask = DW_IC_INTR_STOP_DET | DW_IC_INTR_TX_ABRT | DW_IC_INTR_RX_FULL;

Expand All @@ -384,7 +385,7 @@ i2c_dw_xfer_msg(struct dw_i2c_dev *dev)

if (!(dev->status & STATUS_WRITE_IN_PROGRESS)) {
/* new i2c_msg */
dev->tx_buf = msgs[dev->msg_write_idx].buf;
buf = msgs[dev->msg_write_idx].buf;
buf_len = msgs[dev->msg_write_idx].len;
}

Expand All @@ -393,11 +394,11 @@ i2c_dw_xfer_msg(struct dw_i2c_dev *dev)
writel(0x100, dev->base + DW_IC_DATA_CMD);
rx_limit--;
} else
writel(*(dev->tx_buf++),
dev->base + DW_IC_DATA_CMD);
writel(*buf++, dev->base + DW_IC_DATA_CMD);
tx_limit--; buf_len--;
}

dev->tx_buf = buf;
dev->tx_buf_len = buf_len;

if (buf_len > 0) {
Expand Down

0 comments on commit 898c643

Please sign in to comment.