diff options
Diffstat (limited to 'drivers/net/fec.h')
-rw-r--r-- | drivers/net/fec.h | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/drivers/net/fec.h b/drivers/net/fec.h index cc47f3f057c7..d20d71eff12c 100644 --- a/drivers/net/fec.h +++ b/drivers/net/fec.h @@ -12,9 +12,12 @@ #ifndef FEC_H #define FEC_H /****************************************************************************/ +#include <linux/netdevice.h> +#include <linux/etherdevice.h> #if defined(CONFIG_M523x) || defined(CONFIG_M527x) || defined(CONFIG_M528x) || \ - defined(CONFIG_M520x) || defined(CONFIG_M532x) || defined(CONFIG_ARCH_MXC) + defined(CONFIG_M520x) || defined(CONFIG_M532x) || \ + defined(CONFIG_ARCH_MXC) || defined(CONFIG_ARCH_MXS) /* * Just figures, Motorola would have to change the offsets for * registers in the same peripheral device on different models @@ -43,6 +46,17 @@ #define FEC_R_DES_START 0x180 /* Receive descriptor ring */ #define FEC_X_DES_START 0x184 /* Transmit descriptor ring */ #define FEC_R_BUFF_SIZE 0x188 /* Maximum receive buff size */ +#define FEC_MIIGSK_CFGR 0x300 /* MIIGSK config register */ +#define FEC_MIIGSK_ENR 0x308 /* MIIGSK enable register */ + +/* Define the FEC 1588 registers offset */ +#define FEC_ATIME_CTRL 0x400 +#define FEC_ATIME 0x404 +#define FEC_ATIME_EVT_OFFSET 0x408 +#define FEC_ATIME_EVT_PERIOD 0x40c +#define FEC_ATIME_CORR 0x410 +#define FEC_ATIME_INC 0x414 +#define FEC_TS_TIMESTAMP 0x418 #else @@ -69,19 +83,28 @@ #define FEC_X_DES_START 0x3d4 /* Transmit descriptor ring */ #define FEC_R_BUFF_SIZE 0x3d8 /* Maximum receive buff size */ #define FEC_FIFO_RAM 0x400 /* FIFO RAM buffer */ +#define FEC_MIIGSK_CFGR 0x000 /* MIIGSK config register */ +#define FEC_MIIGSK_ENR 0x000 /* MIIGSK enable register */ #endif /* CONFIG_M5272 */ - /* * Define the buffer descriptor structure. */ -#ifdef CONFIG_ARCH_MXC +#if defined(CONFIG_ARCH_MXC) || defined(CONFIG_ARCH_MXS) struct bufdesc { unsigned short cbd_datlen; /* Data length */ unsigned short cbd_sc; /* Control and status info */ unsigned long cbd_bufaddr; /* Buffer address */ +#ifdef CONFIG_FEC_1588 + unsigned long cbd_esc; + unsigned long cbd_prot; + unsigned long cbd_bdu; + unsigned long ts; + unsigned short res0[4]; +#endif }; + #else struct bufdesc { unsigned short cbd_sc; /* Control and status info */ @@ -123,6 +146,8 @@ struct bufdesc { #define BD_ENET_RX_CL ((ushort)0x0001) #define BD_ENET_RX_STATS ((ushort)0x013f) /* All status bits */ +#define BD_ENET_RX_INT 0x00800000 + /* Buffer descriptor control/status used by Ethernet transmit. */ #define BD_ENET_TX_READY ((ushort)0x8000) @@ -140,6 +165,7 @@ struct bufdesc { #define BD_ENET_TX_CSL ((ushort)0x0001) #define BD_ENET_TX_STATS ((ushort)0x03ff) /* All status bits */ +#define BD_ENET_TX_INT 0x40000000 /****************************************************************************/ #endif /* FEC_H */ |