From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Warren Date: Mon, 30 Aug 2010 23:01:22 -0700 Subject: [U-Boot] [PATCH 1/2] UEC: Don't udelay needlessly In-Reply-To: <1281519862-27858-1-git-send-email-Joakim.Tjernlund@transmode.se> References: <1281519862-27858-1-git-send-email-Joakim.Tjernlund@transmode.se> Message-ID: <4C7C9AB2.3000602@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Jocke, On 8/11/2010 2:44 AM, Joakim Tjernlund wrote: > uec_init() adds an udelay(100000) even though > the PHY status read went well, don't do that. > > Signed-off-by: Joakim Tjernlund > --- > 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); Parts 1 & 2 applied to net/next. Sorry for taking so long. regards, Ben