ar8216: add reading ARL table for AR8216/AR8236/AR8316
[openwrt/svn-archive/archive.git] / target / linux / generic / files / drivers / net / phy / ar8216.h
index 0f53f23f6e7ec140ee2e89eaffe9549dcec34178..934a8b5cc175a3b9ccd6e69f914671ded68b08f5 100644 (file)
@@ -79,7 +79,7 @@
 #define   AR8236_VTUDATA_MEMBER                BITS(0, 7)
 #define   AR8216_VTUDATA_VALID         BIT(11)
 
-#define AR8216_REG_ATU                 0x0050
+#define AR8216_REG_ATU_FUNC0           0x0050
 #define   AR8216_ATU_OP                        BITS(0, 3)
 #define   AR8216_ATU_OP_NOOP           0x0
 #define   AR8216_ATU_OP_FLUSH          0x1
 #define   AR8216_ATU_ACTIVE            BIT(3)
 #define   AR8216_ATU_PORT_NUM          BITS(8, 4)
 #define   AR8216_ATU_FULL_VIO          BIT(12)
-#define   AR8216_ATU_ADDR4             BITS(16, 8)
-#define   AR8216_ATU_ADDR5             BITS(24, 8)
+#define   AR8216_ATU_ADDR5             BITS(16, 8)
+#define   AR8216_ATU_ADDR5_S           16
+#define   AR8216_ATU_ADDR4             BITS(24, 8)
+#define   AR8216_ATU_ADDR4_S           24
 
-#define AR8216_REG_ATU_DATA            0x0054
+#define AR8216_REG_ATU_FUNC1           0x0054
 #define   AR8216_ATU_ADDR3             BITS(0, 8)
+#define   AR8216_ATU_ADDR3_S           0
 #define   AR8216_ATU_ADDR2             BITS(8, 8)
+#define   AR8216_ATU_ADDR2_S           8
 #define   AR8216_ATU_ADDR1             BITS(16, 8)
+#define   AR8216_ATU_ADDR1_S           16
 #define   AR8216_ATU_ADDR0             BITS(24, 8)
+#define   AR8216_ATU_ADDR0_S           24
+
+#define AR8216_REG_ATU_FUNC2           0x0058
+#define   AR8216_ATU_PORTS             BITS(0, 6)
+#define   AR8216_ATU_PORT0             BIT(0)
+#define   AR8216_ATU_PORT1             BIT(1)
+#define   AR8216_ATU_PORT2             BIT(2)
+#define   AR8216_ATU_PORT3             BIT(3)
+#define   AR8216_ATU_PORT4             BIT(4)
+#define   AR8216_ATU_PORT5             BIT(5)
+#define   AR8216_ATU_STATUS            BITS(16, 4)
+#define   AR8216_ATU_STATUS_S          16
 
 #define AR8216_REG_ATU_CTRL            0x005C
 #define   AR8216_ATU_CTRL_AGE_EN       BIT(17)