Lines Matching refs:priv
108 struct bcm_sf2_priv *priv = ds_to_priv(ds); in bcm_sf2_sw_get_ethtool_stats() local
114 mutex_lock(&priv->stats_mutex); in bcm_sf2_sw_get_ethtool_stats()
123 val = core_readq(priv, offset); in bcm_sf2_sw_get_ethtool_stats()
125 val = core_readl(priv, offset); in bcm_sf2_sw_get_ethtool_stats()
130 mutex_unlock(&priv->stats_mutex); in bcm_sf2_sw_get_ethtool_stats()
145 struct bcm_sf2_priv *priv = ds_to_priv(ds); in bcm_sf2_imp_vlan_setup() local
153 for (i = 0; i < priv->hw_params.num_ports; i++) { in bcm_sf2_imp_vlan_setup()
157 reg = core_readl(priv, CORE_PORT_VLAN_CTL_PORT(i)); in bcm_sf2_imp_vlan_setup()
159 core_writel(priv, reg, CORE_PORT_VLAN_CTL_PORT(i)); in bcm_sf2_imp_vlan_setup()
165 struct bcm_sf2_priv *priv = ds_to_priv(ds); in bcm_sf2_imp_setup() local
169 reg = core_readl(priv, CORE_MEM_PSM_VDD_CTRL); in bcm_sf2_imp_setup()
171 core_writel(priv, reg, CORE_MEM_PSM_VDD_CTRL); in bcm_sf2_imp_setup()
174 reg = core_readl(priv, CORE_IMP_CTL); in bcm_sf2_imp_setup()
177 core_writel(priv, reg, CORE_IMP_CTL); in bcm_sf2_imp_setup()
180 core_writel(priv, SW_FWDG_EN, CORE_SWMODE); in bcm_sf2_imp_setup()
183 reg = core_readl(priv, CORE_SWITCH_CTRL); in bcm_sf2_imp_setup()
185 core_writel(priv, reg, CORE_SWITCH_CTRL); in bcm_sf2_imp_setup()
204 reg = core_readl(priv, CORE_BRCM_HDR_CTRL); in bcm_sf2_imp_setup()
206 core_writel(priv, reg, CORE_BRCM_HDR_CTRL); in bcm_sf2_imp_setup()
211 reg = core_readl(priv, CORE_BRCM_HDR_RX_DIS); in bcm_sf2_imp_setup()
213 core_writel(priv, reg, CORE_BRCM_HDR_RX_DIS); in bcm_sf2_imp_setup()
218 reg = core_readl(priv, CORE_BRCM_HDR_TX_DIS); in bcm_sf2_imp_setup()
220 core_writel(priv, reg, CORE_BRCM_HDR_TX_DIS); in bcm_sf2_imp_setup()
223 reg = core_readl(priv, CORE_STS_OVERRIDE_IMP); in bcm_sf2_imp_setup()
225 core_writel(priv, reg, CORE_STS_OVERRIDE_IMP); in bcm_sf2_imp_setup()
230 struct bcm_sf2_priv *priv = ds_to_priv(ds); in bcm_sf2_eee_enable_set() local
233 reg = core_readl(priv, CORE_EEE_EN_CTRL); in bcm_sf2_eee_enable_set()
238 core_writel(priv, reg, CORE_EEE_EN_CTRL); in bcm_sf2_eee_enable_set()
243 struct bcm_sf2_priv *priv = ds_to_priv(ds); in bcm_sf2_gphy_enable_set() local
246 reg = reg_readl(priv, REG_SPHY_CNTRL); in bcm_sf2_gphy_enable_set()
250 reg_writel(priv, reg, REG_SPHY_CNTRL); in bcm_sf2_gphy_enable_set()
252 reg = reg_readl(priv, REG_SPHY_CNTRL); in bcm_sf2_gphy_enable_set()
256 reg_writel(priv, reg, REG_SPHY_CNTRL); in bcm_sf2_gphy_enable_set()
260 reg_writel(priv, reg, REG_SPHY_CNTRL); in bcm_sf2_gphy_enable_set()
264 reg = reg_readl(priv, REG_LED_CNTRL(0)); in bcm_sf2_gphy_enable_set()
266 reg_writel(priv, reg, REG_LED_CNTRL(0)); in bcm_sf2_gphy_enable_set()
270 static inline void bcm_sf2_port_intr_enable(struct bcm_sf2_priv *priv, in bcm_sf2_port_intr_enable() argument
281 intrl2_0_mask_clear(priv, P_IRQ_MASK(P0_IRQ_OFF)); in bcm_sf2_port_intr_enable()
288 intrl2_1_mask_clear(priv, P_IRQ_MASK(off)); in bcm_sf2_port_intr_enable()
291 static inline void bcm_sf2_port_intr_disable(struct bcm_sf2_priv *priv, in bcm_sf2_port_intr_disable() argument
302 intrl2_0_mask_set(priv, P_IRQ_MASK(P0_IRQ_OFF)); in bcm_sf2_port_intr_disable()
303 intrl2_0_writel(priv, P_IRQ_MASK(P0_IRQ_OFF), INTRL2_CPU_CLEAR); in bcm_sf2_port_intr_disable()
310 intrl2_1_mask_set(priv, P_IRQ_MASK(off)); in bcm_sf2_port_intr_disable()
311 intrl2_1_writel(priv, P_IRQ_MASK(off), INTRL2_CPU_CLEAR); in bcm_sf2_port_intr_disable()
317 struct bcm_sf2_priv *priv = ds_to_priv(ds); in bcm_sf2_port_setup() local
322 reg = core_readl(priv, CORE_MEM_PSM_VDD_CTRL); in bcm_sf2_port_setup()
324 core_writel(priv, reg, CORE_MEM_PSM_VDD_CTRL); in bcm_sf2_port_setup()
327 core_writel(priv, 0, CORE_G_PCTL_PORT(port)); in bcm_sf2_port_setup()
330 if (priv->int_phy_mask & 1 << port && priv->hw_params.num_gphy == 1) { in bcm_sf2_port_setup()
348 if (port == priv->moca_port) in bcm_sf2_port_setup()
349 bcm_sf2_port_intr_enable(priv, port); in bcm_sf2_port_setup()
355 reg = core_readl(priv, CORE_PORT_VLAN_CTL_PORT(port)); in bcm_sf2_port_setup()
358 reg |= priv->port_sts[port].vlan_ctl_mask; in bcm_sf2_port_setup()
359 core_writel(priv, reg, CORE_PORT_VLAN_CTL_PORT(port)); in bcm_sf2_port_setup()
364 if (priv->port_sts[port].eee.eee_enabled) in bcm_sf2_port_setup()
373 struct bcm_sf2_priv *priv = ds_to_priv(ds); in bcm_sf2_port_disable() local
376 if (priv->wol_ports_mask & (1 << port)) in bcm_sf2_port_disable()
379 if (port == priv->moca_port) in bcm_sf2_port_disable()
380 bcm_sf2_port_intr_disable(priv, port); in bcm_sf2_port_disable()
382 if (priv->int_phy_mask & 1 << port && priv->hw_params.num_gphy == 1) in bcm_sf2_port_disable()
390 reg = core_readl(priv, off); in bcm_sf2_port_disable()
392 core_writel(priv, reg, off); in bcm_sf2_port_disable()
395 reg = core_readl(priv, CORE_MEM_PSM_VDD_CTRL); in bcm_sf2_port_disable()
397 core_writel(priv, reg, CORE_MEM_PSM_VDD_CTRL); in bcm_sf2_port_disable()
405 struct bcm_sf2_priv *priv = ds_to_priv(ds); in bcm_sf2_eee_init() local
406 struct ethtool_eee *p = &priv->port_sts[port].eee; in bcm_sf2_eee_init()
423 struct bcm_sf2_priv *priv = ds_to_priv(ds); in bcm_sf2_sw_get_eee() local
424 struct ethtool_eee *p = &priv->port_sts[port].eee; in bcm_sf2_sw_get_eee()
427 reg = core_readl(priv, CORE_EEE_LPI_INDICATE); in bcm_sf2_sw_get_eee()
438 struct bcm_sf2_priv *priv = ds_to_priv(ds); in bcm_sf2_sw_set_eee() local
439 struct ethtool_eee *p = &priv->port_sts[port].eee; in bcm_sf2_sw_set_eee()
459 struct bcm_sf2_priv *priv = ds_to_priv(ds); in bcm_sf2_sw_fast_age_port() local
463 core_writel(priv, port, CORE_FAST_AGE_PORT); in bcm_sf2_sw_fast_age_port()
465 reg = core_readl(priv, CORE_FAST_AGE_CTRL); in bcm_sf2_sw_fast_age_port()
467 core_writel(priv, reg, CORE_FAST_AGE_CTRL); in bcm_sf2_sw_fast_age_port()
470 reg = core_readl(priv, CORE_FAST_AGE_CTRL); in bcm_sf2_sw_fast_age_port()
480 core_writel(priv, 0, CORE_FAST_AGE_CTRL); in bcm_sf2_sw_fast_age_port()
488 struct bcm_sf2_priv *priv = ds_to_priv(ds); in bcm_sf2_sw_br_join() local
492 p_ctl = core_readl(priv, CORE_PORT_VLAN_CTL_PORT(port)); in bcm_sf2_sw_br_join()
494 for (i = 0; i < priv->hw_params.num_ports; i++) { in bcm_sf2_sw_br_join()
501 reg = core_readl(priv, CORE_PORT_VLAN_CTL_PORT(i)); in bcm_sf2_sw_br_join()
503 core_writel(priv, reg, CORE_PORT_VLAN_CTL_PORT(i)); in bcm_sf2_sw_br_join()
504 priv->port_sts[i].vlan_ctl_mask = reg; in bcm_sf2_sw_br_join()
512 core_writel(priv, p_ctl, CORE_PORT_VLAN_CTL_PORT(port)); in bcm_sf2_sw_br_join()
513 priv->port_sts[port].vlan_ctl_mask = p_ctl; in bcm_sf2_sw_br_join()
521 struct bcm_sf2_priv *priv = ds_to_priv(ds); in bcm_sf2_sw_br_leave() local
525 p_ctl = core_readl(priv, CORE_PORT_VLAN_CTL_PORT(port)); in bcm_sf2_sw_br_leave()
527 for (i = 0; i < priv->hw_params.num_ports; i++) { in bcm_sf2_sw_br_leave()
532 reg = core_readl(priv, CORE_PORT_VLAN_CTL_PORT(i)); in bcm_sf2_sw_br_leave()
534 core_writel(priv, reg, CORE_PORT_VLAN_CTL_PORT(i)); in bcm_sf2_sw_br_leave()
535 priv->port_sts[port].vlan_ctl_mask = reg; in bcm_sf2_sw_br_leave()
542 core_writel(priv, p_ctl, CORE_PORT_VLAN_CTL_PORT(port)); in bcm_sf2_sw_br_leave()
543 priv->port_sts[port].vlan_ctl_mask = p_ctl; in bcm_sf2_sw_br_leave()
551 struct bcm_sf2_priv *priv = ds_to_priv(ds); in bcm_sf2_sw_br_set_stp_state() local
556 reg = core_readl(priv, CORE_G_PCTL_PORT(port)); in bcm_sf2_sw_br_set_stp_state()
595 reg = core_readl(priv, CORE_G_PCTL_PORT(port)); in bcm_sf2_sw_br_set_stp_state()
598 core_writel(priv, reg, CORE_G_PCTL_PORT(port)); in bcm_sf2_sw_br_set_stp_state()
604 static int bcm_sf2_arl_op_wait(struct bcm_sf2_priv *priv) in bcm_sf2_arl_op_wait() argument
610 reg = core_readl(priv, CORE_ARLA_RWCTL); in bcm_sf2_arl_op_wait()
620 static int bcm_sf2_arl_rw_op(struct bcm_sf2_priv *priv, unsigned int op) in bcm_sf2_arl_rw_op() argument
627 cmd = core_readl(priv, CORE_ARLA_RWCTL); in bcm_sf2_arl_rw_op()
634 core_writel(priv, cmd, CORE_ARLA_RWCTL); in bcm_sf2_arl_rw_op()
636 return bcm_sf2_arl_op_wait(priv); in bcm_sf2_arl_rw_op()
639 static int bcm_sf2_arl_read(struct bcm_sf2_priv *priv, u64 mac, in bcm_sf2_arl_read() argument
646 ret = bcm_sf2_arl_op_wait(priv); in bcm_sf2_arl_read()
655 mac_vid = core_readq(priv, CORE_ARLA_MACVID_ENTRY(i)); in bcm_sf2_arl_read()
656 fwd_entry = core_readl(priv, CORE_ARLA_FWD_ENTRY(i)); in bcm_sf2_arl_read()
672 static int bcm_sf2_arl_op(struct bcm_sf2_priv *priv, int op, int port, in bcm_sf2_arl_op() argument
685 core_writeq(priv, mac, CORE_ARLA_MAC); in bcm_sf2_arl_op()
686 core_writel(priv, vid, CORE_ARLA_VID); in bcm_sf2_arl_op()
689 ret = bcm_sf2_arl_rw_op(priv, 1); in bcm_sf2_arl_op()
693 ret = bcm_sf2_arl_read(priv, mac, vid, &ent, &idx, is_valid); in bcm_sf2_arl_op()
712 core_writeq(priv, mac_vid, CORE_ARLA_MACVID_ENTRY(idx)); in bcm_sf2_arl_op()
713 core_writel(priv, fwd_entry, CORE_ARLA_FWD_ENTRY(idx)); in bcm_sf2_arl_op()
715 ret = bcm_sf2_arl_rw_op(priv, 0); in bcm_sf2_arl_op()
720 return bcm_sf2_arl_read(priv, mac, vid, &ent, &idx, is_valid); in bcm_sf2_arl_op()
735 struct bcm_sf2_priv *priv = ds_to_priv(ds); in bcm_sf2_sw_fdb_add() local
737 return bcm_sf2_arl_op(priv, 0, port, fdb->addr, fdb->vid, true); in bcm_sf2_sw_fdb_add()
743 struct bcm_sf2_priv *priv = ds_to_priv(ds); in bcm_sf2_sw_fdb_del() local
745 return bcm_sf2_arl_op(priv, 0, port, fdb->addr, fdb->vid, false); in bcm_sf2_sw_fdb_del()
748 static int bcm_sf2_arl_search_wait(struct bcm_sf2_priv *priv) in bcm_sf2_arl_search_wait() argument
754 reg = core_readl(priv, CORE_ARLA_SRCH_CTL); in bcm_sf2_arl_search_wait()
767 static void bcm_sf2_arl_search_rd(struct bcm_sf2_priv *priv, u8 idx, in bcm_sf2_arl_search_rd() argument
773 mac_vid = core_readq(priv, CORE_ARLA_SRCH_RSLT_MACVID(idx)); in bcm_sf2_arl_search_rd()
774 fwd_entry = core_readl(priv, CORE_ARLA_SRCH_RSLT(idx)); in bcm_sf2_arl_search_rd()
800 struct bcm_sf2_priv *priv = ds_to_priv(ds); in bcm_sf2_sw_fdb_dump() local
807 core_writel(priv, ARLA_SRCH_STDN, CORE_ARLA_SRCH_CTL); in bcm_sf2_sw_fdb_dump()
810 ret = bcm_sf2_arl_search_wait(priv); in bcm_sf2_sw_fdb_dump()
815 bcm_sf2_arl_search_rd(priv, 0, &results[0]); in bcm_sf2_sw_fdb_dump()
820 bcm_sf2_arl_search_rd(priv, 1, &results[1]); in bcm_sf2_sw_fdb_dump()
835 struct bcm_sf2_priv *priv = dev_id; in bcm_sf2_switch_0_isr() local
837 priv->irq0_stat = intrl2_0_readl(priv, INTRL2_CPU_STATUS) & in bcm_sf2_switch_0_isr()
838 ~priv->irq0_mask; in bcm_sf2_switch_0_isr()
839 intrl2_0_writel(priv, priv->irq0_stat, INTRL2_CPU_CLEAR); in bcm_sf2_switch_0_isr()
846 struct bcm_sf2_priv *priv = dev_id; in bcm_sf2_switch_1_isr() local
848 priv->irq1_stat = intrl2_1_readl(priv, INTRL2_CPU_STATUS) & in bcm_sf2_switch_1_isr()
849 ~priv->irq1_mask; in bcm_sf2_switch_1_isr()
850 intrl2_1_writel(priv, priv->irq1_stat, INTRL2_CPU_CLEAR); in bcm_sf2_switch_1_isr()
852 if (priv->irq1_stat & P_LINK_UP_IRQ(P7_IRQ_OFF)) in bcm_sf2_switch_1_isr()
853 priv->port_sts[7].link = 1; in bcm_sf2_switch_1_isr()
854 if (priv->irq1_stat & P_LINK_DOWN_IRQ(P7_IRQ_OFF)) in bcm_sf2_switch_1_isr()
855 priv->port_sts[7].link = 0; in bcm_sf2_switch_1_isr()
860 static int bcm_sf2_sw_rst(struct bcm_sf2_priv *priv) in bcm_sf2_sw_rst() argument
865 reg = core_readl(priv, CORE_WATCHDOG_CTRL); in bcm_sf2_sw_rst()
867 core_writel(priv, reg, CORE_WATCHDOG_CTRL); in bcm_sf2_sw_rst()
870 reg = core_readl(priv, CORE_WATCHDOG_CTRL); in bcm_sf2_sw_rst()
883 static void bcm_sf2_intr_disable(struct bcm_sf2_priv *priv) in bcm_sf2_intr_disable() argument
885 intrl2_0_writel(priv, 0xffffffff, INTRL2_CPU_MASK_SET); in bcm_sf2_intr_disable()
886 intrl2_0_writel(priv, 0xffffffff, INTRL2_CPU_CLEAR); in bcm_sf2_intr_disable()
887 intrl2_0_writel(priv, 0, INTRL2_CPU_MASK_CLEAR); in bcm_sf2_intr_disable()
888 intrl2_1_writel(priv, 0xffffffff, INTRL2_CPU_MASK_SET); in bcm_sf2_intr_disable()
889 intrl2_1_writel(priv, 0xffffffff, INTRL2_CPU_CLEAR); in bcm_sf2_intr_disable()
890 intrl2_1_writel(priv, 0, INTRL2_CPU_MASK_CLEAR); in bcm_sf2_intr_disable()
893 static void bcm_sf2_identify_ports(struct bcm_sf2_priv *priv, in bcm_sf2_identify_ports() argument
902 priv->moca_port = -1; in bcm_sf2_identify_ports()
921 priv->int_phy_mask |= 1 << port_num; in bcm_sf2_identify_ports()
925 priv->moca_port = port_num; in bcm_sf2_identify_ports()
932 struct bcm_sf2_priv *priv = ds_to_priv(ds); in bcm_sf2_sw_setup() local
940 spin_lock_init(&priv->indir_lock); in bcm_sf2_sw_setup()
941 mutex_init(&priv->stats_mutex); in bcm_sf2_sw_setup()
947 bcm_sf2_identify_ports(priv, ds->pd->of_node); in bcm_sf2_sw_setup()
949 priv->irq0 = irq_of_parse_and_map(dn, 0); in bcm_sf2_sw_setup()
950 priv->irq1 = irq_of_parse_and_map(dn, 1); in bcm_sf2_sw_setup()
952 base = &priv->core; in bcm_sf2_sw_setup()
963 ret = bcm_sf2_sw_rst(priv); in bcm_sf2_sw_setup()
970 bcm_sf2_intr_disable(priv); in bcm_sf2_sw_setup()
972 ret = request_irq(priv->irq0, bcm_sf2_switch_0_isr, 0, in bcm_sf2_sw_setup()
973 "switch_0", priv); in bcm_sf2_sw_setup()
979 ret = request_irq(priv->irq1, bcm_sf2_switch_1_isr, 0, in bcm_sf2_sw_setup()
980 "switch_1", priv); in bcm_sf2_sw_setup()
987 reg = core_readl(priv, CORE_GMNCFGCFG); in bcm_sf2_sw_setup()
989 core_writel(priv, reg, CORE_GMNCFGCFG); in bcm_sf2_sw_setup()
991 core_writel(priv, reg, CORE_GMNCFGCFG); in bcm_sf2_sw_setup()
994 priv->hw_params.num_ports = core_readl(priv, CORE_IMP0_PRT_ID) + 1; in bcm_sf2_sw_setup()
995 if (priv->hw_params.num_ports > DSA_MAX_PORTS) in bcm_sf2_sw_setup()
996 priv->hw_params.num_ports = DSA_MAX_PORTS; in bcm_sf2_sw_setup()
1000 &priv->hw_params.num_gphy)) in bcm_sf2_sw_setup()
1001 priv->hw_params.num_gphy = 1; in bcm_sf2_sw_setup()
1004 for (port = 0; port < priv->hw_params.num_ports; port++) { in bcm_sf2_sw_setup()
1030 rev = reg_readl(priv, REG_SWITCH_REVISION); in bcm_sf2_sw_setup()
1031 priv->hw_params.top_rev = (rev >> SWITCH_TOP_REV_SHIFT) & in bcm_sf2_sw_setup()
1033 priv->hw_params.core_rev = (rev & SF2_REV_MASK); in bcm_sf2_sw_setup()
1035 rev = reg_readl(priv, REG_PHY_REVISION); in bcm_sf2_sw_setup()
1036 priv->hw_params.gphy_rev = rev & PHY_REVISION_MASK; in bcm_sf2_sw_setup()
1039 priv->hw_params.top_rev >> 8, priv->hw_params.top_rev & 0xff, in bcm_sf2_sw_setup()
1040 priv->hw_params.core_rev >> 8, priv->hw_params.core_rev & 0xff, in bcm_sf2_sw_setup()
1041 priv->core, priv->irq0, priv->irq1); in bcm_sf2_sw_setup()
1046 free_irq(priv->irq0, priv); in bcm_sf2_sw_setup()
1048 base = &priv->core; in bcm_sf2_sw_setup()
1064 struct bcm_sf2_priv *priv = ds_to_priv(ds); in bcm_sf2_sw_get_phy_flags() local
1071 return priv->hw_params.gphy_rev; in bcm_sf2_sw_get_phy_flags()
1077 struct bcm_sf2_priv *priv = ds_to_priv(ds); in bcm_sf2_sw_indir_rw() local
1081 reg = reg_readl(priv, REG_SWITCH_CNTRL); in bcm_sf2_sw_indir_rw()
1083 reg_writel(priv, reg, REG_SWITCH_CNTRL); in bcm_sf2_sw_indir_rw()
1088 core_writel(priv, addr, reg); in bcm_sf2_sw_indir_rw()
1095 ret = core_readl(priv, reg); in bcm_sf2_sw_indir_rw()
1097 core_writel(priv, val, reg); in bcm_sf2_sw_indir_rw()
1099 reg = reg_readl(priv, REG_SWITCH_CNTRL); in bcm_sf2_sw_indir_rw()
1101 reg_writel(priv, reg, REG_SWITCH_CNTRL); in bcm_sf2_sw_indir_rw()
1139 struct bcm_sf2_priv *priv = ds_to_priv(ds); in bcm_sf2_sw_adjust_link() local
1168 reg = reg_readl(priv, REG_RGMII_CNTRL_P(port)); in bcm_sf2_sw_adjust_link()
1170 reg_writel(priv, reg, REG_RGMII_CNTRL_P(port)); in bcm_sf2_sw_adjust_link()
1177 reg = reg_readl(priv, REG_RGMII_CNTRL_P(port)); in bcm_sf2_sw_adjust_link()
1192 reg_writel(priv, reg, REG_RGMII_CNTRL_P(port)); in bcm_sf2_sw_adjust_link()
1213 core_writel(priv, reg, CORE_STS_OVERRIDE_GMIIP_PORT(port)); in bcm_sf2_sw_adjust_link()
1219 struct bcm_sf2_priv *priv = ds_to_priv(ds); in bcm_sf2_sw_fixed_link_update() local
1223 duplex = core_readl(priv, CORE_DUPSTS); in bcm_sf2_sw_fixed_link_update()
1224 pause = core_readl(priv, CORE_PAUSESTS); in bcm_sf2_sw_fixed_link_update()
1236 if (port == priv->moca_port) { in bcm_sf2_sw_fixed_link_update()
1237 status->link = priv->port_sts[port].link; in bcm_sf2_sw_fixed_link_update()
1251 reg = core_readl(priv, CORE_STS_OVERRIDE_GMIIP_PORT(port)); in bcm_sf2_sw_fixed_link_update()
1257 core_writel(priv, reg, CORE_STS_OVERRIDE_GMIIP_PORT(port)); in bcm_sf2_sw_fixed_link_update()
1271 struct bcm_sf2_priv *priv = ds_to_priv(ds); in bcm_sf2_sw_suspend() local
1274 bcm_sf2_intr_disable(priv); in bcm_sf2_sw_suspend()
1291 struct bcm_sf2_priv *priv = ds_to_priv(ds); in bcm_sf2_sw_resume() local
1295 ret = bcm_sf2_sw_rst(priv); in bcm_sf2_sw_resume()
1301 if (priv->hw_params.num_gphy == 1) in bcm_sf2_sw_resume()
1318 struct bcm_sf2_priv *priv = ds_to_priv(ds); in bcm_sf2_sw_get_wol() local
1331 if (priv->wol_ports_mask & (1 << port)) in bcm_sf2_sw_get_wol()
1341 struct bcm_sf2_priv *priv = ds_to_priv(ds); in bcm_sf2_sw_set_wol() local
1350 priv->wol_ports_mask |= (1 << port); in bcm_sf2_sw_set_wol()
1352 priv->wol_ports_mask &= ~(1 << port); in bcm_sf2_sw_set_wol()
1358 if (priv->wol_ports_mask && priv->wol_ports_mask != (1 << cpu_port)) in bcm_sf2_sw_set_wol()
1359 priv->wol_ports_mask |= (1 << cpu_port); in bcm_sf2_sw_set_wol()
1361 priv->wol_ports_mask &= ~(1 << cpu_port); in bcm_sf2_sw_set_wol()