diff options
author | Vittorio Gambaletta <openwrt@vittgam.net> | 2017-03-26 10:08:20 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2017-12-13 14:59:03 +0100 |
commit | 7ccfa826eebfdc514e537ad25f75b76bb2554a60 (patch) | |
tree | 0be882cf5df91db60f12350f59b50ce1ea089e77 /target/linux/generic/files/drivers/net/phy/ar8327.h | |
parent | 0aafbf6c004879de08932dcb002aceb480a36580 (diff) | |
download | upstream-7ccfa826eebfdc514e537ad25f75b76bb2554a60.tar.gz upstream-7ccfa826eebfdc514e537ad25f75b76bb2554a60.tar.bz2 upstream-7ccfa826eebfdc514e537ad25f75b76bb2554a60.zip |
ar8327: Add workarounds for AR8337 switch.
RGMII RX delay setting needs to be always specified for AR8337 to
avoid port 5 RX hang on high traffic / flood conditions.
Also, the HOL registers that set per-port and per-packet-priority
buffer sizes are updated with the reduced values suggested by the
QCA switch team.
Finally, AR8327 reserved register fixups are disabled for the AR8337.
This patch is adapted from the Code Aurora QSDK, but with magic
values mapped to proper defines.
Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net>
(cherry picked from commit 967b6be118e3217e8d6a28df9c615d3255e7b1ae)
Diffstat (limited to 'target/linux/generic/files/drivers/net/phy/ar8327.h')
-rw-r--r-- | target/linux/generic/files/drivers/net/phy/ar8327.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/ar8327.h b/target/linux/generic/files/drivers/net/phy/ar8327.h index 7bce18bfb8..828dd28f38 100644 --- a/target/linux/generic/files/drivers/net/phy/ar8327.h +++ b/target/linux/generic/files/drivers/net/phy/ar8327.h @@ -272,7 +272,28 @@ #define AR8327_REG_PORT_PRIO(_i) (0x664 + (_i) * 0xc) +#define AR8327_REG_PORT_HOL_CTRL0(_i) (0x970 + (_i) * 0x8) +#define AR8327_PORT_HOL_CTRL0_EG_PRI0_BUF BITS(0, 4) +#define AR8327_PORT_HOL_CTRL0_EG_PRI0_BUF_S 0 +#define AR8327_PORT_HOL_CTRL0_EG_PRI1_BUF BITS(4, 4) +#define AR8327_PORT_HOL_CTRL0_EG_PRI1_BUF_S 4 +#define AR8327_PORT_HOL_CTRL0_EG_PRI2_BUF BITS(8, 4) +#define AR8327_PORT_HOL_CTRL0_EG_PRI2_BUF_S 8 +#define AR8327_PORT_HOL_CTRL0_EG_PRI3_BUF BITS(12, 4) +#define AR8327_PORT_HOL_CTRL0_EG_PRI3_BUF_S 12 +#define AR8327_PORT_HOL_CTRL0_EG_PRI4_BUF BITS(16, 4) +#define AR8327_PORT_HOL_CTRL0_EG_PRI4_BUF_S 16 +#define AR8327_PORT_HOL_CTRL0_EG_PRI5_BUF BITS(20, 4) +#define AR8327_PORT_HOL_CTRL0_EG_PRI5_BUF_S 20 +#define AR8327_PORT_HOL_CTRL0_EG_PORT_BUF BITS(24, 6) +#define AR8327_PORT_HOL_CTRL0_EG_PORT_BUF_S 24 + #define AR8327_REG_PORT_HOL_CTRL1(_i) (0x974 + (_i) * 0x8) +#define AR8327_PORT_HOL_CTRL1_ING_BUF BITS(0, 4) +#define AR8327_PORT_HOL_CTRL1_ING_BUF_S 0 +#define AR8327_PORT_HOL_CTRL1_EG_PRI_BUF_EN BIT(6) +#define AR8327_PORT_HOL_CTRL1_EG_PORT_BUF_EN BIT(7) +#define AR8327_PORT_HOL_CTRL1_WRED_EN BIT(8) #define AR8327_PORT_HOL_CTRL1_EG_MIRROR_EN BIT(16) #define AR8337_PAD_MAC06_EXCHANGE_EN BIT(31) |