Line 20... |
Line 20... |
eth_ipgt = (unsigned long *)(ETH_BASE + ETH_IPGT),
|
eth_ipgt = (unsigned long *)(ETH_BASE + ETH_IPGT),
|
eth_ipgr1 = (unsigned long *)(ETH_BASE + ETH_IPGR1),
|
eth_ipgr1 = (unsigned long *)(ETH_BASE + ETH_IPGR1),
|
eth_ipgr2 = (unsigned long *)(ETH_BASE + ETH_IPGR2),
|
eth_ipgr2 = (unsigned long *)(ETH_BASE + ETH_IPGR2),
|
eth_packetlen = (unsigned long *)(ETH_BASE + ETH_PACKETLEN),
|
eth_packetlen = (unsigned long *)(ETH_BASE + ETH_PACKETLEN),
|
eth_collconf = (unsigned long *)(ETH_BASE + ETH_COLLCONF),
|
eth_collconf = (unsigned long *)(ETH_BASE + ETH_COLLCONF),
|
eth_rx_bd_num = (unsigned long *)(ETH_BASE + ETH_RX_BD_NUM),
|
eth_tx_bd_num = (unsigned long *)(ETH_BASE + ETH_TX_BD_NUM),
|
eth_controlmoder = (unsigned long *)(ETH_BASE + ETH_CTRLMODER),
|
eth_controlmoder = (unsigned long *)(ETH_BASE + ETH_CTRLMODER),
|
eth_miimoder = (unsigned long *)(ETH_BASE + ETH_MIIMODER),
|
eth_miimoder = (unsigned long *)(ETH_BASE + ETH_MIIMODER),
|
eth_miicommand = (unsigned long *)(ETH_BASE + ETH_MIICOMMAND),
|
eth_miicommand = (unsigned long *)(ETH_BASE + ETH_MIICOMMAND),
|
eth_miiaddress = (unsigned long *)(ETH_BASE + ETH_MIIADDRESS),
|
eth_miiaddress = (unsigned long *)(ETH_BASE + ETH_MIIADDRESS),
|
eth_miitx_data = (unsigned long *)(ETH_BASE + ETH_MIITX_DATA),
|
eth_miitx_data = (unsigned long *)(ETH_BASE + ETH_MIITX_DATA),
|
Line 52... |
Line 52... |
unsigned long adr0;
|
unsigned long adr0;
|
unsigned long adr1;
|
unsigned long adr1;
|
unsigned long next;
|
unsigned long next;
|
};
|
};
|
|
|
void transmit_one_packet( void )
|
static void set_mac( void )
|
|
{
|
|
*eth_mac_addr0 = 0x04030201LU;
|
|
*eth_mac_addr1 = 0x00000605LU;
|
|
}
|
|
|
|
static void transmit_one_packet( void )
|
{
|
{
|
unsigned i;
|
unsigned i;
|
unsigned char packet[1003];
|
unsigned char packet[1003];
|
struct DMA_DESCRIPTOR desc;
|
struct DMA_DESCRIPTOR desc;
|
|
|
Line 94... |
Line 100... |
|
|
int main()
|
int main()
|
{
|
{
|
printf( "Starting Ethernet test\n" );
|
printf( "Starting Ethernet test\n" );
|
|
|
|
set_mac();
|
transmit_one_packet();
|
transmit_one_packet();
|
|
|
printf( "Ending Ethernet test\n" );
|
printf( "Ending Ethernet test\n" );
|
|
|
report (0xdeaddead);
|
report (0xdeaddead);
|