mirror of
https://github.com/u-boot/u-boot.git
synced 2024-11-25 13:14:19 +08:00
i2c: lpc32xx: fix write timeout
Fix a condition that generate watchdog timeout inside "lpc32xx_i2c_write" when parameters alen = 0 and len = 0. Signed-off-by: Sylvain Lemieux <slemieux@tycoint.com>
This commit is contained in:
parent
3d2b6a2e5f
commit
58243001a9
@ -200,6 +200,8 @@ static int lpc32xx_i2c_write(struct i2c_adapter *adap, u8 dev, uint addr,
|
||||
if (alen | length)
|
||||
/* Address slave in write mode */
|
||||
writel((dev<<1) | LPC32XX_I2C_TX_START, &i2c->tx);
|
||||
else
|
||||
return 0;
|
||||
/* write address bytes */
|
||||
while (alen) {
|
||||
/* wait for transmit fifo not full */
|
||||
|
Loading…
Reference in New Issue
Block a user