Lines Matching full:ptp
160 /* Pick bytes from PTP header */
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()
888 /* PTP over Ethernet multicast address for SYNC and DELAY msg */ 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()
1075 vsc8531->ptp->tx_type = cfg.tx_type; in vsc85xx_hwtstamp()
1081 /* ETH->IP->UDP->PTP */ in vsc85xx_hwtstamp()
1084 /* ETH->PTP */ in vsc85xx_hwtstamp()
1090 vsc8531->ptp->rx_filter = cfg.rx_filter; in vsc85xx_hwtstamp()
1094 __skb_queue_purge(&vsc8531->ptp->tx_queue); in vsc85xx_hwtstamp()
1095 __skb_queue_head_init(&vsc8531->ptp->tx_queue); in vsc85xx_hwtstamp()
1112 if (vsc8531->ptp->tx_type == HWTSTAMP_TX_OFF) in vsc85xx_hwtstamp()
1114 if (vsc8531->ptp->rx_filter == HWTSTAMP_FILTER_NONE) in vsc85xx_hwtstamp()
1135 vsc8531->ptp->configured = 1; in vsc85xx_hwtstamp()
1147 info->phc_index = ptp_clock_index(vsc8531->ptp->ptp_clock); in vsc85xx_ts_info()
1170 if (!vsc8531->ptp->configured) in vsc85xx_txtstamp()
1173 if (vsc8531->ptp->tx_type == HWTSTAMP_TX_OFF) { in vsc85xx_txtstamp()
1181 __skb_queue_tail(&vsc8531->ptp->tx_queue, skb); in vsc85xx_txtstamp()
1195 if (!vsc8531->ptp->configured) in vsc85xx_rxtstamp()
1198 if (vsc8531->ptp->rx_filter == HWTSTAMP_FILTER_NONE || in vsc85xx_rxtstamp()
1202 vsc85xx_gettime(&vsc8531->ptp->caps, &ts); in vsc85xx_rxtstamp()
1204 ptphdr = get_ptp_header_rx(skb, vsc8531->ptp->rx_filter); in vsc85xx_rxtstamp()
1466 * index in all enabled comparators (except PTP)). in __vsc8584_init_ptp()
1476 * - The PTP comparator. in __vsc8584_init_ptp()
1493 memcpy(&vsc8531->ptp->caps, &vsc85xx_clk_caps, sizeof(vsc85xx_clk_caps)); in __vsc8584_init_ptp()
1495 vsc8531->ptp->ptp_clock = ptp_clock_register(&vsc8531->ptp->caps, in __vsc8584_init_ptp()
1497 return PTR_ERR_OR_ZERO(vsc8531->ptp->ptp_clock); in __vsc8584_init_ptp()
1530 /* Ack the PTP interrupt */ in vsc8584_handle_ts_interrupt()
1540 vsc85xx_get_tx_ts(priv->ptp); in vsc8584_handle_ts_interrupt()
1542 __skb_queue_purge(&priv->ptp->tx_queue); in vsc8584_handle_ts_interrupt()
1554 vsc8531->ptp = devm_kzalloc(&phydev->mdio.dev, sizeof(*vsc8531->ptp), in vsc8584_ptp_probe()
1556 if (!vsc8531->ptp) in vsc8584_ptp_probe()
1576 vsc8531->ptp->phydev = phydev; in vsc8584_ptp_probe()