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 <Joakim.Tjernlund@transmode.se>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
This commit is contained in:
Joakim Tjernlund 2010-08-11 11:44:21 +02:00 committed by Ben Warren
parent b7081d9197
commit bd6c25afd2

View File

@ -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);