X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=drivers%2Fnet%2Fbcm570x.c;h=c250d446f14528cea4a45ade0f972eccbc34956b;hb=be44f75887f27400e3abcf69886c8a3663f23bac;hp=c8f4064224dc1b2022dc4e2adc9e88fec8ee7b9d;hpb=4985ca5af3767ffe13ea96e1dc26f88c81084414;p=u-boot diff --git a/drivers/net/bcm570x.c b/drivers/net/bcm570x.c index c8f4064224..c250d446f1 100644 --- a/drivers/net/bcm570x.c +++ b/drivers/net/bcm570x.c @@ -6,9 +6,6 @@ #include -#if defined(CONFIG_CMD_NET) \ - && (!defined(CONFIG_NET_MULTI)) && defined(CONFIG_BCM570x) - #ifdef CONFIG_BMW #include #endif @@ -27,7 +24,7 @@ /* * PCI memory base for Ethernet device as well as device Interrupt. */ -#define BCM570X_MBAR 0x80100000 +#define BCM570X_MBAR 0x80100000 #define BCM570X_ILINE 1 #define SECOND_USEC 1000000 @@ -442,9 +439,9 @@ int eth_init (bd_t * bis) /* Setup timer delays */ if (T3_ASIC_REV (pDevice->ChipRevId) == T3_ASIC_REV_5701) { pDevice->UseTaggedStatus = TRUE; - pUmDevice->timer_interval = CFG_HZ; + pUmDevice->timer_interval = CONFIG_SYS_HZ; } else { - pUmDevice->timer_interval = CFG_HZ / 50; + pUmDevice->timer_interval = CONFIG_SYS_HZ / 50; } /* Grab name .... */ @@ -453,23 +450,23 @@ int eth_init (bd_t * bis) + 1); strcpy (pUmDevice->name, board_info[bcm570xDevices[i].board_id].name); - memcpy (pDevice->NodeAddress, bis->bi_enetaddr, 6); - LM_SetMacAddress (pDevice, bis->bi_enetaddr); + eth_getenv_enetaddr("ethaddr", pDevice->NodeAddress); + LM_SetMacAddress (pDevice); /* Init queues .. */ QQ_InitQueue (&pUmDevice->rx_out_of_buf_q.Container, MAX_RX_PACKET_DESC_COUNT); pUmDevice->rx_last_cnt = pUmDevice->tx_last_cnt = 0; /* delay for 4 seconds */ - pUmDevice->delayed_link_ind = (4 * CFG_HZ) / pUmDevice->timer_interval; + pUmDevice->delayed_link_ind = (4 * CONFIG_SYS_HZ) / pUmDevice->timer_interval; - pUmDevice->adaptive_expiry = CFG_HZ / pUmDevice->timer_interval; + pUmDevice->adaptive_expiry = CONFIG_SYS_HZ / pUmDevice->timer_interval; /* Sometimes we get spurious ints. after reset when link is down. */ /* This field tells the isr to service the int. even if there is */ /* no status block update. */ pUmDevice->adapter_just_inited = - (3 * CFG_HZ) / pUmDevice->timer_interval; + (3 * CONFIG_SYS_HZ) / pUmDevice->timer_interval; /* Initialize 570x */ if (LM_InitializeAdapter (pDevice) != LM_STATUS_SUCCESS) { @@ -1049,9 +1046,9 @@ LM_STATUS MM_GetConfig (PLM_DEVICE_BLOCK pDevice) if (T3_ASIC_REV (pDevice->ChipRevId) == T3_ASIC_REV_5701) { pDevice->UseTaggedStatus = TRUE; - pUmDevice->timer_interval = CFG_HZ; + pUmDevice->timer_interval = CONFIG_SYS_HZ; } else { - pUmDevice->timer_interval = CFG_HZ / 50; + pUmDevice->timer_interval = CONFIG_SYS_HZ / 50; } pDevice->TxPacketDescCnt = tx_pkt_desc_cnt[index]; @@ -1599,5 +1596,3 @@ PQQ_ENTRY QQ_GetTail (PQQ_CONTAINER pQueue, unsigned int Idx) return pQueue->Array[Idx]; } - -#endif