| /linux/drivers/net/ethernet/marvell/octeontx2/af/ |
| A D | ptp.c | 85 static bool is_ptp_dev_cn10ka(struct ptp *ptp) in is_ptp_dev_cn10ka() argument 90 static bool cn10k_ptp_errata(struct ptp *ptp) in cn10k_ptp_errata() argument 93 (is_rev_A0(ptp) || is_rev_A1(ptp))) in cn10k_ptp_errata() 101 struct ptp *ptp = rvu->ptp; in is_tstmp_atomic_update_supported() local 110 (is_rev_A0(ptp) || is_rev_A1(ptp))) in is_tstmp_atomic_update_supported() 118 struct ptp *ptp = container_of(hrtimer, struct ptp, hrtimer); in ptp_reset_thresh() local 231 struct ptp *ptp = first_ptp_block; in ptp_get() local 245 void ptp_put(struct ptp *ptp) in ptp_put() argument 362 *clk = ptp->read_ptp_tstmp(ptp); in ptp_get_clock() 369 struct ptp *ptp = rvu->ptp; in ptp_start() local [all …]
|
| A D | ptp.h | 15 struct ptp { struct 18 u64 (*read_ptp_tstmp)(struct ptp *ptp); argument 27 struct ptp *ptp_get(void); argument 28 void ptp_put(struct ptp *ptp);
|
| /linux/drivers/net/ethernet/qlogic/qede/ |
| A D | qede_ptp.c | 115 timecounter_init(&ptp->tc, &ptp->cc, ns); in qede_ptp_settime() 206 struct qede_ptp *ptp = edev->ptp; in qede_ptp_cfg_filters() local 299 ptp = edev->ptp; in qede_ptp_hw_ts() 326 struct qede_ptp *ptp = edev->ptp; in qede_ptp_get_ts_info() local 365 ptp = edev->ptp; in qede_ptp_disable() 398 ptp = edev->ptp; in qede_ptp_init() 415 memset(&ptp->cc, 0, sizeof(ptp->cc)); in qede_ptp_init() 438 ptp->ops = edev->ops->ptp; in qede_ptp_enable() 445 edev->ptp = ptp; in qede_ptp_enable() 489 ptp = edev->ptp; in qede_ptp_tx_ts() [all …]
|
| /linux/drivers/ptp/ |
| A D | ptp_clock.c | 103 return ptp->info->settime64(ptp->info, tp); in ptp_clock_settime() 112 err = ptp->info->gettimex64(ptp->info, tp, NULL); in ptp_clock_gettime() 114 err = ptp->info->gettime64(ptp->info, tp); in ptp_clock_gettime() 208 kfree(ptp); in ptp_clock_release() 290 ptp->info->getcyclesx64 = ptp->info->gettimex64; in ptp_clock_register() 339 ptp->pps_source->lookup_cookie = ptp; in ptp_clock_register() 344 ptp->dev.devt = ptp->devid; in ptp_clock_register() 347 ptp->dev.groups = ptp->pin_attr_groups; in ptp_clock_register() 349 dev_set_drvdata(&ptp->dev, ptp); in ptp_clock_register() 350 dev_set_name(&ptp->dev, "ptp%d", ptp->index); in ptp_clock_register() [all …]
|
| A D | ptp_sysfs.c | 27 return sysfs_emit(page, "%d\n", ptp->info->getmaxphase(ptp->info)); in max_phase_adjustment_show() 230 *(ptp->vclock_index + ptp->n_vclocks + i) = in n_vclocks_store() 245 *(ptp->vclock_index + ptp->n_vclocks - i) = -1; in n_vclocks_store() 249 if (!ptp->has_cycles) { in n_vclocks_store() 256 ptp->n_vclocks = num; in n_vclocks_store() 446 ptp->pin_dev_attr = kcalloc(n_pins, sizeof(*ptp->pin_dev_attr), in ptp_populate_pin_groups() 451 ptp->pin_attr = kcalloc(1 + n_pins, sizeof(*ptp->pin_attr), GFP_KERNEL); in ptp_populate_pin_groups() 452 if (!ptp->pin_attr) in ptp_populate_pin_groups() 466 ptp->pin_attr_group.attrs = ptp->pin_attr; in ptp_populate_pin_groups() 468 ptp->pin_attr_groups[0] = &ptp->pin_attr_group; in ptp_populate_pin_groups() [all …]
|
| A D | ptp_chardev.c | 108 struct ptp_clock *ptp = in ptp_open() local 146 struct ptp_clock *ptp = in ptp_release() local 162 struct ptp_clock *ptp = in ptp_ioctl() local 191 caps.pps = ptp->info->pps; in ptp_ioctl() 197 caps.max_phase_adj = ptp->info->getmaxphase(ptp->info); in ptp_ioctl() 331 err = ptp->info->getcrosststamp(ptp->info, &xtstamp); in ptp_ioctl() 352 if (!ptp->info->gettimex64) { in ptp_ioctl() 372 err = ptp->info->gettimex64(ptp->info, &ts, &sts); in ptp_ioctl() 513 struct ptp_clock *ptp = in ptp_poll() local 531 struct ptp_clock *ptp = in ptp_read() local [all …]
|
| A D | ptp_vclock.c | 45 struct ptp_vclock *vclock = info_to_vclock(ptp); in ptp_vclock_adjfine() 62 struct ptp_vclock *vclock = info_to_vclock(ptp); in ptp_vclock_adjtime() 75 struct ptp_vclock *vclock = info_to_vclock(ptp); in ptp_vclock_gettime() 91 struct ptp_vclock *vclock = info_to_vclock(ptp); in ptp_vclock_gettimex() 170 struct ptp_clock *ptp = vclock->pclock; in ptp_vclock_read() local 173 ptp->info->getcycles64(ptp->info, &ts); in ptp_vclock_read() 236 struct ptp_clock *ptp; in ptp_get_vclocks_index() local 248 ptp = dev_get_drvdata(dev); in ptp_get_vclocks_index() 259 memcpy(*vclock_index, ptp->vclock_index, sizeof(int) * ptp->n_vclocks); in ptp_get_vclocks_index() 260 num = ptp->n_vclocks; in ptp_get_vclocks_index() [all …]
|
| A D | ptp_private.h | 99 static inline bool ptp_vclock_in_use(struct ptp_clock *ptp) in ptp_vclock_in_use() argument 103 if (mutex_lock_interruptible(&ptp->n_vclocks_mux)) in ptp_vclock_in_use() 106 if (!ptp->is_virtual_clock && ptp->n_vclocks) in ptp_vclock_in_use() 109 mutex_unlock(&ptp->n_vclocks_mux); in ptp_vclock_in_use() 115 static inline bool ptp_clock_freerun(struct ptp_clock *ptp) in ptp_clock_freerun() argument 117 if (ptp->has_cycles) in ptp_clock_freerun() 120 return ptp_vclock_in_use(ptp); in ptp_clock_freerun() 130 int ptp_set_pinfunc(struct ptp_clock *ptp, unsigned int pin, 152 int ptp_populate_pin_groups(struct ptp_clock *ptp); 153 void ptp_cleanup_pin_groups(struct ptp_clock *ptp);
|
| /linux/drivers/net/ethernet/broadcom/bnxt/ |
| A D | bnxt_ptp.c | 71 timecounter_init(&ptp->tc, &ptp->cc, ns); in bnxt_ptp_settime() 106 if (!ptp) in bnxt_ptp_get_current_time() 109 WRITE_ONCE(ptp->old_time, ptp->current_time); in bnxt_ptp_get_current_time() 177 WRITE_ONCE(ptp->old_time, ptp->current_time); in bnxt_ptp_update_current_time() 342 if (!ptp || !ptp->tstamp_filters) in bnxt_ptp_cfg_tstamp_filters() 816 BNXT_READ_TIME64(ptp, time, ptp->old_time); in bnxt_get_rx_ts_p5() 960 memset(&ptp->cc, 0, sizeof(ptp->cc)); in bnxt_ptp_timecounter_init() 967 ptp->cmult = ptp->cc.mult; in bnxt_ptp_timecounter_init() 981 timecounter_init(&ptp->tc, &ptp->cc, ns); in bnxt_ptp_rtc_timecounter_init() 983 ptp->tc.cycle_last = ns & ptp->cc.mask; in bnxt_ptp_rtc_timecounter_init() [all …]
|
| A D | bnxt_ptp.h | 149 #define BNXT_READ_TIME64(ptp, dst, src) \ argument 153 spin_lock_irqsave(&(ptp)->ptp_lock, flags); \ 155 spin_unlock_irqrestore(&(ptp)->ptp_lock, flags); \ 158 #define BNXT_READ_TIME64(ptp, dst, src) \ argument 162 #define BNXT_PTP_INC_TX_AVAIL(ptp) \ argument 164 spin_lock_bh(&(ptp)->ptp_tx_lock); \ 165 (ptp)->tx_avail++; \ 166 spin_unlock_bh(&(ptp)->ptp_tx_lock); \ 176 int bnxt_ptp_get_txts_prod(struct bnxt_ptp_cfg *ptp, u16 *prod); 181 void bnxt_ptp_rtc_timecounter_init(struct bnxt_ptp_cfg *ptp, u64 ns);
|
| /linux/drivers/net/ethernet/marvell/octeontx2/nic/ |
| A D | otx2_ptp.c | 19 if (!ptp->nic) in is_tstmp_atomic_update_supported() 55 if (!ptp->nic) in otx2_ptp_hw_adjtime() 78 if (!ptp->nic) in otx2_ptp_get_clock() 122 if (!ptp->nic) in otx2_ptp_hw_settime() 148 if (!ptp->nic) in otx2_ptp_adjfine() 165 if (!ptp->nic) in ptp_set_thresh() 182 if (!ptp->nic) in ptp_pps_on() 333 ptp->tstamp = ptp->ptp_tstamp2nsec(&ptp->time_counter, tstamp); in otx2_sync_tstamp() 489 struct otx2_ptp *ptp = pfvf->ptp; in otx2_ptp_destroy() local 491 if (!ptp) in otx2_ptp_destroy() [all …]
|
| /linux/drivers/net/ethernet/hisilicon/hns3/hns3pf/ |
| A D | hclge_ptp.c | 10 struct hclge_ptp *ptp = hdev->ptp; in hclge_ptp_get_cycle() local 12 ptp->cycle.quo = readl(hdev->ptp->io_base + HCLGE_PTP_CYCLE_QUO_REG) & in hclge_ptp_get_cycle() 59 struct hclge_ptp *ptp = hdev->ptp; in hclge_ptp_set_tx_info() local 69 ptp->tx_cnt++; in hclge_ptp_set_tx_info() 86 hdev->ptp->last_tx_seqid = readl(hdev->ptp->io_base + in hclge_ptp_clean_tx_hwts() 423 if (!ptp) in hclge_ptp_create_clock() 427 snprintf(ptp->info.name, sizeof(ptp->info.name), "%s", in hclge_ptp_create_clock() 443 ptp->info.n_alarm, PTR_ERR(ptp->clock)); in hclge_ptp_create_clock() 454 hdev->ptp = ptp; in hclge_ptp_create_clock() 526 struct hclge_ptp *ptp = hdev->ptp; in hclge_ptp_uninit() local [all …]
|
| /linux/drivers/net/ethernet/microchip/ |
| A D | lan743x_ptp.c | 81 struct lan743x_ptp *ptp = &adapter->ptp; in lan743x_ptp_tx_ts_enqueue_ts() local 98 struct lan743x_ptp *ptp = &adapter->ptp; in lan743x_ptp_tx_ts_complete() local 159 struct lan743x_ptp *ptp = &adapter->ptp; in lan743x_ptp_reserve_event_ch() local 178 struct lan743x_ptp *ptp = &adapter->ptp; in lan743x_ptp_release_event_ch() local 202 struct lan743x_ptp *ptp = &adapter->ptp; in lan743x_led_mux_enable() local 219 struct lan743x_ptp *ptp = &adapter->ptp; in lan743x_led_mux_save() local 426 struct lan743x_ptp *ptp = &adapter->ptp; in lan743x_ptp_perout_off() local 456 struct lan743x_ptp *ptp = &adapter->ptp; in lan743x_ptp_perout() local 647 struct lan743x_ptp *ptp = &adapter->ptp; in lan743x_ptp_io_perout_off() local 699 struct lan743x_ptp *ptp = &adapter->ptp; in lan743x_ptp_io_perout() local [all …]
|
| /linux/drivers/net/ethernet/sfc/siena/ |
| A D | ptp.c | 957 ptp->nic_to_kernel_time(0, ptp->timeset[i].wait, 0)); in efx_ptp_process_times() 1279 if (!ptp->channel || ptp->rxfilter_installed) in efx_ptp_insert_multicast_filters() 1483 list_add(&ptp->rx_evts[pos].link, &ptp->evt_free_list); in efx_ptp_probe() 1694 queue_work(ptp->workwq, &ptp->work); in efx_ptp_rx() 1712 queue_work(ptp->workwq, &ptp->work); in efx_siena_ptp_tx() 1790 if (!ptp) in efx_siena_ptp_get_ts_info() 1833 queue_work(ptp->workwq, &ptp->work); in ptp_event_failure() 1872 queue_work(ptp->workwq, &ptp->work); in ptp_event_rx() 1894 queue_work(ptp->pps_workwq, &ptp->pps_work); in ptp_event_pps() 1902 if (!ptp) { in efx_siena_ptp_event() [all …]
|
| /linux/drivers/net/ethernet/sfc/ |
| A D | ptp.c | 944 ptp->nic_to_kernel_time(0, ptp->timeset[i].wait, 0)); in efx_ptp_process_times() 1281 queue_delayed_work(ptp->workwq, &ptp->cleanup_work, in efx_ptp_insert_filter() 1332 if (!ptp->channel || !list_empty(&ptp->rxfilters_mcast)) in efx_ptp_insert_multicast_filters() 1536 queue_delayed_work(ptp->workwq, &ptp->cleanup_work, in efx_ptp_cleanup_worker() 1780 queue_work(ptp->workwq, &ptp->work); in efx_ptp_rx() 1798 queue_work(ptp->workwq, &ptp->work); in efx_ptp_tx() 1874 if (!ptp) in efx_ptp_get_ts_info() 1927 queue_work(ptp->workwq, &ptp->work); in ptp_event_failure() 1944 queue_work(ptp->pps_workwq, &ptp->pps_work); in ptp_event_pps() 1952 if (!ptp) { in efx_ptp_event() [all …]
|
| /linux/include/linux/ |
| A D | ptp_clock_kernel.h | 180 s32 (*getmaxphase)(struct ptp_clock_info *ptp); 185 int (*getcrosststamp)(struct ptp_clock_info *ptp, 191 int (*getcrosscycles)(struct ptp_clock_info *ptp, 193 int (*enable)(struct ptp_clock_info *ptp, 197 long (*do_aux_work)(struct ptp_clock_info *ptp); 334 extern void ptp_clock_event(struct ptp_clock *ptp, 343 extern int ptp_clock_index(struct ptp_clock *ptp); 361 int ptp_find_pin(struct ptp_clock *ptp, 379 int ptp_find_pin_unlocked(struct ptp_clock *ptp, 397 void ptp_cancel_worker_sync(struct ptp_clock *ptp); [all …]
|
| /linux/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/ |
| A D | base.c | 45 struct nvkm_mmu_ptp *ptp = pt->ptp; in nvkm_mmu_ptp_put() local 51 list_add(&ptp->head, &mmu->ptp.list); in nvkm_mmu_ptp_put() 55 if (ptp->free == ptp->mask) { in nvkm_mmu_ptp_put() 58 kfree(ptp); in nvkm_mmu_ptp_put() 74 ptp = list_first_entry_or_null(&mmu->ptp.list, typeof(*ptp), head); in nvkm_mmu_ptp_get() 75 if (!ptp) { in nvkm_mmu_ptp_get() 77 if (!(ptp = kmalloc(sizeof(*ptp), GFP_KERNEL))) { in nvkm_mmu_ptp_get() 90 slot = nvkm_memory_size(ptp->pt->memory) >> ptp->shift; in nvkm_mmu_ptp_get() 92 ptp->free = ptp->mask; in nvkm_mmu_ptp_get() 93 list_add(&ptp->head, &mmu->ptp.list); in nvkm_mmu_ptp_get() [all …]
|
| /linux/drivers/net/ethernet/renesas/ |
| A D | ravb_ptp.c | 94 ptp.info); in ravb_ptp_adjfine() 105 priv->ptp.current_addend = addend; in ravb_ptp_adjfine() 123 ptp.info); in ravb_ptp_adjtime() 144 ptp.info); in ravb_ptp_gettime64() 159 ptp.info); in ravb_ptp_settime64() 174 ptp.info); in ravb_ptp_extts() 191 priv->ptp.extts[req->index] = on; in ravb_ptp_extts() 209 ptp.info); in ravb_ptp_perout() 330 priv->ptp.info = ravb_ptp_info; in ravb_ptp_init() 333 priv->ptp.current_addend = priv->ptp.default_addend; in ravb_ptp_init() [all …]
|
| A D | rcar_gen4_ptp.c | 15 #define ptp_to_priv(ptp) container_of(ptp, struct rcar_gen4_ptp_private, info) argument 31 struct rcar_gen4_ptp_private *ptp_priv = ptp_to_priv(ptp); in rcar_gen4_ptp_adjfine() 64 _rcar_gen4_ptp_gettime(ptp, ts); in rcar_gen4_ptp_gettime() 93 _rcar_gen4_ptp_settime(ptp, ts); in rcar_gen4_ptp_settime() 107 _rcar_gen4_ptp_gettime(ptp, &ts); in rcar_gen4_ptp_adjtime() 110 _rcar_gen4_ptp_settime(ptp, &ts); in rcar_gen4_ptp_adjtime() 191 struct rcar_gen4_ptp_private *ptp; in rcar_gen4_ptp_alloc() local 193 ptp = devm_kzalloc(&pdev->dev, sizeof(*ptp), GFP_KERNEL); in rcar_gen4_ptp_alloc() 194 if (!ptp) in rcar_gen4_ptp_alloc() 197 ptp->info = rcar_gen4_ptp_info; in rcar_gen4_ptp_alloc() [all …]
|
| /linux/drivers/net/ethernet/intel/ice/ |
| A D | ice_ptp.c | 1177 kthread_queue_delayed_work(pf->ptp.kworker, &pf->ptp.work, in ice_ptp_reset_cached_phctime() 2737 struct ice_pf *pf = container_of(ptp, struct ice_pf, ptp); in ice_ptp_periodic_work() 2748 kthread_queue_delayed_work(ptp->kworker, &ptp->work, in ice_ptp_periodic_work() 2759 struct ice_ptp *ptp = &pf->ptp; in ice_ptp_prepare_for_reset() local 2798 struct ice_ptp *ptp = &pf->ptp; in ice_ptp_rebuild_owner() local 2868 struct ice_ptp *ptp = &pf->ptp; in ice_ptp_rebuild() local 2888 kthread_queue_delayed_work(ptp->kworker, &ptp->work, 0); in ice_ptp_rebuild() 3036 ptp = &pf->ptp; in ice_ptp_register_auxbus_driver() 3196 kthread_queue_delayed_work(ptp->kworker, &ptp->work, 0); in ice_ptp_init_work() 3251 ptp = &pf->ptp; in ice_ptp_create_auxbus_device() [all …]
|
| /linux/Documentation/ABI/testing/ |
| A D | sysfs-ptp | 9 What: /sys/class/ptp/ptp<N>/ 17 What: /sys/class/ptp/ptp<N>/clock_name 28 What: /sys/class/ptp/ptp<N>/max_adjustment 36 What: /sys/class/ptp/ptp<N>/max_vclocks 43 What: /sys/class/ptp/ptp<N>/n_alarms 64 What: /sys/class/ptp/ptp<N>/n_pins 71 What: /sys/class/ptp/ptp<N>/n_vclocks 84 What: /sys/class/ptp/ptp<N>/pins 116 What: /sys/class/ptp/ptp<N>/fifo 124 What: /sys/class/ptp/ptp<N>/period [all …]
|
| /linux/drivers/net/ethernet/cavium/common/ |
| A D | cavium_ptp.h | 30 void cavium_ptp_put(struct cavium_ptp *ptp); 32 static inline u64 cavium_ptp_tstamp2time(struct cavium_ptp *ptp, u64 tstamp) in cavium_ptp_tstamp2time() argument 37 spin_lock_irqsave(&ptp->spin_lock, flags); in cavium_ptp_tstamp2time() 38 ret = timecounter_cyc2time(&ptp->time_counter, tstamp); in cavium_ptp_tstamp2time() 39 spin_unlock_irqrestore(&ptp->spin_lock, flags); in cavium_ptp_tstamp2time() 56 static inline void cavium_ptp_put(struct cavium_ptp *ptp) {} in cavium_ptp_put() argument 58 static inline u64 cavium_ptp_tstamp2time(struct cavium_ptp *ptp, u64 tstamp) in cavium_ptp_tstamp2time() argument
|
| /linux/drivers/net/phy/mscc/ |
| A D | mscc_ptp.c | 458 len = skb_queue_len(&ptp->tx_queue); in vsc85xx_dequeue_skb() 463 skb = __skb_dequeue(&ptp->tx_queue); in vsc85xx_dequeue_skb() 497 vsc85xx_dequeue_skb(ptp); in vsc85xx_get_tx_ts() 1130 vsc8531->ptp->configured = 1; in vsc85xx_hwtstamp() 1165 if (!vsc8531->ptp->configured) in vsc85xx_txtstamp() 1190 if (!vsc8531->ptp->configured) in vsc85xx_rxtstamp() 1490 vsc8531->ptp->ptp_clock = ptp_clock_register(&vsc8531->ptp->caps, in __vsc8584_init_ptp() 1537 vsc85xx_get_tx_ts(priv->ptp); in vsc8584_handle_ts_interrupt() 1551 vsc8531->ptp = devm_kzalloc(&phydev->mdio.dev, sizeof(*vsc8531->ptp), in vsc8584_ptp_probe() 1553 if (!vsc8531->ptp) in vsc8584_ptp_probe() [all …]
|
| /linux/include/soc/mscc/ |
| A D | ocelot_ptp.h | 48 int ocelot_ptp_gettime64(struct ptp_clock_info *ptp, struct timespec64 *ts); 49 int ocelot_ptp_settime64(struct ptp_clock_info *ptp, 51 int ocelot_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta); 52 int ocelot_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm); 53 int ocelot_ptp_verify(struct ptp_clock_info *ptp, unsigned int pin, 55 int ocelot_ptp_enable(struct ptp_clock_info *ptp,
|
| /linux/Documentation/devicetree/bindings/ptp/ |
| A D | brcm,ptp-dte.txt | 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";
|