Skip to contentSkip to conversation

i2c: lpc32xx: fix write timeout

PATCH New slemieux.tyco at gmail.com 2 participants 2 messages Jul 27, 2015 – Aug 13, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 6/7 i2c: lpc32xx: fix write timeout

From: Sylvain Lemieux <[email protected]>

Fix a condition that generate watchdog timeout inside "lpc32xx_i2c_write" when parameters alen = 0 and len = 0.

---
 drivers/i2c/lpc32xx_i2c.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/i2c/lpc32xx_i2c.c +2 -0
index 4c66769..7f4eccd 100644
@@ -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 */
Signature · 1 line
1.8.3.1
#1 lore raw

PATCH 6/7 i2c: lpc32xx: fix write timeout

Quoted 5 lines · slemieux.tyco at gmail.com

From: Sylvain Lemieux <[email protected]>

Fix a condition that generate watchdog timeout inside "lpc32xx_i2c_write" when parameters alen = 0 and len = 0.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150813/bc82abce/attachment.sig>