diff options
-rw-r--r-- | drivers/i2c/busses/i2c-designware.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-designware.c b/drivers/i2c/busses/i2c-designware.c index 5fce1a07e6c1..0eea0dd35895 100644 --- a/drivers/i2c/busses/i2c-designware.c +++ b/drivers/i2c/busses/i2c-designware.c | |||
@@ -50,6 +50,8 @@ | |||
50 | #define DW_IC_INTR_STAT 0x2c | 50 | #define DW_IC_INTR_STAT 0x2c |
51 | #define DW_IC_INTR_MASK 0x30 | 51 | #define DW_IC_INTR_MASK 0x30 |
52 | #define DW_IC_RAW_INTR_STAT 0x34 | 52 | #define DW_IC_RAW_INTR_STAT 0x34 |
53 | #define DW_IC_RX_TL 0x38 | ||
54 | #define DW_IC_TX_TL 0x3c | ||
53 | #define DW_IC_CLR_INTR 0x40 | 55 | #define DW_IC_CLR_INTR 0x40 |
54 | #define DW_IC_CLR_RX_UNDER 0x44 | 56 | #define DW_IC_CLR_RX_UNDER 0x44 |
55 | #define DW_IC_CLR_RX_OVER 0x48 | 57 | #define DW_IC_CLR_RX_OVER 0x48 |
@@ -295,6 +297,10 @@ static void i2c_dw_init(struct dw_i2c_dev *dev) | |||
295 | writel(lcnt, dev->base + DW_IC_FS_SCL_LCNT); | 297 | writel(lcnt, dev->base + DW_IC_FS_SCL_LCNT); |
296 | dev_dbg(dev->dev, "Fast-mode HCNT:LCNT = %d:%d\n", hcnt, lcnt); | 298 | dev_dbg(dev->dev, "Fast-mode HCNT:LCNT = %d:%d\n", hcnt, lcnt); |
297 | 299 | ||
300 | /* Configure Tx/Rx FIFO threshold levels */ | ||
301 | writel(dev->tx_fifo_depth - 1, dev->base + DW_IC_TX_TL); | ||
302 | writel(0, dev->base + DW_IC_RX_TL); | ||
303 | |||
298 | /* configure the i2c master */ | 304 | /* configure the i2c master */ |
299 | ic_con = DW_IC_CON_MASTER | DW_IC_CON_SLAVE_DISABLE | | 305 | ic_con = DW_IC_CON_MASTER | DW_IC_CON_SLAVE_DISABLE | |
300 | DW_IC_CON_RESTART_EN | DW_IC_CON_SPEED_FAST; | 306 | DW_IC_CON_RESTART_EN | DW_IC_CON_SPEED_FAST; |