+
+ if (chip_is_ar8337(priv)) {
+ /* Update HOL registers with values suggested by QCA switch team */
+ for (i = 0; i < AR8327_NUM_PORTS; i++) {
+ if (i == AR8216_PORT_CPU || i == 5 || i == 6) {
+ t = 0x3 << AR8327_PORT_HOL_CTRL0_EG_PRI0_BUF_S;
+ t |= 0x4 << AR8327_PORT_HOL_CTRL0_EG_PRI1_BUF_S;
+ t |= 0x4 << AR8327_PORT_HOL_CTRL0_EG_PRI2_BUF_S;
+ t |= 0x4 << AR8327_PORT_HOL_CTRL0_EG_PRI3_BUF_S;
+ t |= 0x6 << AR8327_PORT_HOL_CTRL0_EG_PRI4_BUF_S;
+ t |= 0x8 << AR8327_PORT_HOL_CTRL0_EG_PRI5_BUF_S;
+ t |= 0x1e << AR8327_PORT_HOL_CTRL0_EG_PORT_BUF_S;
+ } else {
+ t = 0x3 << AR8327_PORT_HOL_CTRL0_EG_PRI0_BUF_S;
+ t |= 0x4 << AR8327_PORT_HOL_CTRL0_EG_PRI1_BUF_S;
+ t |= 0x6 << AR8327_PORT_HOL_CTRL0_EG_PRI2_BUF_S;
+ t |= 0x8 << AR8327_PORT_HOL_CTRL0_EG_PRI3_BUF_S;
+ t |= 0x19 << AR8327_PORT_HOL_CTRL0_EG_PORT_BUF_S;
+ }
+ ar8xxx_write(priv, AR8327_REG_PORT_HOL_CTRL0(i), t);
+
+ t = 0x6 << AR8327_PORT_HOL_CTRL1_ING_BUF_S;
+ t |= AR8327_PORT_HOL_CTRL1_EG_PRI_BUF_EN;
+ t |= AR8327_PORT_HOL_CTRL1_EG_PORT_BUF_EN;
+ t |= AR8327_PORT_HOL_CTRL1_WRED_EN;
+ ar8xxx_rmw(priv, AR8327_REG_PORT_HOL_CTRL1(i),
+ AR8327_PORT_HOL_CTRL1_ING_BUF |
+ AR8327_PORT_HOL_CTRL1_EG_PRI_BUF_EN |
+ AR8327_PORT_HOL_CTRL1_EG_PORT_BUF_EN |
+ AR8327_PORT_HOL_CTRL1_WRED_EN,
+ t);
+ }
+ }