aboutsummaryrefslogtreecommitdiffstats
path: root/firmware/x300/include/xge_mac.h
diff options
context:
space:
mode:
authorBen Hilburn <ben.hilburn@ettus.com>2014-02-04 11:04:07 -0800
committerBen Hilburn <ben.hilburn@ettus.com>2014-02-04 11:04:07 -0800
commit178ac3f1c9950d383c8f64b3df464c0f943c4a23 (patch)
tree318ed621a7b59b7d34d4ce6e4a92f73f0bcef509 /firmware/x300/include/xge_mac.h
parent2718ac110fa931cc29daf7cb3dc5ab6230ee02ab (diff)
downloaduhd-178ac3f1c9950d383c8f64b3df464c0f943c4a23.tar.gz
uhd-178ac3f1c9950d383c8f64b3df464c0f943c4a23.tar.bz2
uhd-178ac3f1c9950d383c8f64b3df464c0f943c4a23.zip
Merging USRP X300 and X310 support!!
Diffstat (limited to 'firmware/x300/include/xge_mac.h')
-rw-r--r--firmware/x300/include/xge_mac.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/firmware/x300/include/xge_mac.h b/firmware/x300/include/xge_mac.h
new file mode 100644
index 000000000..d288bdd8d
--- /dev/null
+++ b/firmware/x300/include/xge_mac.h
@@ -0,0 +1,37 @@
+
+#ifndef INCLUDED_XGE_MAC_H
+#define INCLUDED_XGE_MAC_H
+
+#define HAVE_OPENCORES_XGEMAC 1
+
+#ifdef HAVE_OPENCORES_XGEMAC
+#define XGE_TX_ENABLE (1 << 0) // Set to enable transmission.
+// Interupt register bits.
+#define XGE_RX_FRAG_ERR (1 << 8)
+#define XGE_RX_CRC_ERR (1 << 7)
+#define XGE_RX_PAUSE (1 << 6)
+#define XGE_REMOTE_FAULT (1 << 5)
+#define XGE_LOCAL_FAULT (1 << 4)
+#define XGE_RX_UNDERFLOW (1 << 3)
+#define XGE_RX_OVERFLOW (1 << 2)
+#define XGE_TX_UNDERFLOW (1 << 1)
+#define XGE_TX_OVERFLOW (1 << 0)
+#endif
+
+// MDIO OP
+#define XGE_MDIO_CLAUSE(n) ((n & 0x1) << 12)
+#define CLAUSE45 1
+#define CLAUSE22 0
+#define XGE_MDIO_OP(n) ((n & 0x3) << 10)
+#define MDIO_ADDRESS 0
+#define MDIO_WRITE 1
+#define MDIO_READ 3
+#define MDIO_C22_WRITE 2
+#define MDIO_C22_READ 1
+#define MDIO_READ_POST 2
+#define XGE_MDIO_ADDR(n) ((n & 0x1f) << 5)
+#define XGE_MDIO_MMD(n) ((n & 0x1f) << 0)
+
+#endif
+
+