public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] UEC: Don't udelay needlessly
@ 2010-08-11  9:44 Joakim Tjernlund
  2010-08-11  9:44 ` [U-Boot] [PATCH 2/2] UEC PHY: Remove strange 0.5 sec delay Joakim Tjernlund
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Joakim Tjernlund @ 2010-08-11  9:44 UTC (permalink / raw)
  To: u-boot

uec_init() adds an udelay(100000) even though
the PHY status read went well, don't do that.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
---
 drivers/qe/uec.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/qe/uec.c b/drivers/qe/uec.c
index ccbf27d..758151f 100644
--- a/drivers/qe/uec.c
+++ b/drivers/qe/uec.c
@@ -1223,8 +1223,10 @@ static int uec_init(struct eth_device* dev, bd_t *bd)
 		i = 50;
 		do {
 			err = curphy->read_status(uec->mii_info);
+			if (!(((i-- > 0) && !uec->mii_info->link) || err))
+				break;
 			udelay(100000);
-		} while (((i-- > 0) && !uec->mii_info->link) || err);
+		} while (1);
 
 		if (err || i <= 0)
 			printf("warning: %s: timeout on PHY link\n", dev->name);
-- 
1.7.1

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

end of thread, other threads:[~2010-08-31  6:01 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-11  9:44 [U-Boot] [PATCH 1/2] UEC: Don't udelay needlessly Joakim Tjernlund
2010-08-11  9:44 ` [U-Boot] [PATCH 2/2] UEC PHY: Remove strange 0.5 sec delay Joakim Tjernlund
2010-08-12  5:17   ` Kim Phillips
2010-08-12  6:11     ` Joakim Tjernlund
2010-08-18  7:30       ` Joakim Tjernlund
2010-08-18  7:29     ` Joakim Tjernlund
2010-08-12  5:16 ` [U-Boot] [PATCH 1/2] UEC: Don't udelay needlessly Kim Phillips
2010-08-18  7:28   ` Joakim Tjernlund
2010-08-18  7:55     ` Wolfgang Denk
2010-08-23  5:53     ` Ben Warren
2010-08-31  6:01 ` Ben Warren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox