aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPo-Yu Chuang2011-01-21 15:51:25 +0800
committerWolfgang Denk2011-03-21 22:54:23 +0100
commit8d8fd5b69614d84aa39bf4a624eda9c76d154837 (patch)
treec47f7038f061e6e65883bc1b8c01c12a9b628c58
parent6f6e6e09b24e9a9dfa4af28f3e7704d335411cb4 (diff)
net: ftmac100: update get_timer() usages
Use get_timer() the same way as drivers/net/ftgmac100.c Signed-off-by: Po-Yu Chuang <ratbert@faraday-tech.com> Reviewed-by: Macpaul Lin <macpaul@gmail.com> Tested-by: Macpaul Lin <macpaul@gmail.com>
-rw-r--r--drivers/net/ftmac100.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ftmac100.c b/drivers/net/ftmac100.c
index 27381a3f496..94dc6d99ba6 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;
}