]> bbs.cooldavid.org Git - jme.git/blobdiff - jme.h
jme: Add interface to access extra PHY registers
[jme.git] / jme.h
diff --git a/jme.h b/jme.h
index 2a466bccade6d582ad18379b72e34b320f09c688..c27a34216d0c069835ac3d0204da8ead1bd99c3e 100644 (file)
--- a/jme.h
+++ b/jme.h
@@ -605,7 +605,7 @@ enum jme_flags_bits {
 };
 
 #define TX_TIMEOUT             (5 * HZ)
-#define JME_REG_LEN            0x500
+#define JME_REG_LEN            0x600
 #define MAX_ETHERNET_JUMBO_PACKET_SIZE 9216
 
 #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,23)
@@ -956,6 +956,7 @@ static inline u32 smi_phy_addr(int x)
 
 #define JME_PHY_TIMEOUT 100 /* 100 msec */
 #define JME_PHY_REG_NR 32
+#define JME_PHY_SPEC_REG_NR 128
 
 /*
  * Global Host Control
@@ -1380,6 +1381,18 @@ enum jme_phy_reg17_vals {
 
 #define BMSR_ANCOMP               0x0020
 
+/*
+ * For extended PHY register interface
+ */
+enum jme_phy_spec_regs {
+       JME_PHY_SPEC_ADDR_REG   = 0x1E,
+       JME_PHY_SPEC_DATA_REG   = 0x1F,
+};
+enum jme_phy_spec_addr_bits {
+       JME_PHY_SPEC_REG_READ   = 0x4000u,
+       JME_PHY_SPEC_REG_WRITE  = 0x8000u,
+};
+
 /*
  * Workaround
  */