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

* [U-Boot] [PATCH 2/2] UEC PHY: Remove strange 0.5 sec delay
  2010-08-11  9:44 [U-Boot] [PATCH 1/2] UEC: Don't udelay needlessly Joakim Tjernlund
@ 2010-08-11  9:44 ` Joakim Tjernlund
  2010-08-12  5:17   ` Kim Phillips
  2010-08-12  5:16 ` [U-Boot] [PATCH 1/2] UEC: Don't udelay needlessly Kim Phillips
  2010-08-31  6:01 ` Ben Warren
  2 siblings, 1 reply; 11+ messages in thread
From: Joakim Tjernlund @ 2010-08-11  9:44 UTC (permalink / raw)
  To: u-boot

This udelay looks bogus and doesn't help my board.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
---

 This delay was introduced by ee62ed3286f83b98b7785e0318dc6379e78f7ff6
 Kim, is this really needed for you?

 drivers/qe/uec_phy.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/qe/uec_phy.c b/drivers/qe/uec_phy.c
index 5237960..29ca97e 100644
--- a/drivers/qe/uec_phy.c
+++ b/drivers/qe/uec_phy.c
@@ -398,7 +398,6 @@ static int genmii_update_link (struct uec_mii_info *mii_info)
 			status = phy_read(mii_info, PHY_BMSR);
 		}
 		mii_info->link = 1;
