diff options
author | Marek Vasut | 2017-08-07 20:45:31 +0200 |
---|---|---|
committer | Heiko Schocher | 2017-08-10 12:02:50 +0200 |
commit | 014e47f028526689aaa8ecb2e9164572937afe44 (patch) | |
tree | b3ee7df9aebde0d5104ea6198aca83c20c91a826 | |
parent | daa0f0500f2bf6fdda7c359c24d4fc6ca46f6159 (diff) |
i2c: designware: Allow sending restart conditions
Allow sending restart conditions upon direction change as this is
required by some chips.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Heiko Schocher <hs@denx.de>
Reviewed-by: Heiko Schocher <hs@denxx.de>
-rw-r--r-- | drivers/i2c/designware_i2c.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/i2c/designware_i2c.c b/drivers/i2c/designware_i2c.c index d4df35a69ac..8cfed2194c5 100644 --- a/drivers/i2c/designware_i2c.c +++ b/drivers/i2c/designware_i2c.c @@ -374,7 +374,8 @@ static void __dw_i2c_init(struct i2c_regs *i2c_base, int speed, int slaveaddr) /* Disable i2c */ dw_i2c_enable(i2c_base, false); - writel((IC_CON_SD | IC_CON_SPD_FS | IC_CON_MM), &i2c_base->ic_con); + writel(IC_CON_SD | IC_CON_RE | IC_CON_SPD_FS | IC_CON_MM, + &i2c_base->ic_con); writel(IC_RX_TL, &i2c_base->ic_rx_tl); writel(IC_TX_TL, &i2c_base->ic_tx_tl); writel(IC_STOP_DET, &i2c_base->ic_intr_mask); |