Skip to contentSkip to conversation

coldFire: net: Question about the use of MCFFEC_TOUT_LOOP

U-Boot Richard Retanubun 3 participants 5 messages May 8, 2009 – May 26, 2009 Network drivers

lore
Share & tools
lore
#0 lore raw

Hi TC,

I am trying to understand the use of MCFFEC_TOUT_LOOP, when I grep for it is used in mcffec, counting udelay(1)
and in mcfmii counting udelay(500). I think the udelay(500) one is causing extra long delays when trying to boot when the link is not up. can the mcfmii udelay(500) be udelay(1) to maintain consistency? I can work out a patch if you agree.

Thanks for your time

- Richarsd

#1 lore raw

Richard,

Agree.

Best Regards,
TsiChung

-----Original Message-----
From: Richard Retanubun [mailto:RichardRetanubun at ruggedcom.com]
Sent: Friday, May 08, 2009 7:52 AM
To: u-boot Mailing List
Cc: Liew Tsi Chung-R5AAHP
Subject: coldFire: net: Question about the use of MCFFEC_TOUT_LOOP

Hi TC,

I am trying to understand the use of MCFFEC_TOUT_LOOP, when I grep for it is used in mcffec, counting udelay(1) and in mcfmii counting udelay(500). I think the udelay(500) one is causing extra long delays when trying to boot when the link is not up.
can the mcfmii udelay(500) be udelay(1) to maintain consistency? I can work out a patch if you agree.

Thanks for your time

- Richarsd

#2 lore raw

[U-Boot] Subject: [PATCH] Standardize the use of MCFFEC_TOUT_LOOP as a udelay(1) loop counter.

From 584b5fbd4abfc43f920cc1c329633e03816e28be Mon Sep 17 00:00:00 2001
From: Richard Retanubun <[email protected]>
Date: Wed, 20 May 2009 18:26:01 -0400
Subject: [PATCH] Standardize the use of MCFFEC_TOUT_LOOP as a udelay(1) loop counter.

---
Hi TC,

Sorry for the long delay, I got tied up in an integration and sw release process. It turns out that there is only one place that needed changing.

  drivers/net/mcfmii.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/mcfmii.c +1 -1
index 4f1c0a0..4acc29e 100644
@@ -270,7 +270,7 @@ void __mii_init(void)
                 if ((status & linkgood) == linkgood)
                         break;
 
-               udelay(500);
+               udelay(1);
         }
         if (i >= MCFFEC_TOUT_LOOP) {
                 printf("Link UP timeout\n");

--
1.6.2.1

#3 lore raw

[U-Boot] Subject: [PATCH] Standardize the use of MCFFEC_TOUT_LOOP as a udelay(1) loop counter.

Hi Richard,

Quoted 30 lines · Richard Retanubun

From 584b5fbd4abfc43f920cc1c329633e03816e28be Mon Sep 17 00:00:00 2001
From: Richard Retanubun <[email protected]>
Date: Wed, 20 May 2009 18:26:01 -0400
Subject: [PATCH] Standardize the use of MCFFEC_TOUT_LOOP as a udelay(1) loop counter.

---
Hi TC,

Sorry for the long delay, I got tied up in an integration and sw release process. It turns out that there is only one place that needed changing.

  drivers/net/mcfmii.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/mcfmii.c +1 -2
index 4f1c0a0..4acc29e 100644
@@ -270,7 +270,7 @@ void __mii_init(void)
                 if ((status & linkgood) == linkgood)
                         break;
 
-               udelay(500);
+               udelay(1);
         }
         if (i >= MCFFEC_TOUT_LOOP) {
                 printf("Link UP timeout\n");
--
Quoted 2 lines

1.6.2.1

I'm not sure if this was meant to be applied, but it doesn't...

Applying Subject: [PATCH] Standardize the use of MCFFEC_TOUT_LOOP as a udelay(1) loop counter.
error: patch failed: drivers/net/mcfmii.c:270
error: drivers/net/mcfmii.c: patch does not apply
Patch failed at 0001.
When you have resolved this problem run "git-am --resolved".
If you would prefer to skip this patch, instead run "git-am --skip".

regards,
Ben

#4 lore raw

[U-Boot] Subject: [PATCH] [repost] Standardize the use of MCFFEC_TOUT_LOOP as a udelay(1) loop counter.

From 584b5fbd4abfc43f920cc1c329633e03816e28be Mon Sep 17 00:00:00 2001
From: Richard Retanubun <[email protected]>
Date: Wed, 20 May 2009 18:26:01 -0400
Subject: [PATCH] Standardize the use of MCFFEC_TOUT_LOOP as a udelay(1) loop counter.

---
  drivers/net/mcfmii.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/mcfmii.c +1 -1
index 4f1c0a0..4acc29e 100644
@@ -270,7 +270,7 @@ void __mii_init(void)
  		if ((status & linkgood) == linkgood)
  			break;
 
-		udelay(500);
+		udelay(1);
  	}
  	if (i >= MCFFEC_TOUT_LOOP) {
  		printf("Link UP timeout\n");
Signature · 1 line
1.6.2.1