Lines Matching refs:ptp
428 static void vsc85xx_dequeue_skb(struct vsc85xx_ptp *ptp) in vsc85xx_dequeue_skb() argument
440 reg = vsc85xx_ts_read_csr(ptp->phydev, PROCESSOR, in vsc85xx_dequeue_skb()
450 reg = vsc85xx_ts_read_csr(ptp->phydev, PROCESSOR, in vsc85xx_dequeue_skb()
458 len = skb_queue_len(&ptp->tx_queue); in vsc85xx_dequeue_skb()
463 skb = __skb_dequeue(&ptp->tx_queue); in vsc85xx_dequeue_skb()
488 __skb_queue_tail(&ptp->tx_queue, skb); in vsc85xx_dequeue_skb()
492 static void vsc85xx_get_tx_ts(struct vsc85xx_ptp *ptp) in vsc85xx_get_tx_ts() argument
497 vsc85xx_dequeue_skb(ptp); in vsc85xx_get_tx_ts()
500 reg = vsc85xx_ts_read_csr(ptp->phydev, PROCESSOR, in vsc85xx_get_tx_ts()
612 struct vsc85xx_ptp *ptp = container_of(info, struct vsc85xx_ptp, caps); in vsc85xx_adjfine() local
613 struct phy_device *phydev = ptp->phydev; in vsc85xx_adjfine()
646 struct vsc85xx_ptp *ptp = container_of(info, struct vsc85xx_ptp, caps); in __vsc85xx_gettime() local
647 struct phy_device *phydev = ptp->phydev; in __vsc85xx_gettime()
683 struct vsc85xx_ptp *ptp = container_of(info, struct vsc85xx_ptp, caps); in vsc85xx_gettime() local
684 struct phy_device *phydev = ptp->phydev; in vsc85xx_gettime()
697 struct vsc85xx_ptp *ptp = container_of(info, struct vsc85xx_ptp, caps); in __vsc85xx_settime() local
698 struct phy_device *phydev = ptp->phydev; in __vsc85xx_settime()
733 struct vsc85xx_ptp *ptp = container_of(info, struct vsc85xx_ptp, caps); in vsc85xx_settime() local
734 struct phy_device *phydev = ptp->phydev; in vsc85xx_settime()
746 struct vsc85xx_ptp *ptp = container_of(info, struct vsc85xx_ptp, caps); in vsc85xx_adjtime() local
747 struct phy_device *phydev = ptp->phydev; in vsc85xx_adjtime()
887 if (vsc8531->ptp->rx_filter == HWTSTAMP_FILTER_PTP_V2_L2_EVENT) { in vsc85xx_eth1_conf()
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 phy_device *phydev = vsc8531->ptp->phydev; in vsc85xx_hwtstamp()
1072 vsc8531->ptp->tx_type = cfg.tx_type; in vsc85xx_hwtstamp()
1087 vsc8531->ptp->rx_filter = cfg.rx_filter; in vsc85xx_hwtstamp()
1091 __skb_queue_purge(&vsc8531->ptp->tx_queue); in vsc85xx_hwtstamp()
1092 __skb_queue_head_init(&vsc8531->ptp->tx_queue); in vsc85xx_hwtstamp()
1109 if (vsc8531->ptp->tx_type == HWTSTAMP_TX_OFF) in vsc85xx_hwtstamp()
1111 if (vsc8531->ptp->rx_filter == HWTSTAMP_FILTER_NONE) in vsc85xx_hwtstamp()
1132 vsc8531->ptp->configured = 1; in vsc85xx_hwtstamp()
1144 info->phc_index = ptp_clock_index(vsc8531->ptp->ptp_clock); in vsc85xx_ts_info()
1167 if (!vsc8531->ptp->configured) in vsc85xx_txtstamp()
1170 if (vsc8531->ptp->tx_type == HWTSTAMP_TX_OFF) { in vsc85xx_txtstamp()
1178 __skb_queue_tail(&vsc8531->ptp->tx_queue, skb); in vsc85xx_txtstamp()
1192 if (!vsc8531->ptp->configured) in vsc85xx_rxtstamp()
1195 if (vsc8531->ptp->rx_filter == HWTSTAMP_FILTER_NONE || in vsc85xx_rxtstamp()
1199 vsc85xx_gettime(&vsc8531->ptp->caps, &ts); in vsc85xx_rxtstamp()
1201 ptphdr = get_ptp_header_rx(skb, vsc8531->ptp->rx_filter); in vsc85xx_rxtstamp()
1490 memcpy(&vsc8531->ptp->caps, &vsc85xx_clk_caps, sizeof(vsc85xx_clk_caps)); in __vsc8584_init_ptp()
1492 vsc8531->ptp->ptp_clock = ptp_clock_register(&vsc8531->ptp->caps, in __vsc8584_init_ptp()
1494 return PTR_ERR_OR_ZERO(vsc8531->ptp->ptp_clock); in __vsc8584_init_ptp()
1539 vsc85xx_get_tx_ts(priv->ptp); in vsc8584_handle_ts_interrupt()
1541 __skb_queue_purge(&priv->ptp->tx_queue); in vsc8584_handle_ts_interrupt()
1553 vsc8531->ptp = devm_kzalloc(&phydev->mdio.dev, sizeof(*vsc8531->ptp), in vsc8584_ptp_probe()
1555 if (!vsc8531->ptp) in vsc8584_ptp_probe()
1575 vsc8531->ptp->phydev = phydev; in vsc8584_ptp_probe()