diff options
Diffstat (limited to 'c/src/libchip/network/greth.h')
-rw-r--r-- | c/src/libchip/network/greth.h | 58 |
1 files changed, 54 insertions, 4 deletions
diff --git a/c/src/libchip/network/greth.h b/c/src/libchip/network/greth.h index 7dbc718df9..b9dab7bcb6 100644 --- a/c/src/libchip/network/greth.h +++ b/c/src/libchip/network/greth.h @@ -9,6 +9,7 @@ * $Id$ */ + #ifndef _GR_ETH_ #define _GR_ETH_ @@ -36,16 +37,27 @@ typedef struct _greth_regs { #define GRETH_TOTAL_BD 128 #define GRETH_MAXBUF_LEN 1520 - + /* Tx BD */ #define GRETH_TXD_ENABLE 0x0800 /* Tx BD Enable */ #define GRETH_TXD_WRAP 0x1000 /* Tx BD Wrap (last BD) */ #define GRETH_TXD_IRQ 0x2000 /* Tx BD IRQ Enable */ +#define GRETH_TXD_MORE 0x20000 /* Tx BD More (more descs for packet) */ +#define GRETH_TXD_IPCS 0x40000 /* Tx BD insert ip chksum */ +#define GRETH_TXD_TCPCS 0x80000 /* Tx BD insert tcp chksum */ +#define GRETH_TXD_UDPCS 0x100000 /* Tx BD insert udp chksum */ #define GRETH_TXD_UNDERRUN 0x4000 /* Tx BD Underrun Status */ #define GRETH_TXD_RETLIM 0x8000 /* Tx BD Retransmission Limit Status */ +#define GRETH_TXD_LATECOL 0x10000 /* Tx BD Late Collision */ + #define GRETH_TXD_STATS (GRETH_TXD_UNDERRUN | \ - GRETH_TXD_RETLIM) + GRETH_TXD_RETLIM | \ + GRETH_TXD_LATECOL) + +#define GRETH_TXD_CS (GRETH_TXD_IPCS | \ + GRETH_TXD_TCPCS | \ + GRETH_TXD_UDPCS) /* Rx BD */ #define GRETH_RXD_ENABLE 0x0800 /* Rx BD Enable */ @@ -56,6 +68,15 @@ typedef struct _greth_regs { #define GRETH_RXD_TOOLONG 0x8000 /* Rx BD Too Long Status */ #define GRETH_RXD_CRCERR 0x10000 /* Rx BD CRC Error Status */ #define GRETH_RXD_OVERRUN 0x20000 /* Rx BD Overrun Status */ +#define GRETH_RXD_LENERR 0x40000 /* Rx BD Length Error */ +#define GRETH_RXD_ID 0x40000 /* Rx BD IP Detected */ +#define GRETH_RXD_IR 0x40000 /* Rx BD IP Chksum Error */ +#define GRETH_RXD_UD 0x40000 /* Rx BD UDP Detected*/ +#define GRETH_RXD_UR 0x40000 /* Rx BD UDP Chksum Error */ +#define GRETH_RXD_TD 0x40000 /* Rx BD TCP Detected */ +#define GRETH_RXD_TR 0x40000 /* Rx BD TCP Chksum Error */ + + #define GRETH_RXD_STATS (GRETH_RXD_OVERRUN | \ GRETH_RXD_DRIBBLE | \ GRETH_RXD_TOOLONG | \ @@ -86,7 +107,22 @@ typedef struct _greth_regs { #define GRETH_MDIO_REGADR 0x000007C0 /* Register Address */ #define GRETH_MDIO_PHYADR 0x0000F800 /* PHY address */ #define GRETH_MDIO_DATA 0xFFFF0000 /* MDIO DATA */ - + + +/* MII registers */ +#define GRETH_MII_EXTADV_1000FD 0x00000200 +#define GRETH_MII_EXTADV_1000HD 0x00000100 +#define GRETH_MII_EXTPRT_1000FD 0x00000800 +#define GRETH_MII_EXTPRT_1000HD 0x00000400 + +#define GRETH_MII_100T4 0x00000200 +#define GRETH_MII_100TXFD 0x00000100 +#define GRETH_MII_100TXHD 0x00000080 +#define GRETH_MII_10FD 0x00000040 +#define GRETH_MII_10HD 0x00000020 + + + /* Attach routine */ int rtems_greth_driver_attach ( @@ -94,11 +130,25 @@ int rtems_greth_driver_attach ( greth_configuration_t *chip ); +/* PHY data */ +struct phy_device_info +{ + int vendor; + int device; + int rev; + + int adv; + int part; + + int extadv; + int extpart; +}; + /* #ifdef CPU_U32_FIX void ipalign(struct mbuf *m); #endif -*/ +*/ #endif |