Lines Matching refs:vsc8531
507 struct vsc8531_private *vsc8531 = phydev->priv; in vsc85xx_ptp_cmp_init() local
508 bool base = phydev->mdio.addr == vsc8531->ts_base_addr; in vsc85xx_ptp_cmp_init()
541 struct vsc8531_private *vsc8531 = phydev->priv; in vsc85xx_eth_cmp1_init() local
542 bool base = phydev->mdio.addr == vsc8531->ts_base_addr; in vsc85xx_eth_cmp1_init()
573 struct vsc8531_private *vsc8531 = phydev->priv; in vsc85xx_ip_cmp1_init() local
574 bool base = phydev->mdio.addr == vsc8531->ts_base_addr; in vsc85xx_ip_cmp1_init()
884 struct vsc8531_private *vsc8531 = phydev->priv; in vsc85xx_eth1_conf() local
887 if (vsc8531->ptp->rx_filter == HWTSTAMP_FILTER_PTP_V2_L2_EVENT) { in vsc85xx_eth1_conf()
962 struct vsc8531_private *vsc8531 = phydev->priv; in vsc85xx_ts_engine_init() local
963 bool ptp_l4, base = phydev->mdio.addr == vsc8531->ts_base_addr; in vsc85xx_ts_engine_init()
967 ptp_l4 = vsc8531->ptp->rx_filter == HWTSTAMP_FILTER_PTP_V2_L4_EVENT; in vsc85xx_ts_engine_init()
977 if (vsc8531->ptp->rx_filter == HWTSTAMP_FILTER_PTP_V2_L2_EVENT) { in vsc85xx_ts_engine_init()
997 vsc8531->ptp->rx_filter != HWTSTAMP_FILTER_NONE); in vsc85xx_ts_engine_init()
999 ptp_l4 && vsc8531->ptp->rx_filter != HWTSTAMP_FILTER_NONE); in vsc85xx_ts_engine_init()
1001 vsc8531->ptp->rx_filter != HWTSTAMP_FILTER_NONE); in vsc85xx_ts_engine_init()
1004 vsc8531->ptp->tx_type != HWTSTAMP_TX_OFF); in vsc85xx_ts_engine_init()
1006 ptp_l4 && vsc8531->ptp->tx_type != HWTSTAMP_TX_OFF); in vsc85xx_ts_engine_init()
1008 vsc8531->ptp->tx_type != HWTSTAMP_TX_OFF); in vsc85xx_ts_engine_init()
1011 if (vsc8531->ptp->tx_type != HWTSTAMP_TX_OFF) in vsc85xx_ts_engine_init()
1015 if (vsc8531->ptp->rx_filter != HWTSTAMP_FILTER_NONE) in vsc85xx_ts_engine_init()
1052 struct vsc8531_private *vsc8531 = in vsc85xx_hwtstamp() local
1054 struct phy_device *phydev = vsc8531->ptp->phydev; in vsc85xx_hwtstamp()
1070 vsc8531->ptp->tx_type = cfg->tx_type; in vsc85xx_hwtstamp()
1085 vsc8531->ptp->rx_filter = cfg->rx_filter; in vsc85xx_hwtstamp()
1087 mutex_lock(&vsc8531->ts_lock); in vsc85xx_hwtstamp()
1089 __skb_queue_purge(&vsc8531->ptp->tx_queue); in vsc85xx_hwtstamp()
1090 __skb_queue_head_init(&vsc8531->ptp->tx_queue); in vsc85xx_hwtstamp()
1107 if (vsc8531->ptp->tx_type == HWTSTAMP_TX_OFF) in vsc85xx_hwtstamp()
1109 if (vsc8531->ptp->rx_filter == HWTSTAMP_FILTER_NONE) in vsc85xx_hwtstamp()
1130 vsc8531->ptp->configured = 1; in vsc85xx_hwtstamp()
1131 mutex_unlock(&vsc8531->ts_lock); in vsc85xx_hwtstamp()
1139 struct vsc8531_private *vsc8531 = in vsc85xx_ts_info() local
1142 info->phc_index = ptp_clock_index(vsc8531->ptp->ptp_clock); in vsc85xx_ts_info()
1162 struct vsc8531_private *vsc8531 = in vsc85xx_txtstamp() local
1165 if (!vsc8531->ptp->configured) in vsc85xx_txtstamp()
1168 if (vsc8531->ptp->tx_type == HWTSTAMP_TX_OFF) { in vsc85xx_txtstamp()
1175 mutex_lock(&vsc8531->ts_lock); in vsc85xx_txtstamp()
1176 __skb_queue_tail(&vsc8531->ptp->tx_queue, skb); in vsc85xx_txtstamp()
1177 mutex_unlock(&vsc8531->ts_lock); in vsc85xx_txtstamp()
1183 struct vsc8531_private *vsc8531 = in vsc85xx_rxtstamp() local
1190 if (!vsc8531->ptp->configured) in vsc85xx_rxtstamp()
1193 if (vsc8531->ptp->rx_filter == HWTSTAMP_FILTER_NONE || in vsc85xx_rxtstamp()
1197 vsc85xx_gettime(&vsc8531->ptp->caps, &ts); in vsc85xx_rxtstamp()
1199 ptphdr = get_ptp_header_rx(skb, vsc8531->ptp->rx_filter); in vsc85xx_rxtstamp()
1235 struct vsc8531_private *vsc8531 = phydev->priv; in vsc8584_base_priv() local
1237 if (vsc8531->ts_base_addr != phydev->mdio.addr) { in vsc8584_base_priv()
1240 dev = phydev->mdio.bus->mdio_map[vsc8531->ts_base_addr]; in vsc8584_base_priv()
1246 return vsc8531; in vsc8584_base_priv()
1251 struct vsc8531_private *vsc8531 = vsc8584_base_priv(phydev); in vsc8584_is_1588_input_clk_configured() local
1253 return vsc8531->input_clk_init; in vsc8584_is_1588_input_clk_configured()
1258 struct vsc8531_private *vsc8531 = vsc8584_base_priv(phydev); in vsc8584_set_input_clk_configured() local
1260 vsc8531->input_clk_init = true; in vsc8584_set_input_clk_configured()
1265 struct vsc8531_private *vsc8531 = phydev->priv; in __vsc8584_init_ptp() local
1482 vsc8531->mii_ts.rxtstamp = vsc85xx_rxtstamp; in __vsc8584_init_ptp()
1483 vsc8531->mii_ts.txtstamp = vsc85xx_txtstamp; in __vsc8584_init_ptp()
1484 vsc8531->mii_ts.hwtstamp = vsc85xx_hwtstamp; in __vsc8584_init_ptp()
1485 vsc8531->mii_ts.ts_info = vsc85xx_ts_info; in __vsc8584_init_ptp()
1486 phydev->mii_ts = &vsc8531->mii_ts; in __vsc8584_init_ptp()
1488 memcpy(&vsc8531->ptp->caps, &vsc85xx_clk_caps, sizeof(vsc85xx_clk_caps)); in __vsc8584_init_ptp()
1490 vsc8531->ptp->ptp_clock = ptp_clock_register(&vsc8531->ptp->caps, in __vsc8584_init_ptp()
1492 return PTR_ERR_OR_ZERO(vsc8531->ptp->ptp_clock); in __vsc8584_init_ptp()
1549 struct vsc8531_private *vsc8531 = phydev->priv; in vsc8584_ptp_probe() local
1551 vsc8531->ptp = devm_kzalloc(&phydev->mdio.dev, sizeof(*vsc8531->ptp), in vsc8584_ptp_probe()
1553 if (!vsc8531->ptp) in vsc8584_ptp_probe()
1556 mutex_init(&vsc8531->phc_lock); in vsc8584_ptp_probe()
1557 mutex_init(&vsc8531->ts_lock); in vsc8584_ptp_probe()
1564 vsc8531->load_save = devm_gpiod_get_optional(&phydev->mdio.dev, "load-save", in vsc8584_ptp_probe()
1567 if (IS_ERR(vsc8531->load_save)) { in vsc8584_ptp_probe()
1569 PTR_ERR(vsc8531->load_save)); in vsc8584_ptp_probe()
1570 return PTR_ERR(vsc8531->load_save); in vsc8584_ptp_probe()
1576 vsc8531->ptp->phydev = phydev; in vsc8584_ptp_probe()