Lines Matching +full:8 +full:- +full:port

1 /* SPDX-License-Identifier: GPL-2.0-only */
4 * Copyright (C) 2011-2012 Gabor Juhos <[email protected]>
45 #define QCA8K_MASK_CTRL_DEVICE_ID_MASK GENMASK(15, 8)
92 #define QCA8K_LED_COUNT ((QCA8K_NUM_PORTS - QCA8K_NUM_CPU_PORTS) * QCA8K_LED_PORT_COUNT)
97 #define QCA8K_LED_PHY123_PATTERN_EN_SHIFT(_phy, _led) ((((_phy) - 1) * 6) + 8 + (2 * (_led)))
121 #define QCA8K_LED_LINK_10M_EN_MASK BIT(8)
147 #define QCA8K_PORT_STATUS_LINK_UP BIT(8)
187 #define QCA8K_REG_PORT_VLAN_CTRL0(_i) (0x420 + (_i * 8))
192 #define QCA8K_REG_PORT_VLAN_CTRL1(_i) (0x424 + (_i * 8))
202 #define QCA8K_ATU_ADDR4_MASK GENMASK(15, 8)
206 #define QCA8K_ATU_ADDR0_MASK GENMASK(15, 8)
209 #define QCA8K_ATU_VID_MASK GENMASK(19, 8)
217 #define QCA8K_ATU_FUNC_PORT_MASK GENMASK(11, 8)
222 * It does contain VLAN_MODE for each port [5:4] for port0,
223 * [7:6] for port1 ... [17:16] for port6. Use virtual port
250 #define QCA8K_GLOBAL_FW_CTRL1_MC_DP_MASK GENMASK(14, 8)
254 #define QCA8K_PORT_LOOKUP_VLAN_MODE_MASK GENMASK(9, 8)
273 * 7th bit is to enable trunk port
275 #define QCA8K_REG_GOL_TRUNK_SHIFT(_i) ((_i) * 8)
280 /* 0x704 for TRUNK 0-1 --- 0x708 for TRUNK 2-3 */
287 /* Complex shift: FIRST shift for port THEN shift for trunk */
295 #define QCA8K_GLOBAL_FC_GOL_XOFF_THRES_MASK GENMASK(8, 0)
303 #define QCA8K_PORT_HOL_CTRL0_EG_PRI2_BUF_MASK GENMASK(11, 8)
319 #define QCA8K_PORT_HOL_CTRL1_WRED_EN BIT(8)
378 int (*autocast_mib)(struct dsa_switch *ds, int port, u64 *data);
404 refcount_t port_parsed; /* Counter to track parsed port */
428 int port; member
450 /* Each bit correspond to a port. This switch can support a max of 7 port.
451 * Bit 1: port enabled. Bit 0: port disabled.
486 static inline u32 qca8k_port_to_phy(int port) in qca8k_port_to_phy() argument
489 * Port 0 has no internal phy. in qca8k_port_to_phy()
490 * Port 1 has an internal PHY at MDIO address 0. in qca8k_port_to_phy()
491 * Port 2 has an internal PHY at MDIO address 1. in qca8k_port_to_phy()
493 * Port 5 has an internal PHY at MDIO address 4. in qca8k_port_to_phy()
494 * Port 6 has no internal PHY. in qca8k_port_to_phy()
497 return port - 1; in qca8k_port_to_phy()
504 void qca8k_port_set_status(struct qca8k_priv *priv, int port, int enable);
516 void qca8k_get_strings(struct dsa_switch *ds, int port, u32 stringset, uint8_t *data);
517 void qca8k_get_ethtool_stats(struct dsa_switch *ds, int port,
519 int qca8k_get_sset_count(struct dsa_switch *ds, int port, int sset);
522 int qca8k_set_mac_eee(struct dsa_switch *ds, int port, struct ethtool_keee *eee);
525 void qca8k_port_stp_state_set(struct dsa_switch *ds, int port, u8 state);
526 int qca8k_port_pre_bridge_flags(struct dsa_switch *ds, int port,
529 int qca8k_port_bridge_flags(struct dsa_switch *ds, int port,
532 int qca8k_port_bridge_join(struct dsa_switch *ds, int port,
536 void qca8k_port_bridge_leave(struct dsa_switch *ds, int port,
539 /* Common port enable/disable function */
540 int qca8k_port_enable(struct dsa_switch *ds, int port,
542 void qca8k_port_disable(struct dsa_switch *ds, int port);
545 int qca8k_port_change_mtu(struct dsa_switch *ds, int port, int new_mtu);
546 int qca8k_port_max_mtu(struct dsa_switch *ds, int port);
549 void qca8k_port_fast_age(struct dsa_switch *ds, int port);
555 int qca8k_port_fdb_add(struct dsa_switch *ds, int port,
558 int qca8k_port_fdb_del(struct dsa_switch *ds, int port,
561 int qca8k_port_fdb_dump(struct dsa_switch *ds, int port,
565 int qca8k_port_mdb_add(struct dsa_switch *ds, int port,
568 int qca8k_port_mdb_del(struct dsa_switch *ds, int port,
572 /* Common port mirror function */
573 int qca8k_port_mirror_add(struct dsa_switch *ds, int port,
576 void qca8k_port_mirror_del(struct dsa_switch *ds, int port,
579 /* Common port VLAN function */
580 int qca8k_port_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering,
582 int qca8k_port_vlan_add(struct dsa_switch *ds, int port,
585 int qca8k_port_vlan_del(struct dsa_switch *ds, int port,
588 /* Common port LAG function */
589 int qca8k_port_lag_join(struct dsa_switch *ds, int port, struct dsa_lag lag,
592 int qca8k_port_lag_leave(struct dsa_switch *ds, int port,