ethermac: reduce interrupt overhead
[nios2ecos.git] / eth_ocm / HAL / inc / eth_ocm.h
blob6db32da8721ed07f637ff19f45175c99a9326f16
1 #ifndef __ETH_OCM_H__
2 #define __ETH_OCM_H__
4 #if defined(ALT_INICHE)
5 #include "ins_eth_ocm.h"
6 #else
7 /**
8 * eth_ocm_dev contains information aquired at initialization time that is
9 * required for further access to the device. This struct is initialized
10 * by the alt_sys_init routine for each instance of the OpenCores MAC in the
11 * system.
13 typedef struct{
14 alt_u32 base;
15 alt_u8 irq;
16 char name[20];
17 } eth_ocm_dev;
19 //Information that can't be obtained later
20 #define ETH_OCM_INSTANCE(name, dev) \
21 eth_ocm_dev dev = { \
22 name##_BASE, \
23 name##_IRQ, \
24 name##_NAME \
27 #define ETH_OCM_INIT(name, dev_inst)
29 #endif // !defined ALT_INICHE
31 #define ETH_OCM_STATUS_DOWN 2
32 #define ETH_OCM_STATUS_UP 1
33 #define ETH_OCM_MAC_ADDR_LEN 6
34 #define ETH_OCM_MIN_MTU 4
35 #define ETH_OCM_MAX_MTU 1518
36 #define ETH_OCM_FULL_DUPLEX_IPGT 0x15
37 #define ETH_OCM_HALF_DUPLEX_IPGT 0x12
39 #endif //__ETH_OCM_H__