From: Joakim Tjernlund Date: Wed, 11 Aug 2010 09:44:21 +0000 (+0200) Subject: UEC: Don't udelay needlessly X-Git-Tag: v2010.12-rc1~135^2~12 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=bd6c25afd23a656b2283b7aecd893c1a16bcd585;p=u-boot UEC: Don't udelay needlessly uec_init() adds an udelay(100000) even though the PHY status read went well, don't do that. Signed-off-by: Joakim Tjernlund Acked-by: Kim Phillips Signed-off-by: Ben Warren --- diff --git a/drivers/qe/uec.c b/drivers/qe/uec.c index e10c0f328c..48033d750c 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);