All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] cm-t35: fix Ethernet reset timing
@ 2012-04-03  6:12 Igor Grinberg
  2012-04-03 16:20 ` Tom Rini
  0 siblings, 1 reply; 2+ messages in thread
From: Igor Grinberg @ 2012-04-03  6:12 UTC (permalink / raw)
  To: u-boot

The reset_net_chip() function has wrong timings for the reset pulse.

This appeared to work until:
0607e2b (ARMV7: OMAP: Write more than 1 byte at a time in i2c_write)

Fix the Ethernet support by introducing right timings.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
---
 board/cm_t35/cm_t35.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/board/cm_t35/cm_t35.c b/board/cm_t35/cm_t35.c
index bc991c4..ee7d5a0 100644
--- a/board/cm_t35/cm_t35.c
+++ b/board/cm_t35/cm_t35.c
@@ -362,16 +362,17 @@ static void reset_net_chip(void)
 {
 	/* Set GPIO1 of TPS65930 as output */
 	twl4030_i2c_write_u8(TWL4030_CHIP_GPIO, 0x02,
-			     TWL4030_BASEADD_GPIO+0x03);
+				TWL4030_BASEADD_GPIO + 0x03);
 	/* Send a pulse on the GPIO pin */
 	twl4030_i2c_write_u8(TWL4030_CHIP_GPIO, 0x02,
-			     TWL4030_BASEADD_GPIO+0x0C);
+				TWL4030_BASEADD_GPIO + 0x0C);
 	udelay(1);
 	twl4030_i2c_write_u8(TWL4030_CHIP_GPIO, 0x02,
-			     TWL4030_BASEADD_GPIO+0x09);
-	udelay(1);
+				TWL4030_BASEADD_GPIO + 0x09);
+	mdelay(40);
 	twl4030_i2c_write_u8(TWL4030_CHIP_GPIO, 0x02,
-			     TWL4030_BASEADD_GPIO+0x0C);
+				TWL4030_BASEADD_GPIO + 0x0C);
+	mdelay(1);
 }
 #else
 static inline void reset_net_chip(void) {}
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [PATCH] cm-t35: fix Ethernet reset timing
  2012-04-03  6:12 [U-Boot] [PATCH] cm-t35: fix Ethernet reset timing Igor Grinberg
@ 2012-04-03 16:20 ` Tom Rini
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2012-04-03 16:20 UTC (permalink / raw)
  To: u-boot

On Tue, Apr 03, 2012 at 09:12:58AM +0300, Igor Grinberg wrote:

> The reset_net_chip() function has wrong timings for the reset pulse.
> 
> This appeared to work until:
> 0607e2b (ARMV7: OMAP: Write more than 1 byte at a time in i2c_write)
> 
> Fix the Ethernet support by introducing right timings.
> 
> Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>

Queued up for u-boot-ti/master (which I intend to PR Friday).

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120403/95dc3246/attachment.pgp>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-04-03 16:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-03  6:12 [U-Boot] [PATCH] cm-t35: fix Ethernet reset timing Igor Grinberg
2012-04-03 16:20 ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.