Home
last modified time | relevance | path

Searched full:ptp (Results 1 – 25 of 664) sorted by relevance

12345678910>>...27

/kernel/linux/linux-5.10/drivers/net/ethernet/qlogic/qede/
Dqede_ptp.c21 /* 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 …]
/kernel/linux/linux-4.19/drivers/net/ethernet/qlogic/qede/
Dqede_ptp.c44 /* ptp spinlock is used for protecting the cycle/time counter fields
45 * and, also for serializing the qed PTP API invocations.
55 * @ptp: the ptp clock structure
58 * Adjust the frequency of the ptp cycle counter by the
63 struct qede_ptp *ptp = container_of(info, struct qede_ptp, clock_info); in qede_ptp_adjfreq() local
64 struct qede_dev *edev = ptp->edev; in qede_ptp_adjfreq()
69 spin_lock_bh(&ptp->lock); in qede_ptp_adjfreq()
70 rc = ptp->ops->adjfreq(edev->cdev, ppb); in qede_ptp_adjfreq()
71 spin_unlock_bh(&ptp->lock); in qede_ptp_adjfreq()
73 DP_ERR(edev, "PTP adjfreq called while interface is down\n"); in qede_ptp_adjfreq()
[all …]
/kernel/linux/linux-5.10/drivers/ptp/
Dptp_clock.c3 * 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 …]
Dptp_sysfs.c3 * 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 …]
DKconfig3 # 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 …]
/kernel/linux/linux-4.19/drivers/ptp/
Dptp_clock.c2 * PTP 1588 clock support
110 struct ptp_clock *ptp = container_of(pc, struct ptp_clock, clock); in ptp_clock_settime() local
112 return ptp->info->settime64(ptp->info, tp); in ptp_clock_settime()
117 struct ptp_clock *ptp = container_of(pc, struct ptp_clock, clock); in ptp_clock_gettime() local
120 err = ptp->info->gettime64(ptp->info, tp); in ptp_clock_gettime()
126 struct ptp_clock *ptp = container_of(pc, struct ptp_clock, clock); in ptp_clock_adjtime() local
130 ops = ptp->info; in ptp_clock_adjtime()
157 ptp->dialed_frequency = tx->freq; in ptp_clock_adjtime()
159 tx->freq = ptp->dialed_frequency; in ptp_clock_adjtime()
180 struct ptp_clock *ptp = container_of(dev, struct ptp_clock, dev); in ptp_clock_release() local
[all …]
DKconfig2 # PTP clock support configuration
5 menu "PTP clock support"
8 tristate "PTP clock support"
15 standard defines a Precision Time Protocol (PTP), which can
21 This driver adds support for PTP clocks as character
22 devices. If you want to use a PTP clock, then you should
26 will be called ptp.
29 tristate "Broadcom DTE as PTP clock"
36 (DTE) in the Broadcom SoC's as a PTP clock.
39 for PTP purposes.
[all …]
Dptp_sysfs.c2 * PTP 1588 clock support - sysfs interface.
28 struct ptp_clock *ptp = dev_get_drvdata(dev); in clock_name_show() local
29 return snprintf(page, PAGE_SIZE-1, "%s\n", ptp->info->name); in clock_name_show()
37 struct ptp_clock *ptp = dev_get_drvdata(dev); \
38 return snprintf(page, PAGE_SIZE-1, "%d\n", ptp->info->var); \
53 struct ptp_clock *ptp = dev_get_drvdata(dev); in extts_enable_store() local
54 struct ptp_clock_info *ops = ptp->info; in extts_enable_store()
78 struct ptp_clock *ptp = dev_get_drvdata(dev); in extts_fifo_show() local
79 struct timestamp_event_queue *queue = &ptp->tsevq; in extts_fifo_show()
87 if (mutex_lock_interruptible(&ptp->tsevq_mux)) in extts_fifo_show()
[all …]
Dptp_chardev.c2 * PTP 1588 clock support - character device implementation.
61 int ptp_set_pinfunc(struct ptp_clock *ptp, unsigned int pin, in ptp_set_pinfunc() argument
64 struct ptp_clock_info *info = ptp->info; in ptp_set_pinfunc()
129 struct ptp_clock *ptp = container_of(pc, struct ptp_clock, clock); in ptp_ioctl() local
130 struct ptp_clock_info *ops = ptp->info; in ptp_ioctl()
141 caps.max_adj = ptp->info->max_adj; in ptp_ioctl()
142 caps.n_alarm = ptp->info->n_alarm; in ptp_ioctl()
143 caps.n_ext_ts = ptp->info->n_ext_ts; in ptp_ioctl()
144 caps.n_per_out = ptp->info->n_per_out; in ptp_ioctl()
145 caps.pps = ptp->info->pps; in ptp_ioctl()
[all …]
/kernel/linux/linux-4.19/drivers/net/ethernet/microchip/
Dlan743x_ptp.c67 struct lan743x_ptp *ptp = &adapter->ptp; in lan743x_ptp_tx_ts_enqueue_ts() local
69 spin_lock_bh(&ptp->tx_ts_lock); in lan743x_ptp_tx_ts_enqueue_ts()
70 if (ptp->tx_ts_queue_size < LAN743X_PTP_NUMBER_OF_TX_TIMESTAMPS) { in lan743x_ptp_tx_ts_enqueue_ts()
71 ptp->tx_ts_seconds_queue[ptp->tx_ts_queue_size] = seconds; in lan743x_ptp_tx_ts_enqueue_ts()
72 ptp->tx_ts_nseconds_queue[ptp->tx_ts_queue_size] = nano_seconds; in lan743x_ptp_tx_ts_enqueue_ts()
73 ptp->tx_ts_header_queue[ptp->tx_ts_queue_size] = header; in lan743x_ptp_tx_ts_enqueue_ts()
74 ptp->tx_ts_queue_size++; in lan743x_ptp_tx_ts_enqueue_ts()
79 spin_unlock_bh(&ptp->tx_ts_lock); in lan743x_ptp_tx_ts_enqueue_ts()
84 struct lan743x_ptp *ptp = &adapter->ptp; in lan743x_ptp_tx_ts_complete() local
91 spin_lock_bh(&ptp->tx_ts_lock); in lan743x_ptp_tx_ts_complete()
[all …]
/kernel/linux/linux-5.10/drivers/net/ethernet/microchip/
Dlan743x_ptp.c69 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 …]
/kernel/linux/linux-5.10/drivers/net/ethernet/marvell/octeontx2/af/
Dptp.c2 /* 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 …]
/kernel/linux/linux-5.10/drivers/net/ethernet/sfc/
Dptp.c9 * 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 …]
/kernel/linux/linux-4.19/drivers/net/ethernet/sfc/
Dptp.c12 * PTP support is assisted by firmware running on the MC, which provides
14 * PTP event packets are queued onto internal queues for subsequent processing;
20 * with the hardware timestamp. The PTP receive packet queue is searched
24 * It is important for the operation of the PTP protocol that the ordering
52 /* Maximum number of events expected to make up a PTP event */
79 /* Offsets into PTP packet for identification. These offsets are from the
80 * start of the IP header, not the MAC header. Note that neither PTP V1 nor
81 * PTP V2 permit the use of IPV4 options.
94 /* The minimum length of a PTP V1 packet for offsets, etc. to be valid:
105 /* Although PTP V2 UUIDs are comprised a ClockIdentity (8) and PortNumber (2),
[all …]
/kernel/linux/linux-5.10/drivers/net/ethernet/marvell/octeontx2/nic/
Dotx2_ptp.c2 /* 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 …]
/kernel/linux/linux-4.19/drivers/net/phy/
Ddp83640_reg.h12 #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 …]
/kernel/linux/linux-5.10/drivers/net/phy/
Ddp83640_reg.h12 #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 …]
/kernel/linux/linux-4.19/Documentation/ABI/testing/
Dsysfs-ptp1 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 …]
/kernel/linux/linux-5.10/Documentation/ABI/testing/
Dsysfs-ptp1 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 …]
/kernel/linux/linux-4.19/drivers/net/ethernet/renesas/
Dravb_ptp.c2 /* 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 …]
/kernel/linux/linux-5.10/drivers/net/ethernet/renesas/
Dravb_ptp.c2 /* 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 …]
/kernel/linux/linux-5.10/include/linux/
Dptp_clock_kernel.h3 * 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 …]
/kernel/linux/linux-4.19/include/linux/
Dptp_clock_kernel.h2 * PTP 1588 clock support
43 * struct ptp_clock_info - decribes a PTP hardware clock
90 * @verify: Confirm that a pin can perform a given function. The PTP
123 int (*adjfine)(struct ptp_clock_info *ptp, long scaled_ppm);
124 int (*adjfreq)(struct ptp_clock_info *ptp, s32 delta);
125 int (*adjtime)(struct ptp_clock_info *ptp, s64 delta);
126 int (*gettime64)(struct ptp_clock_info *ptp, struct timespec64 *ts);
127 int (*getcrosststamp)(struct ptp_clock_info *ptp,
130 int (*enable)(struct ptp_clock_info *ptp,
132 int (*verify)(struct ptp_clock_info *ptp, unsigned int pin,
[all …]
/kernel/linux/linux-4.19/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/
Dbase.c44 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 …]
/kernel/linux/linux-5.10/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/
Dbase.c44 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 …]

12345678910>>...27