summaryrefslogtreecommitdiff
path: root/drivers/net/fec.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/fec.h')
-rw-r--r--drivers/net/fec.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/drivers/net/fec.h b/drivers/net/fec.h
index 5f04d4c00c4f..d20d71eff12c 100644
--- a/drivers/net/fec.h
+++ b/drivers/net/fec.h
@@ -12,6 +12,8 @@
#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) || \
@@ -47,6 +49,15 @@
#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
#define FEC_ECNTRL 0x000 /* Ethernet control reg */
@@ -77,7 +88,6 @@
#endif /* CONFIG_M5272 */
-
/*
* Define the buffer descriptor structure.
*/
@@ -86,7 +96,15 @@ 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 */
@@ -128,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)
@@ -145,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 */