URL
https://opencores.org/ocsvn/minsoc/minsoc/trunk
[/] [minsoc/] [trunk/] [sw/] [drivers/] [eth.c] - Diff between revs 36 and 37
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 36 |
Rev 37 |
Line 32... |
Line 32... |
REG32(ETH_BASE + ETH_MAC_ADDR1) = (OWN_MAC_ADDRESS_5 << 8) | OWN_MAC_ADDRESS_4; //low word = mac address high word
|
REG32(ETH_BASE + ETH_MAC_ADDR1) = (OWN_MAC_ADDRESS_5 << 8) | OWN_MAC_ADDRESS_4; //low word = mac address high word
|
REG32(ETH_BASE + ETH_MAC_ADDR0) = (OWN_MAC_ADDRESS_3 << 24) | (OWN_MAC_ADDRESS_2 << 16)
|
REG32(ETH_BASE + ETH_MAC_ADDR0) = (OWN_MAC_ADDRESS_3 << 24) | (OWN_MAC_ADDRESS_2 << 16)
|
| (OWN_MAC_ADDRESS_1 << 8) | OWN_MAC_ADDRESS_0; //mac address rest
|
| (OWN_MAC_ADDRESS_1 << 8) | OWN_MAC_ADDRESS_0; //mac address rest
|
|
|
//configure TXBD0
|
//configure TXBD0
|
REG32(ETH_BASE + ETH_TXBD0H) = eth_tx_packet; //address used for tx_data
|
REG32(ETH_BASE + ETH_TXBD0H) = (unsigned long)eth_tx_packet; //address used for tx_data
|
REG32(ETH_BASE + ETH_TXBD0L) = TX_READY; //length = 0 | PAD & CRC = 1 | IRQ & WR = 1
|
REG32(ETH_BASE + ETH_TXBD0L) = TX_READY; //length = 0 | PAD & CRC = 1 | IRQ & WR = 1
|
|
|
//configure RXBD0
|
//configure RXBD0
|
REG32(ETH_BASE + ETH_RXBD0H) = eth_rx_packet; //address used for tx_data
|
REG32(ETH_BASE + ETH_RXBD0H) = (unsigned long)eth_rx_packet; //address used for tx_data
|
REG32(ETH_BASE + ETH_RXBD0L) = RX_READY; //len = 0 | IRQ & WR = 1 | EMPTY = 1
|
REG32(ETH_BASE + ETH_RXBD0L) = RX_READY; //len = 0 | IRQ & WR = 1 | EMPTY = 1
|
|
|
//set txdata
|
//set txdata
|
eth_tx_packet[0] = BROADCAST_ADDRESS_5;
|
eth_tx_packet[0] = BROADCAST_ADDRESS_5;
|
eth_tx_packet[1] = BROADCAST_ADDRESS_4;
|
eth_tx_packet[1] = BROADCAST_ADDRESS_4;
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.