| /linux/drivers/net/ethernet/qlogic/qede/ |
| A D | qede_ptp.c | 112 timecounter_init(&ptp->tc, &ptp->cc, ns); in qede_ptp_settime() 203 struct qede_ptp *ptp = edev->ptp; in qede_ptp_cfg_filters() local 296 ptp = edev->ptp; in qede_ptp_hw_ts() 328 struct qede_ptp *ptp = edev->ptp; in qede_ptp_get_ts_info() local 374 ptp = edev->ptp; in qede_ptp_disable() 407 ptp = edev->ptp; in qede_ptp_init() 424 memset(&ptp->cc, 0, sizeof(ptp->cc)); in qede_ptp_init() 447 ptp->ops = edev->ops->ptp; in qede_ptp_enable() 454 edev->ptp = ptp; in qede_ptp_enable() 498 ptp = edev->ptp; in qede_ptp_tx_ts() [all …]
|
| /linux/drivers/ptp/ |
| A D | ptp_clock.c | 85 return ptp->info->settime64(ptp->info, tp); in ptp_clock_settime() 94 err = ptp->info->gettimex64(ptp->info, tp, NULL); in ptp_clock_gettime() 96 err = ptp->info->gettime64(ptp->info, tp); in ptp_clock_gettime() 178 kfree(ptp); in ptp_clock_release() 271 ptp->pps_source->lookup_cookie = ptp; in ptp_clock_register() 276 ptp->dev.devt = ptp->devid; in ptp_clock_register() 279 ptp->dev.groups = ptp->pin_attr_groups; in ptp_clock_register() 281 dev_set_drvdata(&ptp->dev, ptp); in ptp_clock_register() 282 dev_set_name(&ptp->dev, "ptp%d", ptp->index); in ptp_clock_register() 285 err = posix_clock_register(&ptp->clock, &ptp->dev); in ptp_clock_register() [all …]
|
| A D | ptp_sysfs.c | 216 *(ptp->vclock_index + ptp->n_vclocks + i) = in n_vclocks_store() 231 *(ptp->vclock_index + ptp->n_vclocks - i) = -1; in n_vclocks_store() 239 ptp->n_vclocks = num; in n_vclocks_store() 294 ptp->max_vclocks = max; in max_vclocks_store() 426 ptp->pin_dev_attr = kcalloc(n_pins, sizeof(*ptp->pin_dev_attr), in ptp_populate_pin_groups() 428 if (!ptp->pin_dev_attr) in ptp_populate_pin_groups() 431 ptp->pin_attr = kcalloc(1 + n_pins, sizeof(*ptp->pin_attr), GFP_KERNEL); in ptp_populate_pin_groups() 432 if (!ptp->pin_attr) in ptp_populate_pin_groups() 446 ptp->pin_attr_group.attrs = ptp->pin_attr; in ptp_populate_pin_groups() 448 ptp->pin_attr_groups[0] = &ptp->pin_attr_group; in ptp_populate_pin_groups() [all …]
|
| A D | ptp_vclock.c | 102 if (ptp->info->gettimex64) in ptp_vclock_read() 103 ptp->info->gettimex64(ptp->info, &ts, NULL); in ptp_vclock_read() 105 ptp->info->gettime64(ptp->info, &ts); in ptp_vclock_read() 156 struct ptp_clock *ptp; in ptp_get_vclocks_index() local 168 ptp = dev_get_drvdata(dev); in ptp_get_vclocks_index() 179 memcpy(*vclock_index, ptp->vclock_index, sizeof(int) * ptp->n_vclocks); in ptp_get_vclocks_index() 180 num = ptp->n_vclocks; in ptp_get_vclocks_index() 182 mutex_unlock(&ptp->n_vclocks_mux); in ptp_get_vclocks_index() 193 struct ptp_clock *ptp; in ptp_convert_timestamp() local 203 ptp = dev_get_drvdata(dev); in ptp_convert_timestamp() [all …]
|
| A D | .built-in.a.cmd | 1 …ptp/built-in.a := echo >/dev/null; rm -f drivers/ptp/built-in.a; /usr/bin/ccache /home/test/worksp…
|
| A D | ptp_chardev.c | 136 caps.pps = ptp->info->pps; in ptp_ioctl() 137 caps.n_pins = ptp->info->n_pins; in ptp_ioctl() 182 mutex_unlock(&ptp->pincfg_mux); in ptp_ioctl() 250 mutex_unlock(&ptp->pincfg_mux); in ptp_ioctl() 273 err = ptp->info->getcrosststamp(ptp->info, &xtstamp); in ptp_ioctl() 294 if (!ptp->info->gettimex64) { in ptp_ioctl() 310 err = ptp->info->gettimex64(ptp->info, &ts, &sts); in ptp_ioctl() 466 mutex_unlock(&ptp->tsevq_mux); in ptp_read() 470 if (ptp->defunct) { in ptp_read() 471 mutex_unlock(&ptp->tsevq_mux); in ptp_read() [all …]
|
| A D | ptp_private.h | 84 static inline bool ptp_vclock_in_use(struct ptp_clock *ptp) in ptp_vclock_in_use() argument 88 if (mutex_lock_interruptible(&ptp->n_vclocks_mux)) in ptp_vclock_in_use() 91 if (!ptp->is_virtual_clock && ptp->n_vclocks) in ptp_vclock_in_use() 94 mutex_unlock(&ptp->n_vclocks_mux); in ptp_vclock_in_use() 106 int ptp_set_pinfunc(struct ptp_clock *ptp, unsigned int pin, 126 int ptp_populate_pin_groups(struct ptp_clock *ptp); 127 void ptp_cleanup_pin_groups(struct ptp_clock *ptp);
|
| /linux/drivers/net/ethernet/broadcom/bnxt/ |
| A D | bnxt_ptp.c | 52 timecounter_init(&ptp->tc, &ptp->cc, ns); in bnxt_ptp_settime() 77 if (!ptp) in bnxt_ptp_get_current_time() 80 WRITE_ONCE(ptp->old_time, ptp->current_time); in bnxt_ptp_get_current_time() 414 if (!ptp) in bnxt_hwtstamp_set() 484 if (!ptp) in bnxt_hwtstamp_get() 611 if (!ptp) in bnxt_get_rx_ts_p5() 614 BNXT_READ_TIME64(ptp, time, ptp->old_time); in bnxt_get_rx_ts_p5() 725 if (!ptp) in bnxt_ptp_init() 744 memset(&ptp->cc, 0, sizeof(ptp->cc)); in bnxt_ptp_init() 769 WRITE_ONCE(ptp->old_time, ptp->current_time); in bnxt_ptp_init() [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() 71 struct hclge_ptp *ptp = hdev->ptp; in hclge_ptp_set_tx_info() local 81 ptp->tx_cnt++; in hclge_ptp_set_tx_info() 98 hdev->ptp->last_tx_seqid = readl(hdev->ptp->io_base + in hclge_ptp_clean_tx_hwts() 439 if (!ptp) in hclge_ptp_create_clock() 443 snprintf(ptp->info.name, sizeof(ptp->info.name), "%s", in hclge_ptp_create_clock() 459 ptp->info.n_alarm, PTR_ERR(ptp->clock)); in hclge_ptp_create_clock() 470 hdev->ptp = ptp; in hclge_ptp_create_clock() 542 struct hclge_ptp *ptp = hdev->ptp; in hclge_ptp_uninit() local [all …]
|
| /linux/drivers/net/ethernet/marvell/octeontx2/af/ |
| A D | ptp.c | 55 struct ptp *ptp = first_ptp_block; in ptp_get() local 61 if (!ptp) in ptp_get() 64 return ptp; in ptp_get() 67 void ptp_put(struct ptp *ptp) in ptp_put() argument 69 if (!ptp) in ptp_put() 115 static int ptp_get_clock(struct ptp *ptp, u64 *clk) in ptp_get_clock() argument 129 if (!ptp) in ptp_start() 172 static int ptp_get_tstmp(struct ptp *ptp, u64 *clk) in ptp_get_tstmp() argument 190 struct ptp *ptp; in ptp_probe() local 193 ptp = devm_kzalloc(dev, sizeof(*ptp), GFP_KERNEL); in ptp_probe() [all …]
|
| A D | ptp.h | 15 struct ptp { struct 21 struct ptp *ptp_get(void); argument 22 void ptp_put(struct ptp *ptp); 23 void ptp_start(struct ptp *ptp, u64 sclk, u32 ext_clk_freq, u32 extts);
|
| /linux/drivers/net/ethernet/microchip/ |
| A D | lan743x_ptp.c | 69 struct lan743x_ptp *ptp = &adapter->ptp; in lan743x_ptp_tx_ts_enqueue_ts() local 86 struct lan743x_ptp *ptp = &adapter->ptp; in lan743x_ptp_tx_ts_complete() local 147 struct lan743x_ptp *ptp = &adapter->ptp; in lan743x_ptp_reserve_event_ch() local 166 struct lan743x_ptp *ptp = &adapter->ptp; in lan743x_ptp_release_event_ch() local 188 struct lan743x_ptp *ptp = &adapter->ptp; in lan743x_led_mux_enable() local 205 struct lan743x_ptp *ptp = &adapter->ptp; in lan743x_led_mux_save() local 456 struct lan743x_ptp *ptp = &adapter->ptp; in lan743x_ptp_perout_off() local 486 struct lan743x_ptp *ptp = &adapter->ptp; in lan743x_ptp_perout() local 785 struct lan743x_ptp *ptp = &adapter->ptp; in lan743x_ptp_clock_get() local 808 struct lan743x_ptp *ptp = &adapter->ptp; in lan743x_ptp_clock_step() local [all …]
|
| /linux/drivers/net/ethernet/marvell/octeontx2/nic/ |
| A D | otx2_ptp.c | 19 if (!ptp->nic) in otx2_ptp_adjfine() 36 if (!ptp->nic) in ptp_set_thresh() 56 if (!ptp->nic) in ptp_cc_read() 83 if (!ptp->nic) in ptp_tstmp_read() 145 timecounter_init(&ptp->time_counter, &ptp->cycle_counter, nsec); in otx2_ptp_settime() 201 if (!ptp->nic) in otx2_ptp_enable() 306 struct otx2_ptp *ptp = pfvf->ptp; in otx2_ptp_destroy() local 308 if (!ptp) in otx2_ptp_destroy() 312 kfree(ptp); in otx2_ptp_destroy() 319 if (!pfvf->ptp) in otx2_ptp_clock_index() [all …]
|
| /linux/drivers/net/ethernet/sfc/ |
| 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() 1693 queue_work(ptp->workwq, &ptp->work); in efx_ptp_rx() 1711 queue_work(ptp->workwq, &ptp->work); in efx_ptp_tx() 1790 if (!ptp) in efx_ptp_get_ts_info() 1851 queue_work(ptp->workwq, &ptp->work); in ptp_event_failure() 1890 queue_work(ptp->workwq, &ptp->work); in ptp_event_rx() 1912 queue_work(ptp->pps_workwq, &ptp->pps_work); in ptp_event_pps() 1920 if (!ptp) { in efx_ptp_event() [all …]
|
| /linux/include/linux/ |
| A D | ptp_clock_kernel.h | 149 int (*adjfreq)(struct ptp_clock_info *ptp, s32 delta); 151 int (*adjtime)(struct ptp_clock_info *ptp, s64 delta); 155 int (*getcrosststamp)(struct ptp_clock_info *ptp, 158 int (*enable)(struct ptp_clock_info *ptp, 162 long (*do_aux_work)(struct ptp_clock_info *ptp); 250 extern void ptp_clock_event(struct ptp_clock *ptp, 259 extern int ptp_clock_index(struct ptp_clock *ptp); 277 int ptp_find_pin(struct ptp_clock *ptp, 290 int ptp_find_pin_unlocked(struct ptp_clock *ptp, 308 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_adjfreq() 105 addend = priv->ptp.default_addend; in ravb_ptp_adjfreq() 112 priv->ptp.current_addend = addend; in ravb_ptp_adjfreq() 130 ptp.info); in ravb_ptp_adjtime() 151 ptp.info); in ravb_ptp_gettime64() 166 ptp.info); in ravb_ptp_settime64() 181 ptp.info); in ravb_ptp_extts() 216 ptp.info); in ravb_ptp_perout() 337 priv->ptp.info = ravb_ptp_info; in ravb_ptp_init() 340 priv->ptp.current_addend = priv->ptp.default_addend; in ravb_ptp_init() [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/intel/ice/ |
| A D | ice_ptp.c | 354 if (pf->ptp.clock) in ice_get_ptp_clock_index() 399 if (!pf->ptp.clock) in ice_set_ptp_clock_index() 743 struct ice_pf *pf = container_of(ptp, struct ice_pf, ptp); in ice_ptp_extts_work() 1463 if (pf->ptp.clock) in ice_ptp_create_clock() 1468 info = &pf->ptp.info; in ice_ptp_create_clock() 1629 kthread_queue_work(pf->ptp.kworker, &pf->ptp.port.tx.work); in ice_ptp_process_ts() 1769 struct ice_pf *pf = container_of(ptp, struct ice_pf, ptp); in ice_ptp_periodic_work() 1779 kthread_queue_delayed_work(ptp->kworker, &ptp->work, in ice_ptp_periodic_work() 1906 kthread_queue_delayed_work(pf->ptp.kworker, &pf->ptp.work, 0); in ice_ptp_init() 1913 if (pf->ptp.clock) { in ice_ptp_init() [all …]
|
| /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() 1135 vsc8531->ptp->configured = 1; in vsc85xx_hwtstamp() 1170 if (!vsc8531->ptp->configured) in vsc85xx_txtstamp() 1195 if (!vsc8531->ptp->configured) in vsc85xx_rxtstamp() 1495 vsc8531->ptp->ptp_clock = ptp_clock_register(&vsc8531->ptp->caps, in __vsc8584_init_ptp() 1542 vsc85xx_get_tx_ts(priv->ptp); in vsc8584_handle_ts_interrupt() 1556 vsc8531->ptp = devm_kzalloc(&phydev->mdio.dev, sizeof(*vsc8531->ptp), in vsc8584_ptp_probe() 1558 if (!vsc8531->ptp) in vsc8584_ptp_probe() [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/Documentation/devicetree/bindings/pinctrl/ |
| A D | marvell,kirkwood-pinctrl.txt | 30 mpp6 6 sysrst(out), spi(mosi), ptp(trig) 31 mpp7 7 gpo, pex(rsto), spi(cs), ptp(trig) 37 mpp11 11 gpio, spi(miso), uart0(rxd), ptp(clk), ptp-1(evreq), 38 ptp-2(trig) 68 mpp6 6 sysrst(out), spi(mosi), ptp(trig) 75 mpp11 11 gpio, spi(miso), uart0(rxd), ptp(clk), ptp-1(evreq), 76 ptp-2(trig), sata0(act) 119 mpp11 11 gpio, spi(miso), uart0(rxd), ptp(clk), ptp-1(evreq), 120 ptp-2(trig), sata0(act) 168 mpp11 11 gpio, spi(miso), uart0(rxd), ptp(clk), ptp-1(evreq), [all …]
|
| /linux/drivers/net/ethernet/intel/e1000e/ |
| A D | ptp.c | 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() 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() 152 static int e1000e_phc_getcrosststamp(struct ptp_clock_info *ptp, in e1000e_phc_getcrosststamp() argument 155 struct e1000_adapter *adapter = container_of(ptp, struct e1000_adapter, in e1000e_phc_getcrosststamp() 173 static int e1000e_phc_gettimex(struct ptp_clock_info *ptp, in e1000e_phc_gettimex() argument 177 struct e1000_adapter *adapter = container_of(ptp, struct e1000_adapter, in e1000e_phc_gettimex() 203 static int e1000e_phc_settime(struct ptp_clock_info *ptp, in e1000e_phc_settime() argument [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";
|