Several small fixes for ar8216 driver (patch by Jonas Gorski)
[openwrt.git] / target / linux / generic-2.6 / files / drivers / net / phy / ar8216.h
index 741dce9..c1b8fdb 100644 (file)
 #define AR8216_NUM_VLANS       16
 
 #define AR8216_REG_CTRL                        0x0000
+#define   AR8216_CTRL_REVISION         BITS(0, 8)
+#define   AR8216_CTRL_REVISION_S       0
+#define   AR8216_CTRL_VERSION          BITS(8, 8)
+#define   AR8216_CTRL_VERSION_S                8
 #define   AR8216_CTRL_RESET            BIT(31)
 
 #define AR8216_REG_GLOBAL_CTRL         0x0030
@@ -73,8 +77,8 @@
 
 #define AR8216_PORT_OFFSET(_i)         (0x0100 * (_i + 1))
 #define AR8216_REG_PORT_STATUS(_i)     (AR8216_PORT_OFFSET(_i) + 0x0000)
-#define   AR8216_PORT_STATUS_SPEED     BIT(0)
-#define   AR8216_PORT_STATUS_SPEED_ERR BIT(1)
+#define   AR8216_PORT_STATUS_SPEED     BITS(0,2)
+#define   AR8216_PORT_STATUS_SPEED_S   0
 #define   AR8216_PORT_STATUS_TXMAC     BIT(2)
 #define   AR8216_PORT_STATUS_RXMAC     BIT(3)
 #define   AR8216_PORT_STATUS_TXFLOW    BIT(4)
 #define AR8216_REG_PORT_RATE(_i)       (AR8216_PORT_OFFSET(_i) + 0x000c)
 #define AR8216_REG_PORT_PRIO(_i)       (AR8216_PORT_OFFSET(_i) + 0x0010)
 
+/* port speed */
+enum {
+        AR8216_PORT_SPEED_10M = 0,
+        AR8216_PORT_SPEED_100M = 1,
+        AR8216_PORT_SPEED_1000M = 2,
+        AR8216_PORT_SPEED_ERR = 3,
+};
+
 /* ingress 802.1q mode */
 enum {
        AR8216_IN_PORT_ONLY = 0,
This page took 0.024725 seconds and 4 git commands to generate.