diff mbox

[U-Boot,v2,2/2] net: ftmac100: update get_timer() usages

Message ID 1295596285-1690-1-git-send-email-ratbert.chuang@gmail.com
State Accepted
Commit 8d8fd5b69614d84aa39bf4a624eda9c76d154837
Headers show

Commit Message

Po-Yu Chuang Jan. 21, 2011, 7:51 a.m. UTC
From: Po-Yu Chuang <ratbert@faraday-tech.com>

Use get_timer() the same way as drivers/net/ftgmac100.c

Signed-off-by: Po-Yu Chuang <ratbert@faraday-tech.com>
---
v2:
this patch is splitted from "net: ftmac100: remove unncessary volatiles"

 drivers/net/ftmac100.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

Comments

Macpaul Lin Feb. 25, 2011, 11:16 a.m. UTC | #1
Hi Ben,

2011/1/21 Po-Yu Chuang <ratbert.chuang@gmail.com>:
> From: Po-Yu Chuang <ratbert@faraday-tech.com>
>
> Use get_timer() the same way as drivers/net/ftgmac100.c
>
> Signed-off-by: Po-Yu Chuang <ratbert@faraday-tech.com>
> ---
> v2:
> this patch is splitted from "net: ftmac100: remove unncessary volatiles"

Just remind you please remember to review this patch
as http://patchwork.ozlabs.org/patch/79802/ in patchwork.

Reviewed-by: Macpaul Lin <macpaul@gmail.com>
Tested-by: Macpaul Lin <macpaul@gmail.com>
Macpaul Lin Feb. 25, 2011, 11:20 a.m. UTC | #2
Hi Ben,

2011/2/25 Macpaul Lin <macpaul@gmail.com>:
> Hi Ben,
>
> 2011/1/21 Po-Yu Chuang <ratbert.chuang@gmail.com>:
>> From: Po-Yu Chuang <ratbert@faraday-tech.com>
>>
>> Use get_timer() the same way as drivers/net/ftgmac100.c
>>
>> Signed-off-by: Po-Yu Chuang <ratbert@faraday-tech.com>
>> ---
>> v2:
>> this patch is splitted from "net: ftmac100: remove unncessary volatiles"
>
> Just remind you please remember to review this patch
> as http://patchwork.ozlabs.org/patch/79802/ in patchwork.
>
> Reviewed-by: Macpaul Lin <macpaul@gmail.com>
> Tested-by: Macpaul Lin <macpaul@gmail.com>
>

Just remind you please "also" remember to review the patch
"net: ftmac100: update get_timer() usages"
as http://patchwork.ozlabs.org/patch/79803/ in patchwork.

I've lost the patch "79803" in my mailbox, however I've downloaded it
from patchwork.

Reviewed-by: Macpaul Lin <macpaul@gmail.com>
Tested-by: Macpaul Lin <macpaul@gmail.com>
Wolfgang Denk March 21, 2011, 9:54 p.m. UTC | #3
Dear Po-Yu Chuang,

In message <1295596285-1690-1-git-send-email-ratbert.chuang@gmail.com> you wrote:
> From: Po-Yu Chuang <ratbert@faraday-tech.com>
> 
> Use get_timer() the same way as drivers/net/ftgmac100.c
> 
> Signed-off-by: Po-Yu Chuang <ratbert@faraday-tech.com>
> ---
> v2:
> this patch is splitted from "net: ftmac100: remove unncessary volatiles"
> 
>  drivers/net/ftmac100.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk
diff mbox

Patch

diff --git a/drivers/net/ftmac100.c b/drivers/net/ftmac100.c
index 27381a3..94dc6d9 100644
--- a/drivers/net/ftmac100.c
+++ b/drivers/net/ftmac100.c
@@ -195,8 +195,8 @@  ftmac100_send (struct eth_device *dev, volatile void *packet, int length)
 {
 	struct ftmac100 *ftmac100 = (struct ftmac100 *)dev->iobase;
 	struct ftmac100_data *priv = dev->priv;
-	int tmo;
 	struct ftmac100_txdes *curr_des = priv->txdes;
+	ulong start;
 
 	if (curr_des->txdes0 & FTMAC100_TXDES0_TXDMA_OWN) {
 		debug ("%s(): no TX descriptor available\n", __func__);
@@ -224,9 +224,9 @@  ftmac100_send (struct eth_device *dev, volatile void *packet, int length)
 
 	/* wait for transfer to succeed */
 
-	tmo = get_timer (0) + 5 * CONFIG_SYS_HZ;
+	start = get_timer(0);
 	while (curr_des->txdes0 & FTMAC100_TXDES0_TXDMA_OWN) {
-		if (get_timer (0) >= tmo) {
+		if (get_timer(start) >= 5) {
 			debug ("%s(): timed out\n", __func__);
 			return -1;
 		}