Vitaly Bordug | 5b4b845 | 2006-08-14 23:00:30 -0700 | [diff] [blame] | 1 | #ifndef FS_ENET_FEC_H |
| 2 | #define FS_ENET_FEC_H |
| 3 | |
| 4 | /* CRC polynomium used by the FEC for the multicast group filtering */ |
| 5 | #define FEC_CRC_POLY 0x04C11DB7 |
| 6 | |
| 7 | #define FEC_MAX_MULTICAST_ADDRS 64 |
| 8 | |
| 9 | /* Interrupt events/masks. |
| 10 | */ |
| 11 | #define FEC_ENET_HBERR 0x80000000U /* Heartbeat error */ |
| 12 | #define FEC_ENET_BABR 0x40000000U /* Babbling receiver */ |
| 13 | #define FEC_ENET_BABT 0x20000000U /* Babbling transmitter */ |
| 14 | #define FEC_ENET_GRA 0x10000000U /* Graceful stop complete */ |
| 15 | #define FEC_ENET_TXF 0x08000000U /* Full frame transmitted */ |
| 16 | #define FEC_ENET_TXB 0x04000000U /* A buffer was transmitted */ |
| 17 | #define FEC_ENET_RXF 0x02000000U /* Full frame received */ |
| 18 | #define FEC_ENET_RXB 0x01000000U /* A buffer was received */ |
| 19 | #define FEC_ENET_MII 0x00800000U /* MII interrupt */ |
| 20 | #define FEC_ENET_EBERR 0x00400000U /* SDMA bus error */ |
| 21 | |
| 22 | #define FEC_ECNTRL_PINMUX 0x00000004 |
| 23 | #define FEC_ECNTRL_ETHER_EN 0x00000002 |
| 24 | #define FEC_ECNTRL_RESET 0x00000001 |
| 25 | |
Vladimir Ermakov | ba56833 | 2012-03-17 13:10:50 +0000 | [diff] [blame] | 26 | /* RMII mode enabled only when MII_MODE bit is set too. */ |
| 27 | #define FEC_RCNTRL_RMII_MODE (0x00000100 | \ |
| 28 | FEC_RCNTRL_MII_MODE | FEC_RCNTRL_FCE) |
| 29 | #define FEC_RCNTRL_FCE 0x00000020 |
Vitaly Bordug | 5b4b845 | 2006-08-14 23:00:30 -0700 | [diff] [blame] | 30 | #define FEC_RCNTRL_BC_REJ 0x00000010 |
| 31 | #define FEC_RCNTRL_PROM 0x00000008 |
| 32 | #define FEC_RCNTRL_MII_MODE 0x00000004 |
| 33 | #define FEC_RCNTRL_DRT 0x00000002 |
| 34 | #define FEC_RCNTRL_LOOP 0x00000001 |
| 35 | |
| 36 | #define FEC_TCNTRL_FDEN 0x00000004 |
| 37 | #define FEC_TCNTRL_HBC 0x00000002 |
| 38 | #define FEC_TCNTRL_GTS 0x00000001 |
| 39 | |
Vitaly Bordug | 5b4b845 | 2006-08-14 23:00:30 -0700 | [diff] [blame] | 40 | /* |
| 41 | * Delay to wait for FEC reset command to complete (in us) |
| 42 | */ |
| 43 | #define FEC_RESET_DELAY 50 |
| 44 | #endif |