Line 1... |
Line 1... |
/* Ethernet test */
|
/* Ethernet test */
|
|
|
#include "support.h"
|
#include "support.h"
|
|
|
typedef struct FILE FILE;
|
typedef long off_t;
|
|
|
#include "../peripheral/fields.h"
|
#include "../peripheral/fields.h"
|
#include "../peripheral/dma.h"
|
#include "../peripheral/dma.h"
|
#include "../peripheral/ethernet.h"
|
#include "../peripheral/ethernet.h"
|
|
|
#define ETH_BASE 0x88000000LU
|
#define ETH_BASE 0x88000000LU
|
#define DMA_BASE 0x90000000LU
|
#define DMA_BASE 0x90000000LU
|
|
|
typedef volatile unsigned long *REGISTER;
|
typedef volatile unsigned long *REGISTER;
|
|
|
REGISTER eth_moder = (unsigned long *)(ETH_BASE + ETH_MODER),
|
REGISTER
|
|
eth_moder = (unsigned long *)(ETH_BASE + ETH_MODER),
|
eth_int_source = (unsigned long *)(ETH_BASE + ETH_INT_SOURCE),
|
eth_int_source = (unsigned long *)(ETH_BASE + ETH_INT_SOURCE),
|
eth_int_mask = (unsigned long *)(ETH_BASE + ETH_INT_MASK),
|
eth_int_mask = (unsigned long *)(ETH_BASE + ETH_INT_MASK),
|
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),
|