summaryrefslogtreecommitdiffstats
path: root/target/linux/generic-2.6/files/drivers/net/phy/ar8216.h
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2010-04-05 23:03:16 +0000
committerJo-Philipp Wich <jow@openwrt.org>2010-04-05 23:03:16 +0000
commit23bebe33a7b79bd6e639386f6c5e30595cb0fc33 (patch)
tree0238bbd183d4418b81466128c06fa4745330c3a5 /target/linux/generic-2.6/files/drivers/net/phy/ar8216.h
parent22e3bd0d8b95ca6db63e0370d88433b61d0f370b (diff)
downloadmaster-31e0f0ae-23bebe33a7b79bd6e639386f6c5e30595cb0fc33.tar.gz
master-31e0f0ae-23bebe33a7b79bd6e639386f6c5e30595cb0fc33.tar.bz2
master-31e0f0ae-23bebe33a7b79bd6e639386f6c5e30595cb0fc33.zip
Add support for the ar8316 switch. This patch enhances the ar8216 driver with ar8316 support and fixes some minor issues with the ar8216 driver itself. It should not break anything, but isn't tested on ar8216 devices.
[PATCH 2/2] ar71xx: Add the ar8316 driver to rs pro/rb-450g. Add the ar8216 driver to the ar71xx target, and add network configurations for the RouterStation Pro and the RouterBoard RB-450G. SVN-Revision: 20722
Diffstat (limited to 'target/linux/generic-2.6/files/drivers/net/phy/ar8216.h')
-rw-r--r--target/linux/generic-2.6/files/drivers/net/phy/ar8216.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/target/linux/generic-2.6/files/drivers/net/phy/ar8216.h b/target/linux/generic-2.6/files/drivers/net/phy/ar8216.h
index 0ba79fb3cd..5a8fa3c003 100644
--- a/target/linux/generic-2.6/files/drivers/net/phy/ar8216.h
+++ b/target/linux/generic-2.6/files/drivers/net/phy/ar8216.h
@@ -22,6 +22,11 @@
#define AR8216_PORT_CPU 0
#define AR8216_NUM_PORTS 6
#define AR8216_NUM_VLANS 16
+#define AR8316_NUM_VLANS 4096
+
+/* Atheros specific MII registers */
+#define MII_ATH_DBG_ADDR 0x1d
+#define MII_ATH_DBG_DATA 0x1e
#define AR8216_REG_CTRL 0x0000
#define AR8216_CTRL_REVISION BITS(0, 8)
@@ -30,8 +35,13 @@
#define AR8216_CTRL_VERSION_S 8
#define AR8216_CTRL_RESET BIT(31)
+#define AR8216_REG_FLOOD_MASK 0x002C
+#define AR8216_FM_UNI_DEST_PORTS BITS(0, 6)
+#define AR8216_FM_MULTI_DEST_PORTS BITS(16, 6)
+
#define AR8216_REG_GLOBAL_CTRL 0x0030
#define AR8216_GCTRL_MTU BITS(0, 11)
+#define AR8316_GCTRL_MTU BITS(0, 14)
#define AR8216_REG_VTU 0x0040
#define AR8216_VTU_OP BITS(0, 3)
@@ -75,6 +85,11 @@
#define AR8216_ATU_ADDR1 BITS(16, 8)
#define AR8216_ATU_ADDR0 BITS(24, 8)
+#define AR8216_REG_ATU_CTRL 0x005C
+#define AR8216_ATU_CTRL_AGE_EN BIT(17)
+#define AR8216_ATU_CTRL_AGE_TIME BITS(0, 16)
+#define AR8216_ATU_CTRL_AGE_TIME_S 0
+
#define AR8216_PORT_OFFSET(_i) (0x0100 * (_i + 1))
#define AR8216_REG_PORT_STATUS(_i) (AR8216_PORT_OFFSET(_i) + 0x0000)
#define AR8216_PORT_STATUS_SPEED BITS(0,2)
@@ -162,4 +177,11 @@ enum {
AR8216_PORT_STATE_FORWARD = 4
};
+/* device */
+enum {
+ UNKNOWN = 0,
+ AR8216 = 8216,
+ AR8316 = 8316
+};
+
#endif