/Linux-v5.10/drivers/net/ethernet/qlogic/qede/ |
D | qede_ptp.c | 21 /* ptp spinlock is used for protecting the cycle/time counter fields 22 * and, also for serializing the qed PTP API invocations. 31 * qede_ptp_adjfreq() - Adjust the frequency of the PTP cycle counter. 33 * @info: The PTP clock info structure. 40 struct qede_ptp *ptp = container_of(info, struct qede_ptp, clock_info); in qede_ptp_adjfreq() local 41 struct qede_dev *edev = ptp->edev; in qede_ptp_adjfreq() 46 spin_lock_bh(&ptp->lock); in qede_ptp_adjfreq() 47 rc = ptp->ops->adjfreq(edev->cdev, ppb); in qede_ptp_adjfreq() 48 spin_unlock_bh(&ptp->lock); in qede_ptp_adjfreq() 50 DP_ERR(edev, "PTP adjfreq called while interface is down\n"); in qede_ptp_adjfreq() [all …]
|
/Linux-v5.10/drivers/ptp/ |
D | ptp_clock.c | 3 * PTP 1588 clock support 98 struct ptp_clock *ptp = container_of(pc, struct ptp_clock, clock); in ptp_clock_settime() local 100 return ptp->info->settime64(ptp->info, tp); in ptp_clock_settime() 105 struct ptp_clock *ptp = container_of(pc, struct ptp_clock, clock); in ptp_clock_gettime() local 108 if (ptp->info->gettimex64) in ptp_clock_gettime() 109 err = ptp->info->gettimex64(ptp->info, tp, NULL); in ptp_clock_gettime() 111 err = ptp->info->gettime64(ptp->info, tp); in ptp_clock_gettime() 117 struct ptp_clock *ptp = container_of(pc, struct ptp_clock, clock); in ptp_clock_adjtime() local 121 ops = ptp->info; in ptp_clock_adjtime() 148 ptp->dialed_frequency = tx->freq; in ptp_clock_adjtime() [all …]
|
D | ptp_sysfs.c | 3 * PTP 1588 clock support - sysfs interface. 15 struct ptp_clock *ptp = dev_get_drvdata(dev); in clock_name_show() local 16 return snprintf(page, PAGE_SIZE-1, "%s\n", ptp->info->name); in clock_name_show() 24 struct ptp_clock *ptp = dev_get_drvdata(dev); \ 25 return snprintf(page, PAGE_SIZE-1, "%d\n", ptp->info->var); \ 40 struct ptp_clock *ptp = dev_get_drvdata(dev); in extts_enable_store() local 41 struct ptp_clock_info *ops = ptp->info; in extts_enable_store() 65 struct ptp_clock *ptp = dev_get_drvdata(dev); in extts_fifo_show() local 66 struct timestamp_event_queue *queue = &ptp->tsevq; in extts_fifo_show() 74 if (mutex_lock_interruptible(&ptp->tsevq_mux)) in extts_fifo_show() [all …]
|
D | Kconfig | 3 # PTP clock support configuration 6 menu "PTP clock support" 9 tristate "PTP clock support" 16 standard defines a Precision Time Protocol (PTP), which can 22 This driver adds support for PTP clocks as character 23 devices. If you want to use a PTP clock, then you should 27 will be called ptp. 30 tristate "Broadcom DTE as PTP clock" 37 (DTE) in the Broadcom SoC's as a PTP clock. 40 for PTP purposes. [all …]
|
D | ptp_chardev.c | 3 * PTP 1588 clock support - character device implementation. 48 int ptp_set_pinfunc(struct ptp_clock *ptp, unsigned int pin, in ptp_set_pinfunc() argument 51 struct ptp_clock_info *info = ptp->info; in ptp_set_pinfunc() 111 struct ptp_clock *ptp = container_of(pc, struct ptp_clock, clock); in ptp_ioctl() local 115 struct ptp_clock_info *ops = ptp->info; in ptp_ioctl() 132 caps.max_adj = ptp->info->max_adj; in ptp_ioctl() 133 caps.n_alarm = ptp->info->n_alarm; in ptp_ioctl() 134 caps.n_ext_ts = ptp->info->n_ext_ts; in ptp_ioctl() 135 caps.n_per_out = ptp->info->n_per_out; in ptp_ioctl() 136 caps.pps = ptp->info->pps; in ptp_ioctl() [all …]
|
/Linux-v5.10/drivers/net/ethernet/microchip/ |
D | lan743x_ptp.c | 69 struct lan743x_ptp *ptp = &adapter->ptp; in lan743x_ptp_tx_ts_enqueue_ts() local 71 spin_lock_bh(&ptp->tx_ts_lock); in lan743x_ptp_tx_ts_enqueue_ts() 72 if (ptp->tx_ts_queue_size < LAN743X_PTP_NUMBER_OF_TX_TIMESTAMPS) { in lan743x_ptp_tx_ts_enqueue_ts() 73 ptp->tx_ts_seconds_queue[ptp->tx_ts_queue_size] = seconds; in lan743x_ptp_tx_ts_enqueue_ts() 74 ptp->tx_ts_nseconds_queue[ptp->tx_ts_queue_size] = nano_seconds; in lan743x_ptp_tx_ts_enqueue_ts() 75 ptp->tx_ts_header_queue[ptp->tx_ts_queue_size] = header; in lan743x_ptp_tx_ts_enqueue_ts() 76 ptp->tx_ts_queue_size++; in lan743x_ptp_tx_ts_enqueue_ts() 81 spin_unlock_bh(&ptp->tx_ts_lock); in lan743x_ptp_tx_ts_enqueue_ts() 86 struct lan743x_ptp *ptp = &adapter->ptp; in lan743x_ptp_tx_ts_complete() local 93 spin_lock_bh(&ptp->tx_ts_lock); in lan743x_ptp_tx_ts_complete() [all …]
|
/Linux-v5.10/drivers/net/ethernet/marvell/octeontx2/af/ |
D | ptp.c | 2 /* Marvell PTP driver 12 #include "ptp.h" 16 #define DRV_NAME "Marvell PTP Driver" 45 /* To get the input clock frequency with which PTP co-processor in get_clock_rate() 72 struct ptp *ptp_get(void) in ptp_get() 75 struct ptp *ptp; in ptp_get() local 77 /* If the PTP pci device is found on the system and ptp in ptp_get() 78 * driver is bound to it then the PTP pci device is returned in ptp_get() 86 ptp = pci_get_drvdata(pdev); in ptp_get() 87 if (!ptp) in ptp_get() [all …]
|
/Linux-v5.10/drivers/net/ethernet/sfc/ |
D | ptp.c | 9 * PTP support is assisted by firmware running on the MC, which provides 11 * PTP event packets are queued onto internal queues for subsequent processing; 17 * with the hardware timestamp. The PTP receive packet queue is searched 21 * It is important for the operation of the PTP protocol that the ordering 47 #include "nic.h" /* indirectly includes ptp.h */ 49 /* Maximum number of events expected to make up a PTP event */ 76 /* Offsets into PTP packet for identification. These offsets are from the 77 * start of the IP header, not the MAC header. Note that neither PTP V1 nor 78 * PTP V2 permit the use of IPV4 options. 91 /* The minimum length of a PTP V1 packet for offsets, etc. to be valid: [all …]
|
/Linux-v5.10/drivers/net/ethernet/marvell/octeontx2/nic/ |
D | otx2_ptp.c | 2 /* Marvell OcteonTx2 PTP support for ethernet driver 12 struct otx2_ptp *ptp = container_of(ptp_info, struct otx2_ptp, in otx2_ptp_adjfine() local 17 if (!ptp->nic) in otx2_ptp_adjfine() 20 req = otx2_mbox_alloc_msg_ptp_op(&ptp->nic->mbox); in otx2_ptp_adjfine() 27 err = otx2_sync_mbox_msg(&ptp->nic->mbox); in otx2_ptp_adjfine() 36 struct otx2_ptp *ptp = container_of(cc, struct otx2_ptp, cycle_counter); in ptp_cc_read() local 41 if (!ptp->nic) in ptp_cc_read() 44 req = otx2_mbox_alloc_msg_ptp_op(&ptp->nic->mbox); in ptp_cc_read() 50 err = otx2_sync_mbox_msg(&ptp->nic->mbox); in ptp_cc_read() 54 rsp = (struct ptp_rsp *)otx2_mbox_get_rsp(&ptp->nic->mbox.mbox, 0, in ptp_cc_read() [all …]
|
/Linux-v5.10/drivers/net/phy/ |
D | dp83640_reg.h | 12 #define PTP_CTL 0x0014 /* PTP Control Register */ 13 #define PTP_TDR 0x0015 /* PTP Time Data Register */ 14 #define PTP_STS 0x0016 /* PTP Status Register */ 15 #define PTP_TSTS 0x0017 /* PTP Trigger Status Register */ 16 #define PTP_RATEL 0x0018 /* PTP Rate Low Register */ 17 #define PTP_RATEH 0x0019 /* PTP Rate High Register */ 18 #define PTP_RDCKSUM 0x001a /* PTP Read Checksum */ 19 #define PTP_WRCKSUM 0x001b /* PTP Write Checksum */ 20 #define PTP_TXTS 0x001c /* PTP Transmit Timestamp Register, in four 16-bit reads */ 21 #define PTP_RXTS 0x001d /* PTP Receive Timestamp Register, in six? 16-bit reads */ [all …]
|
/Linux-v5.10/Documentation/ABI/testing/ |
D | sysfs-ptp | 1 What: /sys/class/ptp/ 7 features of PTP hardware clocks. 9 What: /sys/class/ptp/ptpN/ 13 This directory contains the attributes of the Nth PTP 14 hardware clock registered into the PTP class driver 17 What: /sys/class/ptp/ptpN/clock_name 21 This file contains the name of the PTP hardware clock 28 What: /sys/class/ptp/ptpN/max_adjustment 32 This file contains the PTP hardware clock's maximum 36 What: /sys/class/ptp/ptpN/n_alarms [all …]
|
/Linux-v5.10/drivers/net/ethernet/renesas/ |
D | ravb_ptp.c | 2 /* PTP 1588 clock using the Renesas Ethernet AVB 73 u32 gti_ns_plus_1 = (priv->ptp.current_addend >> 20) + 1; in ravb_ptp_update_compare() 90 /* PTP clock operations */ 91 static int ravb_ptp_adjfreq(struct ptp_clock_info *ptp, s32 ppb) in ravb_ptp_adjfreq() argument 93 struct ravb_private *priv = container_of(ptp, struct ravb_private, in ravb_ptp_adjfreq() 94 ptp.info); in ravb_ptp_adjfreq() 105 addend = priv->ptp.default_addend; in ravb_ptp_adjfreq() 112 priv->ptp.current_addend = addend; in ravb_ptp_adjfreq() 127 static int ravb_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta) in ravb_ptp_adjtime() argument 129 struct ravb_private *priv = container_of(ptp, struct ravb_private, in ravb_ptp_adjtime() [all …]
|
/Linux-v5.10/include/linux/ |
D | ptp_clock_kernel.h | 3 * PTP 1588 clock support 39 * struct ptp_clock_info - describes a PTP hardware clock 99 * @verify: Confirm that a pin can perform a given function. The PTP 132 int (*adjfine)(struct ptp_clock_info *ptp, long scaled_ppm); 133 int (*adjfreq)(struct ptp_clock_info *ptp, s32 delta); 134 int (*adjphase)(struct ptp_clock_info *ptp, s32 phase); 135 int (*adjtime)(struct ptp_clock_info *ptp, s64 delta); 136 int (*gettime64)(struct ptp_clock_info *ptp, struct timespec64 *ts); 137 int (*gettimex64)(struct ptp_clock_info *ptp, struct timespec64 *ts, 139 int (*getcrosststamp)(struct ptp_clock_info *ptp, [all …]
|
D | ptp_classify.h | 3 * PTP 1588 support 5 * This file implements a BPF that recognizes PTP event messages. 16 #define PTP_CLASS_NONE 0x00 /* not a PTP event message */ 72 * ptp_classify_raw - classify a PTP packet 76 * determine the PTP class. In case the skb does not contain any 77 * PTP protocol data, PTP_CLASS_NONE will be returned, otherwise 84 * ptp_parse_header - Get pointer to the PTP v2 header 94 * Return: Pointer to the ptp v2 header or NULL if not found 99 * ptp_get_msgtype - Extract ptp message type from given header 100 * @hdr: ptp header [all …]
|
/Linux-v5.10/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/ |
D | base.c | 44 const int slot = pt->base >> pt->ptp->shift; in nvkm_mmu_ptp_put() 45 struct nvkm_mmu_ptp *ptp = pt->ptp; in nvkm_mmu_ptp_put() local 48 * there will be now, so return PTP to the cache. in nvkm_mmu_ptp_put() 50 if (!ptp->free) in nvkm_mmu_ptp_put() 51 list_add(&ptp->head, &mmu->ptp.list); in nvkm_mmu_ptp_put() 52 ptp->free |= BIT(slot); in nvkm_mmu_ptp_put() 54 /* If there's no more sub-allocations, destroy PTP. */ in nvkm_mmu_ptp_put() 55 if (ptp->free == ptp->mask) { in nvkm_mmu_ptp_put() 56 nvkm_mmu_ptc_put(mmu, force, &ptp->pt); in nvkm_mmu_ptp_put() 57 list_del(&ptp->head); in nvkm_mmu_ptp_put() [all …]
|
/Linux-v5.10/drivers/net/ethernet/intel/e1000e/ |
D | ptp.c | 4 /* PTP 1588 Hardware Clock (PHC) 5 * Derived from PTP Hardware Clock driver for Intel 82576 and 82580 (igb) 19 * @ptp: ptp clock structure 25 static int e1000e_phc_adjfreq(struct ptp_clock_info *ptp, s32 delta) in e1000e_phc_adjfreq() argument 27 struct e1000_adapter *adapter = container_of(ptp, struct e1000_adapter, in e1000e_phc_adjfreq() 36 if ((delta > ptp->max_adj) || (delta <= -1000000000)) in e1000e_phc_adjfreq() 73 * @ptp: ptp clock structure 78 static int e1000e_phc_adjtime(struct ptp_clock_info *ptp, s64 delta) in e1000e_phc_adjtime() argument 80 struct e1000_adapter *adapter = container_of(ptp, struct e1000_adapter, in e1000e_phc_adjtime() 146 * @ptp: ptp clock structure [all …]
|
/Linux-v5.10/drivers/net/dsa/mv88e6xxx/ |
D | hwtstamp.h | 18 /* Global 6352 PTP registers */ 19 /* Offset 0x00: PTP EtherType */ 33 /* Offset 0x05: PTP Global Configuration */ 39 /* Offset 0x07: PTP Global Configuration */ 48 /* Offset 0x08: PTP Interrupt Status */ 51 /* Per-Port 6352 PTP Registers */ 52 /* Offset 0x00: PTP Configuration 0 */ 62 /* Offset 0x01: PTP Configuration 1 */ 65 /* Offset 0x02: PTP Configuration 2 */ 71 /* Offset 0x03: PTP LED Configuration */ [all …]
|
D | ptp.h | 3 * Marvell 88E6xxx Switch PTP support 66 /* Offset 0x0E/0x0F: PTP Global Time */ 112 /* Offset 0x01/0x02: PTP Arrival 0 Time */ 116 /* Offset 0x03: PTP Arrival 0 Sequence ID */ 119 /* Offset 0x04: PTP Arrival 1 Status */ 122 /* Offset 0x05/0x6E: PTP Arrival 1 Time */ 126 /* Offset 0x07: PTP Arrival 1 Sequence ID */ 129 /* Offset 0x08: PTP Departure Status */ 132 /* Offset 0x09/0x0a: PTP Deperture Time */ 136 /* Offset 0x0b: PTP Departure Sequence ID */ [all …]
|
/Linux-v5.10/drivers/net/ethernet/chelsio/cxgb4/ |
D | cxgb4_ptp.c | 2 * cxgb4_ptp.c:Chelsio PTP support for T5/T6 54 * cxgb4_ptp_is_ptp_tx - determine whether TX packet is PTP or not 55 * @skb: skb of outgoing ptp request 80 * cxgb4_ptp_is_ptp_rx - determine whether RX packet is PTP or not 81 * @skb: skb of incoming ptp request 94 * cxgb4_ptp_read_hwstamp - read timestamp for TX event PTP message 121 * cxgb4_ptprx_timestamping - Enable Timestamp for RX PTP event message 145 "PTP: %s error %d\n", __func__, -err); in cxgb4_ptprx_timestamping() 166 "PTP: %s error %d\n", __func__, -err); in cxgb4_ptp_txtype() 192 "PTP: %s error %d\n", __func__, -err); in cxgb4_ptp_redirect_rx_packet() [all …]
|
/Linux-v5.10/drivers/net/ethernet/stmicro/stmmac/ |
D | stmmac_ptp.c | 3 PTP 1588 clock using the STMMAC. 16 * @ptp: pointer to ptp_clock_info structure 21 static int stmmac_adjust_freq(struct ptp_clock_info *ptp, s32 ppb) in stmmac_adjust_freq() argument 24 container_of(ptp, struct stmmac_priv, ptp_clock_ops); in stmmac_adjust_freq() 51 * @ptp: pointer to ptp_clock_info structure 56 static int stmmac_adjust_time(struct ptp_clock_info *ptp, s64 delta) in stmmac_adjust_time() argument 59 container_of(ptp, struct stmmac_priv, ptp_clock_ops); in stmmac_adjust_time() 87 * @ptp: pointer to ptp_clock_info structure 93 static int stmmac_get_time(struct ptp_clock_info *ptp, struct timespec64 *ts) in stmmac_get_time() argument 96 container_of(ptp, struct stmmac_priv, ptp_clock_ops); in stmmac_get_time() [all …]
|
/Linux-v5.10/drivers/net/ethernet/mellanox/mlx4/ |
D | en_clock.c | 78 * mlx4_en_remove_timestamp - disable PTP device 81 * Stop the PTP support. 115 * @ptp: ptp clock structure 121 static int mlx4_en_phc_adjfreq(struct ptp_clock_info *ptp, s32 delta) in mlx4_en_phc_adjfreq() argument 127 struct mlx4_en_dev *mdev = container_of(ptp, struct mlx4_en_dev, in mlx4_en_phc_adjfreq() 149 * @ptp: ptp clock structure 154 static int mlx4_en_phc_adjtime(struct ptp_clock_info *ptp, s64 delta) in mlx4_en_phc_adjtime() argument 156 struct mlx4_en_dev *mdev = container_of(ptp, struct mlx4_en_dev, in mlx4_en_phc_adjtime() 169 * @ptp: ptp clock structure 175 static int mlx4_en_phc_gettime(struct ptp_clock_info *ptp, in mlx4_en_phc_gettime() argument [all …]
|
/Linux-v5.10/Documentation/devicetree/bindings/pinctrl/ |
D | marvell,kirkwood-pinctrl.txt | 28 mpp4 4 gpio, nand(io6), uart0(rxd), ptp(clk) 29 mpp5 5 gpo, nand(io7), uart0(txd), ptp(trig) 30 mpp6 6 sysrst(out), spi(mosi), ptp(trig) 31 mpp7 7 gpo, pex(rsto), spi(cs), ptp(trig) 32 mpp8 8 gpio, twsi0(sda), uart0(rts), uart1(rts), ptp(clk), 34 mpp9 9 gpio, twsi(sck), uart0(cts), uart1(cts), ptp(evreq), 36 mpp10 10 gpo, spi(sck), uart0(txd), ptp(trig) 37 mpp11 11 gpio, spi(miso), uart0(rxd), ptp(clk), ptp-1(evreq), 38 ptp-2(trig) 66 mpp4 4 gpio, nand(io6), uart0(rxd), ptp(clk) [all …]
|
/Linux-v5.10/drivers/net/ethernet/cavium/common/ |
D | cavium_ptp.c | 2 /* cavium_ptp.c - PTP 1588 clock on Cavium hardware 61 struct cavium_ptp *ptp; in cavium_ptp_get() local 69 ptp = pci_get_drvdata(pdev); in cavium_ptp_get() 70 if (!ptp) in cavium_ptp_get() 71 ptp = ERR_PTR(-EPROBE_DEFER); in cavium_ptp_get() 72 if (IS_ERR(ptp)) in cavium_ptp_get() 75 return ptp; in cavium_ptp_get() 79 void cavium_ptp_put(struct cavium_ptp *ptp) in cavium_ptp_put() argument 81 if (!ptp) in cavium_ptp_put() 83 pci_dev_put(ptp->pdev); in cavium_ptp_put() [all …]
|
/Linux-v5.10/drivers/net/phy/mscc/ |
D | mscc_ptp.c | 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() [all …]
|
/Linux-v5.10/Documentation/devicetree/bindings/ptp/ |
D | brcm,ptp-dte.txt | 1 * Broadcom Digital Timing Engine(DTE) based PTP clock 9 "brcm,ptp-dte" 11 "brcm,iproc-ptp-dte" - for iproc based SoC's 16 ptp: ptp-dte@180af650 { 17 compatible = "brcm,iproc-ptp-dte", "brcm,ptp-dte";
|