[U-Boot] 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

Richard,
Agree.
Best Regards, TsiChung
-----Original Message----- From: Richard Retanubun [mailto:RichardRetanubun@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

From 584b5fbd4abfc43f920cc1c329633e03816e28be Mon Sep 17 00:00:00 2001 From: Richard Retanubun RichardRetanubun@RuggedCom.com Date: Wed, 20 May 2009 18:26:01 -0400 Subject: [PATCH] Standardize the use of MCFFEC_TOUT_LOOP as a udelay(1) loop counter.
Signed-off-by: Richard Retanubun RichardRetanubun@RuggedCom.com --- 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(-)
diff --git a/drivers/net/mcfmii.c b/drivers/net/mcfmii.c index 4f1c0a0..4acc29e 100644 --- a/drivers/net/mcfmii.c +++ b/drivers/net/mcfmii.c @@ -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

Hi Richard,
Richard Retanubun wrote:
From 584b5fbd4abfc43f920cc1c329633e03816e28be Mon Sep 17 00:00:00 2001 From: Richard Retanubun RichardRetanubun@RuggedCom.com Date: Wed, 20 May 2009 18:26:01 -0400 Subject: [PATCH] Standardize the use of MCFFEC_TOUT_LOOP as a udelay(1) loop counter.
Signed-off-by: Richard Retanubun RichardRetanubun@RuggedCom.com
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(-)
diff --git a/drivers/net/mcfmii.c b/drivers/net/mcfmii.c index 4f1c0a0..4acc29e 100644 --- a/drivers/net/mcfmii.c +++ b/drivers/net/mcfmii.c @@ -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
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

From 584b5fbd4abfc43f920cc1c329633e03816e28be Mon Sep 17 00:00:00 2001 From: Richard Retanubun RichardRetanubun@RuggedCom.com Date: Wed, 20 May 2009 18:26:01 -0400 Subject: [PATCH] Standardize the use of MCFFEC_TOUT_LOOP as a udelay(1) loop counter.
Signed-off-by: Richard Retanubun RichardRetanubun@RuggedCom.com --- drivers/net/mcfmii.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/mcfmii.c b/drivers/net/mcfmii.c index 4f1c0a0..4acc29e 100644 --- a/drivers/net/mcfmii.c +++ b/drivers/net/mcfmii.c @@ -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");
participants (3)
-
Ben Warren
-
Liew Tsi Chung-R5AAHP
-
Richard Retanubun