ar8216: add swconfig attribute to display ARL table on AR8327/AR8337
[librecmc/librecmc.git] / target / linux / generic / files / drivers / net / phy / ar8327.h
index c606972a04ed724cc41b092ddff9eb483876f015..29eeb6271d15bf5254bd3aa74840fe7e28081dc9 100644 (file)
@@ -84,6 +84,8 @@
 #define   AR8327_MAX_FRAME_SIZE_MTU            BITS(0, 14)
 
 #define AR8327_REG_PORT_STATUS(_i)             (0x07c + (_i) * 4)
+#define   AR8327_PORT_STATUS_TXFLOW_AUTO       BIT(10)
+#define   AR8327_PORT_STATUS_RXFLOW_AUTO       BIT(11)
 
 #define AR8327_REG_HEADER_CTRL                 0x098
 #define AR8327_REG_PORT_HEADER(_i)             (0x09c + (_i) * 4)
 #define   AR8327_PORT_VLAN1_OUT_MODE_UNTOUCH   3
 
 #define AR8327_REG_ATU_DATA0                   0x600
+#define   AR8327_ATU_ADDR0                     BITS(0, 8)
+#define   AR8327_ATU_ADDR0_S                   0
+#define   AR8327_ATU_ADDR1                     BITS(8, 8)
+#define   AR8327_ATU_ADDR1_S                   8
+#define   AR8327_ATU_ADDR2                     BITS(16, 8)
+#define   AR8327_ATU_ADDR2_S                   16
+#define   AR8327_ATU_ADDR3                     BITS(24, 8)
+#define   AR8327_ATU_ADDR3_S                   24
 #define AR8327_REG_ATU_DATA1                   0x604
+#define   AR8327_ATU_ADDR4                     BITS(0, 8)
+#define   AR8327_ATU_ADDR4_S                   0
+#define   AR8327_ATU_ADDR5                     BITS(8, 8)
+#define   AR8327_ATU_ADDR5_S                   8
+#define   AR8327_ATU_PORTS                     BITS(16, 7)
+#define   AR8327_ATU_PORT0                     BIT(16)
+#define   AR8327_ATU_PORT1                     BIT(17)
+#define   AR8327_ATU_PORT2                     BIT(18)
+#define   AR8327_ATU_PORT3                     BIT(19)
+#define   AR8327_ATU_PORT4                     BIT(20)
+#define   AR8327_ATU_PORT5                     BIT(21)
+#define   AR8327_ATU_PORT6                     BIT(22)
 #define AR8327_REG_ATU_DATA2                   0x608
+#define   AR8327_ATU_STATUS                    BITS(0, 4)
 
 #define AR8327_REG_ATU_FUNC                    0x60c
 #define   AR8327_ATU_FUNC_OP                   BITS(0, 4)
@@ -219,6 +242,9 @@ struct ar8327_data {
 
        struct ar8327_led **leds;
        unsigned int num_leds;
+
+       /* all fields below are cleared on reset */
+       bool eee[AR8XXX_NUM_PHYS];
 };
 
 #endif