-		udelay(500000);	/* another 500 ms (results in faster booting) */
 	} else {
 		if (status & PHY_BMSR_LS)
 			mii_info->link = 1;
-- 
1.7.1

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

* [U-Boot] [PATCH 1/2] UEC: Don't udelay needlessly
  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:16 ` Kim Phillips
  2010-08-18  7:28   ` Joakim Tjernlund
  2010-08-31  6:01 ` Ben Warren
  2 siblings, 1 reply; 11+ messages in thread
From: Kim Phillips @ 2010-08-12  5:16 UTC (permalink / raw)
  To: u-boot

On Wed, 11 Aug 2010 11:44:21 +0200
Joakim Tjernlund <Joakim.Tjernlund@transmode.se> wrote:

> 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>

Kim

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

* [U-Boot] [PATCH 2/2] UEC PHY: Remove strange 0.5 sec delay
  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:29     ` Joakim Tjernlund
  0 siblings, 2 replies; 11+ messages in thread
From: Kim Phillips @ 2010-08-12  5:17 UTC (permalink / raw)
  To: u-boot

On Wed, 11 Aug 2010 11:44:22 +0200
Joakim Tjernlund <Joakim.Tjernlund@transmode.se> wrote:

> This udelay looks bogus and doesn't help my board.
> 
> Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
> ---
> 
>  This delay was introduced by ee62ed3286f83b98b7785e0318dc6379e78f7ff6
>  Kim, is this really needed for you?

not that I know of - both these patches work fine on an 8323erdb and
8360emds:

Acked-by: Kim Phillips <kim.phillips@freescale.com>

thanks!

Kim

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

* [U-Boot] [PATCH 2/2] UEC PHY: Remove strange 0.5 sec delay
  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
  1 sibling, 1 reply; 11+ messages in thread
From: Joakim Tjernlund @ 2010-08-12  6:11 UTC (permalink / raw)
  To: u-boot

Kim Phillips <kim.phillips@freescale.com> wrote on 2010/08/12 07:17:49:
>
> On Wed, 11 Aug 2010 11:44:22 +0200
> Joakim Tjernlund <Joakim.Tjernlund@transmode.se> wrote:
>
> > This udelay looks bogus and doesn't help my board.
> >
> > Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
> > ---
> >
> >  This delay was introduced by ee62ed3286f83b98b7785e0318dc6379e78f7ff6
> >  Kim, is this really needed for you?
>
> not that I know of - both these patches work fine on an 8323erdb and
> 8360emds:
>
> Acked-by: Kim Phillips <kim.phillips@freescale.com>
>
> thanks!

Would you mind take a look at [PATCH] UEC PHY: Speed up initial PHY neg. ?
Sent it 2 days ago to the list.

     Jocke

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

* [U-Boot] [PATCH 1/2] UEC: Don't udelay needlessly
  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
  0 siblings, 2 replies; 11+ messages in thread
From: Joakim Tjernlund @ 2010-08-18  7:28 UTC (permalink / raw)
  To: u-boot

>
> On Wed, 11 Aug 2010 11:44:21 +0200
> Joakim Tjernlund <Joakim.Tjernlund@transmode.se> wrote:
>
> > 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>
>
> Kim

hmm, who gets this into the tree?

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

* [U-Boot] [PATCH 2/2] UEC PHY: Remove strange 0.5 sec delay
  2010-08-12  5:17   ` Kim Phillips
  2010-08-12  6:11     ` Joakim Tjernlund
@ 2010-08-18  7:29     ` Joakim Tjernlund
  1 sibling, 0 replies; 11+ messages in thread
From: Joakim Tjernlund @ 2010-08-18  7:29 UTC (permalink / raw)
  To: u-boot

>
> On Wed, 11 Aug 2010 11:44:22 +0200
> Joakim Tjernlund <Joakim.Tjernlund@transmode.se> wrote:
>
> > This udelay looks bogus and doesn't help my board.
> >
> > Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
> > ---
> >
> >  This delay was introduced by ee62ed3286f83b98b7785e0318dc6379e78f7ff6
> >  Kim, is this really needed for you?
>
> not that I know of - both these patches work fine on an 8323erdb and
> 8360emds:
>
> Acked-by: Kim Phillips <kim.phillips@freescale.com>
>
> thanks!
>
> Kim

This one too?

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

* [U-Boot] [PATCH 2/2] UEC PHY: Remove strange 0.5 sec delay
  2010-08-12  6:11     ` Joakim Tjernlund
@ 2010-08-18  7:30       ` Joakim Tjernlund
  0 siblings, 0 replies; 11+ messages in thread
From: Joakim Tjernlund @ 2010-08-18  7:30 UTC (permalink / raw)
  To: u-boot

>
> Kim Phillips <kim.phillips@freescale.com> wrote on 2010/08/12 07:17:49:
> >
> > On Wed, 11 Aug 2010 11:44:22 +0200
> > Joakim Tjernlund <Joakim.Tjernlund@transmode.se> wrote:
> >
> > > This udelay looks bogus and doesn't help my board.
> > >
> > > Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
> > > ---
> > >
> > >  This delay was introduced by ee62ed3286f83b98b7785e0318dc6379e78f7ff6
> > >  Kim, is this really needed for you?
> >
> > not that I know of - both these patches work fine on an 8323erdb and
> > 8360emds:
> >
> > Acked-by: Kim Phillips <kim.phillips@freescale.com>
> >
> > thanks!
>
> Would you mind take a look at [PATCH] UEC PHY: Speed up initial PHY neg. ?
> Sent it 2 days ago to the list.

Ping?

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

* [U-Boot] [PATCH 1/2] UEC: Don't udelay needlessly
  2010-08-18  7:28   ` Joakim Tjernlund
@ 2010-08-18  7:55     ` Wolfgang Denk
  2010-08-23  5:53     ` Ben Warren
  1 sibling, 0 replies; 11+ messages in thread
From: Wolfgang Denk @ 2010-08-18  7:55 UTC (permalink / raw)
  To: u-boot

Dear Joakim Tjernlund,

In message <OFC346B6E4.325608D3-ONC1257783.0028D954-C1257783.00290C71@transmode.se> you wrote:
> > Joakim Tjernlund <Joakim.Tjernlund@transmode.se> wrote:
> >
> > > 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>
> 
> hmm, who gets this into the tree?

This being a network driver I see it on Ben's plate...

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Machines take me by surprise with great frequency.      - Alan Turing

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

* [U-Boot] [PATCH 1/2] UEC: Don't udelay needlessly
  2010-08-18  7:28   ` Joakim Tjernlund
  2010-08-18  7:55     ` Wolfgang Denk
@ 2010-08-23  5:53     ` Ben Warren
  1 sibling, 0 replies; 11+ messages in thread
From: Ben Warren @ 2010-08-23  5:53 UTC (permalink / raw)
  To: u-boot

Hi Joakim,

On Wednesday, August 18, 2010, Joakim Tjernlund
<joakim.tjernlund@transmode.se> wrote:
>>
>> On Wed, 11 Aug 2010 11:44:21 +0200
>> Joakim Tjernlund <Joakim.Tjernlund@transmode.se> wrote:
>>
>> > 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>
>>
>> Kim
>
> hmm, who gets this into the tree?
>
I'm just getting caught up, and will take this.

Regards,
Ben
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>

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

* [U-Boot] [PATCH 1/2] UEC: Don't udelay needlessly
  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:16 ` [U-Boot] [PATCH 1/2] UEC: Don't udelay needlessly Kim Phillips
@ 2010-08-31  6:01 ` Ben Warren
  2 siblings, 0 replies; 11+ messages in thread
From: Ben Warren @ 2010-08-31  6:01 UTC (permalink / raw)
  To: u-boot

  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<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);
Parts 1 & 2 applied to net/next.  Sorry for taking so long.

regards,
Ben

^ permalink raw reply	[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