/linux/drivers/net/ethernet/qlogic/qede/ |
H A 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_adjfine() - Adjust the frequency of the PTP cycle counter. 33 * @info: The PTP clock info structure. 42 struct qede_ptp *ptp = container_of(info, struct qede_ptp, clock_info); in qede_ptp_adjfine() local 44 struct qede_dev *edev = ptp->edev; in qede_ptp_adjfine() 49 spin_lock_bh(&ptp->lock); in qede_ptp_adjfine() 50 rc = ptp->ops->adjfreq(edev->cdev, ppb); in qede_ptp_adjfine() 51 spin_unlock_bh(&ptp->lock); in qede_ptp_adjfine() 53 DP_ERR(edev, "PTP adjfin in qede_ptp_adjfine() 64 struct qede_ptp *ptp; qede_ptp_adjtime() local 82 struct qede_ptp *ptp; qede_ptp_gettime() local 103 struct qede_ptp *ptp; qede_ptp_settime() local 127 struct qede_ptp *ptp; qede_ptp_ancillary_feature_enable() local 141 struct qede_ptp *ptp; qede_ptp_task() local 187 struct qede_ptp *ptp; qede_ptp_read_cc() local 206 struct qede_ptp *ptp = edev->ptp; qede_ptp_cfg_filters() local 296 struct qede_ptp *ptp; qede_ptp_hw_ts() local 326 struct qede_ptp *ptp = edev->ptp; qede_ptp_get_ts_info() local 363 struct qede_ptp *ptp; qede_ptp_disable() local 395 struct qede_ptp *ptp; qede_ptp_init() local 428 struct qede_ptp *ptp; qede_ptp_enable() local 487 struct qede_ptp *ptp; qede_ptp_tx_ts() local 521 struct qede_ptp *ptp; qede_ptp_rx_ts() local [all...] |
/linux/drivers/net/ethernet/marvell/octeontx2/af/ |
H A D | ptp.c | 2 /* Marvell PTP driver 16 #include "ptp.h" 19 #define DRV_NAME "Marvell PTP Driver" 67 #define is_rev_A0(ptp) (((ptp)->pdev->revision & 0x0F) == 0x0) argument 68 #define is_rev_A1(ptp) (((ptp)->pdev->revision & 0x0F) == 0x1) argument 70 /* PTP atomic update operation type */ 77 static struct ptp *first_ptp_block; 80 static bool is_ptp_dev_cnf10ka(struct ptp *pt argument 85 is_ptp_dev_cn10ka(struct ptp * ptp) is_ptp_dev_cn10ka() argument 90 cn10k_ptp_errata(struct ptp * ptp) cn10k_ptp_errata() argument 101 struct ptp *ptp = rvu->ptp; is_tstmp_atomic_update_supported() local 118 struct ptp *ptp = container_of(hrtimer, struct ptp, hrtimer); ptp_reset_thresh() local 144 ptp_hrtimer_start(struct ptp * ptp,ktime_t start_ns) ptp_hrtimer_start() argument 153 read_ptp_tstmp_sec_nsec(struct ptp * ptp) read_ptp_tstmp_sec_nsec() argument 172 read_ptp_tstmp_nsec(struct ptp * ptp) read_ptp_tstmp_nsec() argument 231 struct ptp *ptp = first_ptp_block; ptp_get() local 245 ptp_put(struct ptp * ptp) ptp_put() argument 253 ptp_atomic_update(struct ptp * ptp,u64 timestamp) ptp_atomic_update() argument 275 ptp_atomic_adjtime(struct ptp * ptp,s64 delta) ptp_atomic_adjtime() argument 312 ptp_adjfine(struct ptp * ptp,long scaled_ppm) ptp_adjfine() argument 359 ptp_get_clock(struct ptp * ptp,u64 * clk) ptp_get_clock() argument 369 struct ptp *ptp = rvu->ptp; ptp_start() local 430 ptp_get_tstmp(struct ptp * ptp,u64 * clk) ptp_get_tstmp() argument 444 ptp_set_thresh(struct ptp * ptp,u64 thresh) ptp_set_thresh() argument 452 ptp_config_hrtimer(struct ptp * ptp,int on) ptp_config_hrtimer() argument 467 ptp_pps_on(struct ptp * ptp,int on,u64 period) ptp_pps_on() argument 520 struct ptp *ptp; ptp_probe() local 573 struct ptp *ptp = pci_get_drvdata(pdev); ptp_remove() local [all...] |
/linux/drivers/ptp/ |
H A D | ptp_clock.c | 3 * PTP 1588 clock support 29 .name = "ptp", 96 struct ptp_clock *ptp = container_of(pc, struct ptp_clock, clock); in ptp_clock_settime() local 98 if (ptp_clock_freerun(ptp)) { in ptp_clock_settime() 99 pr_err_ratelimited("ptp: physical clock is free running\n"); in ptp_clock_settime() 103 return ptp->info->settime64(ptp->info, tp); in ptp_clock_settime() 108 struct ptp_clock *ptp = container_of(pc, struct ptp_clock, clock); in ptp_clock_gettime() local 111 if (ptp->info->gettimex64) in ptp_clock_gettime() 112 err = ptp in ptp_clock_gettime() 120 struct ptp_clock *ptp = container_of(pc, struct ptp_clock, clock); ptp_clock_adjtime() local 192 struct ptp_clock *ptp = container_of(dev, struct ptp_clock, dev); ptp_clock_release() local 221 ptp_enable(struct ptp_clock_info * ptp,struct ptp_clock_request * request,int on) ptp_enable() argument 228 struct ptp_clock *ptp = container_of(work, struct ptp_clock, ptp_aux_kworker() local 244 struct ptp_clock *ptp; ptp_clock_register() local 408 struct ptp_clock *ptp = dev_get_drvdata(dev); unregister_vclock() local 414 ptp_clock_unregister(struct ptp_clock * ptp) ptp_clock_unregister() argument 438 ptp_clock_event(struct ptp_clock * ptp,struct ptp_clock_event * event) ptp_clock_event() argument 474 ptp_clock_index(struct ptp_clock * ptp) ptp_clock_index() argument 480 ptp_find_pin(struct ptp_clock * ptp,enum ptp_pin_function func,unsigned int chan) ptp_find_pin() argument 498 ptp_find_pin_unlocked(struct ptp_clock * ptp,enum ptp_pin_function func,unsigned int chan) ptp_find_pin_unlocked() argument 513 ptp_schedule_worker(struct ptp_clock * ptp,unsigned long delay) ptp_schedule_worker() argument 519 ptp_cancel_worker_sync(struct ptp_clock * ptp) ptp_cancel_worker_sync() argument [all...] |
H A D | ptp_sysfs.c | 3 * PTP 1588 clock support - sysfs interface. 16 struct ptp_clock *ptp = dev_get_drvdata(dev); in clock_name_show() local 17 return sysfs_emit(page, "%s\n", ptp->info->name); in clock_name_show() 25 struct ptp_clock *ptp = dev_get_drvdata(dev); in max_phase_adjustment_show() local 27 return sysfs_emit(page, "%d\n", ptp->info->getmaxphase(ptp->info)); in max_phase_adjustment_show() 35 struct ptp_clock *ptp = dev_get_drvdata(dev); \ 36 return sysfs_emit(page, "%d\n", ptp->info->var); \ 51 struct ptp_clock *ptp = dev_get_drvdata(dev); in extts_enable_store() local 52 struct ptp_clock_info *ops = ptp in extts_enable_store() 76 struct ptp_clock *ptp = dev_get_drvdata(dev); extts_fifo_show() local 115 struct ptp_clock *ptp = dev_get_drvdata(dev); period_store() local 143 struct ptp_clock *ptp = dev_get_drvdata(dev); pps_enable_store() local 168 struct ptp_clock *ptp = dev_get_drvdata(dev); unregister_vclock() local 190 struct ptp_clock *ptp = dev_get_drvdata(dev); n_vclocks_show() local 207 struct ptp_clock *ptp = dev_get_drvdata(dev); n_vclocks_store() local 269 struct ptp_clock *ptp = dev_get_drvdata(dev); max_vclocks_show() local 281 struct ptp_clock *ptp = dev_get_drvdata(dev); max_vclocks_store() local 345 struct ptp_clock *ptp = dev_get_drvdata(dev); ptp_is_attribute_visible() local 381 ptp_pin_name2index(struct ptp_clock * ptp,const char * name) ptp_pin_name2index() argument 394 struct ptp_clock *ptp = dev_get_drvdata(dev); ptp_pin_show() local 416 struct ptp_clock *ptp = dev_get_drvdata(dev); ptp_pin_store() local 438 ptp_populate_pin_groups(struct ptp_clock * ptp) ptp_populate_pin_groups() argument 478 ptp_cleanup_pin_groups(struct ptp_clock * ptp) ptp_cleanup_pin_groups() argument [all...] |
H A D | Kconfig | 3 # PTP clock support configuration 6 menu "PTP clock support" 9 tristate "PTP clock support" 17 standard defines a Precision Time Protocol (PTP), which can 23 This driver adds support for PTP clocks as character 24 devices. If you want to use a PTP clock, then you should 28 will be called ptp. 37 into vmlinux while the PTP support itself is in a loadable 39 If PTP support is disabled, this dependency will still be 43 tristate "Broadcom DTE as PTP cloc [all...] |
H A D | ptp_vclock.c | 3 * PTP virtual clock driver 43 static int ptp_vclock_adjfine(struct ptp_clock_info *ptp, long scaled_ppm) in ptp_vclock_adjfine() argument 45 struct ptp_vclock *vclock = info_to_vclock(ptp); in ptp_vclock_adjfine() 60 static int ptp_vclock_adjtime(struct ptp_clock_info *ptp, s64 delta) in ptp_vclock_adjtime() argument 62 struct ptp_vclock *vclock = info_to_vclock(ptp); in ptp_vclock_adjtime() 72 static int ptp_vclock_gettime(struct ptp_clock_info *ptp, in ptp_vclock_gettime() argument 75 struct ptp_vclock *vclock = info_to_vclock(ptp); in ptp_vclock_gettime() 87 static int ptp_vclock_gettimex(struct ptp_clock_info *ptp, in ptp_vclock_gettimex() argument 91 struct ptp_vclock *vclock = info_to_vclock(ptp); in ptp_vclock_gettimex() 111 static int ptp_vclock_settime(struct ptp_clock_info *ptp, in ptp_vclock_settime() argument [all …]
|
/linux/drivers/net/ethernet/hisilicon/hns3/hns3pf/ |
H A D | hclge_ptp.c | 11 struct hclge_ptp *ptp = hdev->ptp; in hclge_ptp_get_cycle() local 13 ptp->cycle.quo = readl(hdev->ptp->io_base + HCLGE_PTP_CYCLE_QUO_REG) & in hclge_ptp_get_cycle() 15 ptp->cycle.numer = readl(hdev->ptp->io_base + HCLGE_PTP_CYCLE_NUM_REG); in hclge_ptp_get_cycle() 16 ptp->cycle.den = readl(hdev->ptp->io_base + HCLGE_PTP_CYCLE_DEN_REG); in hclge_ptp_get_cycle() 18 if (ptp->cycle.den == 0) { in hclge_ptp_get_cycle() 19 dev_err(&hdev->pdev->dev, "invalid ptp cycl in hclge_ptp_get_cycle() 26 hclge_ptp_adjfine(struct ptp_clock_info * ptp,long scaled_ppm) hclge_ptp_adjfine() argument 60 struct hclge_ptp *ptp = hdev->ptp; hclge_ptp_set_tx_info() local 132 hclge_ptp_gettimex(struct ptp_clock_info * ptp,struct timespec64 * ts,struct ptp_system_timestamp * sts) hclge_ptp_gettimex() argument 152 hclge_ptp_settime(struct ptp_clock_info * ptp,const struct timespec64 * ts) hclge_ptp_settime() argument 172 hclge_ptp_adjtime(struct ptp_clock_info * ptp,s64 delta) hclge_ptp_adjtime() argument 424 struct hclge_ptp *ptp; hclge_ptp_create_clock() local 534 struct hclge_ptp *ptp = hdev->ptp; hclge_ptp_uninit() local [all...] |
/linux/drivers/net/ethernet/microchip/ |
H A D | lan743x_ptp.c | 81 struct lan743x_ptp *ptp = &adapter->ptp; in lan743x_ptp_tx_ts_enqueue_ts() local 83 spin_lock_bh(&ptp->tx_ts_lock); in lan743x_ptp_tx_ts_enqueue_ts() 84 if (ptp->tx_ts_queue_size < LAN743X_PTP_NUMBER_OF_TX_TIMESTAMPS) { in lan743x_ptp_tx_ts_enqueue_ts() 85 ptp->tx_ts_seconds_queue[ptp->tx_ts_queue_size] = seconds; in lan743x_ptp_tx_ts_enqueue_ts() 86 ptp->tx_ts_nseconds_queue[ptp->tx_ts_queue_size] = nano_seconds; in lan743x_ptp_tx_ts_enqueue_ts() 87 ptp->tx_ts_header_queue[ptp in lan743x_ptp_tx_ts_enqueue_ts() 98 struct lan743x_ptp *ptp = &adapter->ptp; lan743x_ptp_tx_ts_complete() local 159 struct lan743x_ptp *ptp = &adapter->ptp; lan743x_ptp_reserve_event_ch() local 178 struct lan743x_ptp *ptp = &adapter->ptp; lan743x_ptp_release_event_ch() local 202 struct lan743x_ptp *ptp = &adapter->ptp; lan743x_led_mux_enable() local 219 struct lan743x_ptp *ptp = &adapter->ptp; lan743x_led_mux_save() local 337 struct lan743x_ptp *ptp = lan743x_ptpci_adjfine() local 363 struct lan743x_ptp *ptp = lan743x_ptpci_adjtime() local 376 struct lan743x_ptp *ptp = lan743x_ptpci_gettime64() local 397 struct lan743x_ptp *ptp = lan743x_ptpci_settime64() local 426 struct lan743x_ptp *ptp = &adapter->ptp; lan743x_ptp_perout_off() local 456 struct lan743x_ptp *ptp = &adapter->ptp; lan743x_ptp_perout() local 643 struct lan743x_ptp *ptp = &adapter->ptp; lan743x_ptp_io_perout_off() local 695 struct lan743x_ptp *ptp = &adapter->ptp; lan743x_ptp_io_perout() local 852 struct lan743x_ptp *ptp = &adapter->ptp; lan743x_ptp_io_extts_off() local 888 struct lan743x_ptp *ptp = &adapter->ptp; lan743x_ptp_io_event_cap_en() local 932 struct lan743x_ptp *ptp = &adapter->ptp; lan743x_ptp_io_extts() local 959 struct lan743x_ptp *ptp = lan743x_ptpci_enable() local 995 lan743x_ptpci_verify_pin_config(struct ptp_clock_info * ptp,unsigned int pin,enum ptp_pin_function func,unsigned int chan) lan743x_ptpci_verify_pin_config() argument 1029 struct lan743x_ptp *ptp = &adapter->ptp; lan743x_ptp_io_event_clock_get() local 1054 struct lan743x_ptp *ptp = lan743x_ptpci_do_aux_work() local 1189 struct lan743x_ptp *ptp = &adapter->ptp; lan743x_ptp_clock_get() local 1212 struct lan743x_ptp *ptp = &adapter->ptp; lan743x_ptp_io_clock_get() local 1234 struct lan743x_ptp *ptp = &adapter->ptp; lan743x_ptp_clock_step() local 1359 struct lan743x_ptp *ptp = NULL; lan743x_ptp_isr() local 1401 struct lan743x_ptp *ptp = &adapter->ptp; lan743x_ptp_tx_ts_enqueue_skb() local 1455 struct lan743x_ptp *ptp = &adapter->ptp; lan743x_ptp_init() local 1474 struct lan743x_ptp *ptp = &adapter->ptp; lan743x_ptp_open() local 1570 struct lan743x_ptp *ptp = &adapter->ptp; lan743x_ptp_close() local 1635 struct lan743x_ptp *ptp = &adapter->ptp; lan743x_ptp_enable() local 1651 struct lan743x_ptp *ptp = &adapter->ptp; lan743x_ptp_disable() local 1670 struct lan743x_ptp *ptp = &adapter->ptp; lan743x_ptp_reset() local 1690 struct lan743x_ptp *ptp = &adapter->ptp; lan743x_ptp_clock_set() local 1705 struct lan743x_ptp *ptp = &adapter->ptp; lan743x_ptp_request_tx_timestamp() local 1720 struct lan743x_ptp *ptp = &adapter->ptp; lan743x_ptp_unrequest_tx_timestamp() local [all...] |
/linux/Documentation/ABI/testing/ |
H A D | sysfs-ptp | 1 What: /sys/class/ptp/ 7 features of PTP hardware clocks. 9 What: /sys/class/ptp/ptp<N>/ 13 This directory contains the attributes of the Nth PTP 14 hardware clock registered into the PTP class driver 17 What: /sys/class/ptp/ptp<N>/clock_name 21 This file contains the name of the PTP hardware clock 28 What: /sys/class/ptp/pt [all...] |
/linux/drivers/net/ethernet/sfc/siena/ |
H A 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 V 559 efx_ptp_mac_nic_to_ktime_correction(struct efx_nic * efx,struct efx_ptp_data * ptp,u32 nic_major,u32 nic_minor,s32 correction) efx_ptp_mac_nic_to_ktime_correction() argument 612 struct efx_ptp_data *ptp = efx->ptp_data; efx_siena_ptp_nic_to_kernel_time() local 633 struct efx_ptp_data *ptp = efx->ptp_data; efx_ptp_get_attributes() local 861 struct efx_ptp_data *ptp = efx->ptp_data; efx_ptp_send_times() local 932 struct efx_ptp_data *ptp = efx->ptp_data; efx_ptp_process_times() local 1027 struct efx_ptp_data *ptp = efx->ptp_data; efx_ptp_synchronize() local 1154 struct efx_ptp_data *ptp = efx->ptp_data; efx_ptp_drop_time_expired_events() local 1180 struct efx_ptp_data *ptp = efx->ptp_data; efx_ptp_match_rx() local 1228 struct efx_ptp_data *ptp = efx->ptp_data; efx_ptp_process_events() local 1262 struct efx_ptp_data *ptp = efx->ptp_data; efx_ptp_remove_multicast_filters() local 1275 struct efx_ptp_data *ptp = efx->ptp_data; efx_ptp_insert_multicast_filters() local 1324 struct efx_ptp_data *ptp = efx->ptp_data; efx_ptp_start() local 1349 struct efx_ptp_data *ptp = efx->ptp_data; efx_ptp_stop() local 1384 struct efx_ptp_data *ptp = efx_ptp_pps_worker() local 1442 struct efx_ptp_data *ptp; efx_ptp_probe() local 1619 struct efx_ptp_data *ptp = efx->ptp_data; efx_ptp_rx() local 1705 struct efx_ptp_data *ptp = efx->ptp_data; efx_siena_ptp_tx() local 1785 struct efx_ptp_data *ptp = efx->ptp_data; efx_siena_ptp_get_ts_info() local 1827 struct efx_ptp_data *ptp = efx->ptp_data; ptp_event_failure() local 1840 ptp_event_rx(struct efx_nic * efx,struct efx_ptp_data * ptp) ptp_event_rx() argument 1880 ptp_event_fault(struct efx_nic * efx,struct efx_ptp_data * ptp) ptp_event_fault() argument 1891 ptp_event_pps(struct efx_nic * efx,struct efx_ptp_data * ptp) ptp_event_pps() argument 1899 struct efx_ptp_data *ptp = efx->ptp_data; efx_siena_ptp_event() local 1951 struct efx_ptp_data *ptp = efx->ptp_data; efx_siena_time_sync_event() local 1988 struct efx_ptp_data *ptp = efx->ptp_data; __efx_siena_rx_skb_attach_timestamp() local 2041 efx_phc_adjfine(struct ptp_clock_info * ptp,long scaled_ppm) efx_phc_adjfine() argument 2076 efx_phc_adjtime(struct ptp_clock_info * ptp,s64 delta) efx_phc_adjtime() argument 2096 efx_phc_gettime(struct ptp_clock_info * ptp,struct timespec64 * ts) efx_phc_gettime() argument 2122 efx_phc_settime(struct ptp_clock_info * ptp,const struct timespec64 * e_ts) efx_phc_settime() argument 2146 efx_phc_enable(struct ptp_clock_info * ptp,struct ptp_clock_request * request,int enable) efx_phc_enable() argument [all...] |
/linux/drivers/net/ethernet/sfc/ |
H A 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 */ 50 /* Maximum number of events expected to make up a PTP event */ 80 /* Offsets into PTP packet for identification. These offsets are from the 81 * start of the IP header, not the MAC header. Note that neither PTP V1 nor 82 * PTP V2 permit the use of IPV4 options. 92 /* The minimum length of a PTP V 552 efx_ptp_mac_nic_to_ktime_correction(struct efx_nic * efx,struct efx_ptp_data * ptp,u32 nic_major,u32 nic_minor,s32 correction) efx_ptp_mac_nic_to_ktime_correction() argument 605 struct efx_ptp_data *ptp = efx->ptp_data; efx_ptp_nic_to_kernel_time() local 626 struct efx_ptp_data *ptp = efx->ptp_data; efx_ptp_get_attributes() local 848 struct efx_ptp_data *ptp = efx->ptp_data; efx_ptp_send_times() local 919 struct efx_ptp_data *ptp = efx->ptp_data; efx_ptp_process_times() local 1014 struct efx_ptp_data *ptp = efx->ptp_data; efx_ptp_synchronize() local 1179 struct efx_ptp_data *ptp = efx->ptp_data; efx_ptp_process_events() local 1256 struct efx_ptp_data *ptp = efx->ptp_data; efx_ptp_insert_filter() local 1317 struct efx_ptp_data *ptp = efx->ptp_data; efx_ptp_insert_eth_multicast_filter() local 1329 struct efx_ptp_data *ptp = efx->ptp_data; efx_ptp_insert_multicast_filters() local 1395 struct efx_ptp_data *ptp = efx->ptp_data; efx_ptp_insert_unicast_filter() local 1435 struct efx_ptp_data *ptp = efx->ptp_data; efx_ptp_start() local 1460 struct efx_ptp_data *ptp = efx->ptp_data; efx_ptp_stop() local 1487 struct efx_ptp_data *ptp = efx_ptp_pps_worker() local 1526 struct efx_ptp_data *ptp = efx_ptp_cleanup_worker() local 1560 struct efx_ptp_data *ptp; efx_ptp_probe() local 1738 struct efx_ptp_data *ptp = efx->ptp_data; efx_ptp_rx() local 1791 struct efx_ptp_data *ptp = efx->ptp_data; efx_ptp_tx() local 1864 struct efx_ptp_data *ptp = efx->ptp_data; efx_ptp_get_ts_info() local 1916 struct efx_ptp_data *ptp = efx->ptp_data; ptp_event_failure() local 1925 ptp_event_fault(struct efx_nic * efx,struct efx_ptp_data * ptp) ptp_event_fault() argument 1936 ptp_event_pps(struct efx_nic * efx,struct efx_ptp_data * ptp) ptp_event_pps() argument 1944 struct efx_ptp_data *ptp = efx->ptp_data; efx_ptp_event() local 1993 struct efx_ptp_data *ptp = efx->ptp_data; efx_time_sync_event() local 2030 struct efx_ptp_data *ptp = efx->ptp_data; __efx_rx_skb_attach_timestamp() local 2083 efx_phc_adjfine(struct ptp_clock_info * ptp,long scaled_ppm) efx_phc_adjfine() argument 2118 efx_phc_adjtime(struct ptp_clock_info * ptp,s64 delta) efx_phc_adjtime() argument 2138 efx_phc_gettime(struct ptp_clock_info * ptp,struct timespec64 * ts) efx_phc_gettime() argument 2164 efx_phc_settime(struct ptp_clock_info * ptp,const struct timespec64 * e_ts) efx_phc_settime() argument 2188 efx_phc_enable(struct ptp_clock_info * ptp,struct ptp_clock_request * request,int enable) efx_phc_enable() argument [all...] |
/linux/drivers/net/ethernet/intel/idpf/ |
H A D | idpf_ptp.c | 8 * idpf_ptp_get_access - Determine the access type of the PTP features 13 * Return: the type of supported access for the PTP feature. 18 if (adapter->ptp->caps & direct) in idpf_ptp_get_access() 20 else if (adapter->ptp->caps & mailbox) in idpf_ptp_get_access() 27 * idpf_ptp_get_features_access - Determine the access type of PTP features 30 * Fulfill the adapter structure with type of the supported PTP features 35 struct idpf_ptp *ptp = adapter->ptp; in idpf_ptp_get_features_access() local 41 ptp->get_dev_clk_time_access = idpf_ptp_get_access(adapter, in idpf_ptp_get_features_access() 48 ptp in idpf_ptp_get_features_access() 102 struct idpf_ptp *ptp = adapter->ptp; idpf_ptp_read_src_clk_reg_direct() local 193 struct idpf_ptp *ptp = adapter->ptp; idpf_ptp_get_sync_device_time_direct() local 616 struct idpf_ptp *ptp = vport->adapter->ptp; idpf_ptp_extend_ts() local 991 struct idpf_ptp *ptp = adapter->ptp; idpf_ptp_release() local [all...] |
/linux/drivers/net/ethernet/google/gve/ |
H A D | gve_ptp.c | 31 const struct gve_ptp *ptp = container_of(info, struct gve_ptp, info); in gve_ptp_do_aux_work() local 32 struct gve_priv *priv = ptp->priv; in gve_ptp_do_aux_work() 55 struct gve_ptp *ptp; in gve_ptp_init() local 59 dev_dbg(&priv->pdev->dev, "Device does not support PTP\n"); in gve_ptp_init() 63 priv->ptp = kzalloc(sizeof(*priv->ptp), GFP_KERNEL); in gve_ptp_init() 64 if (!priv->ptp) in gve_ptp_init() 67 ptp = priv->ptp; in gve_ptp_init() 68 ptp in gve_ptp_init() 88 struct gve_ptp *ptp = priv->ptp; gve_ptp_release() local [all...] |
/linux/drivers/net/phy/ |
H A 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 Receiv [all...] |
/linux/drivers/net/ethernet/intel/iavf/ |
H A D | iavf_ptp.c | 8 container_of_const(info, struct iavf_adapter, ptp.info) 99 adapter->ptp.hwtstamp_config = *config; in iavf_ptp_set_ts_config() 105 * iavf_ptp_cap_supported - Check if a PTP capability is supported 118 return (adapter->ptp.hw_caps.caps & cap) == cap; in iavf_ptp_cap_supported() 122 * iavf_allocate_ptp_cmd - Allocate a PTP command message structure 126 * Allocates a PTP command message and pre-fills it with the provided message 129 * Return: allocated PTP command. 147 * iavf_queue_ptp_cmd - Queue PTP command for sending over virtchnl 151 * Queue the given command structure into the PTP virtchnl command queue tos 157 mutex_lock(&adapter->ptp in iavf_queue_ptp_cmd() [all...] |
/linux/drivers/net/ethernet/renesas/ |
H A 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_adjfine(struct ptp_clock_info *ptp, long scaled_ppm) in ravb_ptp_adjfine() argument 93 struct ravb_private *priv = container_of(ptp, struct ravb_private, in ravb_ptp_adjfine() 94 ptp.info); in ravb_ptp_adjfine() 100 addend = (u32)adjust_by_scaled_ppm(priv->ptp.default_addend, in ravb_ptp_adjfine() 105 priv->ptp.current_addend = addend; in ravb_ptp_adjfine() 120 static int ravb_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta) in ravb_ptp_adjtime() argument 122 struct ravb_private *priv = container_of(ptp, struc in ravb_ptp_adjtime() 141 ravb_ptp_gettime64(struct ptp_clock_info * ptp,struct timespec64 * ts) ravb_ptp_gettime64() argument 155 ravb_ptp_settime64(struct ptp_clock_info * ptp,const struct timespec64 * ts) ravb_ptp_settime64() argument 170 ravb_ptp_extts(struct ptp_clock_info * ptp,struct ptp_extts_request * req,int on) ravb_ptp_extts() argument 198 ravb_ptp_perout(struct ptp_clock_info * ptp,struct ptp_perout_request * req,int on) ravb_ptp_perout() argument 261 ravb_ptp_enable(struct ptp_clock_info * ptp,struct ptp_clock_request * req,int on) ravb_ptp_enable() argument [all...] |
/linux/drivers/virtio/ |
H A D | virtio_rtc_ptp.c | 3 * Expose virtio_rtc clocks as PTP clocks. 8 * Derived from ptp_kvm_common.c, virtual PTP 1588 clock for use with KVM 23 * struct viortc_ptp_clock - PTP clock abstraction 24 * @ptp_clock: PTP clock handle for unregistering 26 * @ptp_info: PTP clock description 78 * @vio_ptp: virtio_rtc PTP clock 113 * PTP clock operations 117 * viortc_ptp_getcrosststamp() - PTP clock getcrosststamp op 118 * @ptp: PTP cloc 124 viortc_ptp_getcrosststamp(struct ptp_clock_info * ptp,struct system_device_crosststamp * xtstamp) viortc_ptp_getcrosststamp() argument 168 viortc_ptp_adjfine(struct ptp_clock_info * ptp,long scaled_ppm) viortc_ptp_adjfine() argument 174 viortc_ptp_adjtime(struct ptp_clock_info * ptp,s64 delta) viortc_ptp_adjtime() argument 180 viortc_ptp_settime64(struct ptp_clock_info * ptp,const struct timespec64 * ts) viortc_ptp_settime64() argument 191 viortc_ptp_gettimex64(struct ptp_clock_info * ptp,struct timespec64 * ts,struct ptp_system_timestamp * sts) viortc_ptp_gettimex64() argument 216 viortc_ptp_enable(struct ptp_clock_info * ptp,struct ptp_clock_request * rq,int on) viortc_ptp_enable() argument [all...] |
/linux/include/linux/ |
H A D | ptp_clock_kernel.h | 3 * PTP 1588 clock support 19 * struct ptp_clock_request - request PTP clock event 59 * struct ptp_clock_info - describes a PTP hardware clock 73 * PTP_PEROUT_REQUEST ioctl. The PTP core will 78 * PTP_EXTTS_REQUEST ioctl. The PTP core will use 161 * @verify: Confirm that a pin can perform a given function. The PTP 196 int (*adjfine)(struct ptp_clock_info *ptp, long scaled_ppm); 197 int (*adjphase)(struct ptp_clock_info *ptp, s32 phase); 198 s32 (*getmaxphase)(struct ptp_clock_info *ptp); 199 int (*adjtime)(struct ptp_clock_info *ptp, s6 421 ptp_clock_unregister(struct ptp_clock * ptp) ptp_clock_unregister() argument 423 ptp_clock_event(struct ptp_clock * ptp,struct ptp_clock_event * event) ptp_clock_event() argument 426 ptp_clock_index(struct ptp_clock * ptp) ptp_clock_index() argument 428 ptp_find_pin(struct ptp_clock * ptp,enum ptp_pin_function func,unsigned int chan) ptp_find_pin() argument 431 ptp_find_pin_unlocked(struct ptp_clock * ptp,enum ptp_pin_function func,unsigned int chan) ptp_find_pin_unlocked() argument 435 ptp_schedule_worker(struct ptp_clock * ptp,unsigned long delay) ptp_schedule_worker() argument 438 ptp_cancel_worker_sync(struct ptp_clock * ptp) ptp_cancel_worker_sync() argument [all...] |
H A D | ptp_classify.h | 3 * PTP 1588 support 5 * This file implements a BPF that recognizes PTP event messages. 20 #define PTP_CLASS_NONE 0x00 /* not a PTP event message */ 50 /* PTP header flag fields */ 85 * ptp_classify_raw - classify a PTP packet 89 * determine the PTP class. In case the skb does not contain any 90 * PTP protocol data, PTP_CLASS_NONE will be returned, otherwise 97 * ptp_parse_header - Get pointer to the PTP v2 header 107 * Return: Pointer to the ptp v2 header or NULL if not found 112 * ptp_get_msgtype - Extract ptp messag [all...] |
/linux/drivers/net/ethernet/intel/ice/ |
H A D | ice_ptp.c | 66 return !ctrl_pf ? NULL : &ctrl_pf->ptp; in ice_get_ctrl_ptp() 80 const struct ptp_clock_info *info = &pf->ptp.info; in ice_ptp_find_pin_idx() 105 switch (pf->ptp.tx_interrupt_mode) { in ice_ptp_cfg_tx_interrupt() 118 enable = pf->ptp.tstamp_config.tx_type == HWTSTAMP_TX_ON; in ice_ptp_cfg_tx_interrupt() 187 enable_rx = pf->ptp.tstamp_config.rx_filter == HWTSTAMP_FILTER_ALL; in ice_ptp_restore_timestamp_mode() 335 * time stored in the device private PTP structure as the basis for timestamp 347 discard_time = pf->ptp.cached_phc_jiffies + msecs_to_jiffies(2000); in ice_ptp_extend_40b_ts() 349 pf->ptp.tx_hwtstamp_discarded++; in ice_ptp_extend_40b_ts() 353 return ice_ptp_extend_32b_ts(pf->ptp.cached_phc_time, in ice_ptp_extend_40b_ts() 359 * @tx: the PTP T 2474 struct ice_ptp *ptp = &pf->ptp; ice_ptp_set_funcs_e810() local 2794 struct ice_ptp *ptp = container_of(work, struct ice_ptp, work.work); ice_ptp_periodic_work() local 2843 struct ice_ptp *ptp = &pf->ptp; ice_ptp_prepare_for_reset() local 2886 struct ice_ptp *ptp = &pf->ptp; ice_ptp_rebuild_owner() local 2958 struct ice_ptp *ptp = &pf->ptp; ice_ptp_rebuild() local 3001 struct ice_ptp *ptp = &pf->ptp; ice_ptp_setup_pf() local 3018 struct ice_ptp *ptp = &pf->ptp; ice_ptp_cleanup_pf() local 3120 ice_ptp_init_work(struct ice_pf * pf,struct ice_ptp * ptp) ice_ptp_init_work() argument 3212 struct ice_ptp *ptp = &pf->ptp; ice_ptp_init() local [all...] |
/linux/drivers/net/ethernet/intel/e1000e/ |
H A 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 27 static int e1000e_phc_adjfine(struct ptp_clock_info *ptp, long delta) in e1000e_phc_adjfine() argument 29 struct e1000_adapter *adapter = container_of(ptp, struct e1000_adapter, in e1000e_phc_adjfine() 61 * @ptp: ptp clock structure 66 static int e1000e_phc_adjtime(struct ptp_clock_info *ptp, s64 delta) in e1000e_phc_adjtime() argument 68 struct e1000_adapter *adapter = container_of(ptp, struc in e1000e_phc_adjtime() 141 e1000e_phc_getcrosststamp(struct ptp_clock_info * ptp,struct system_device_crosststamp * xtstamp) e1000e_phc_getcrosststamp() argument 162 e1000e_phc_gettimex(struct ptp_clock_info * ptp,struct timespec64 * ts,struct ptp_system_timestamp * sts) e1000e_phc_gettimex() argument 192 e1000e_phc_settime(struct ptp_clock_info * ptp,const struct timespec64 * ts) e1000e_phc_settime() argument 219 e1000e_phc_enable(struct ptp_clock_info __always_unused * ptp,struct ptp_clock_request __always_unused * request,int __always_unused on) e1000e_phc_enable() argument [all...] |
/linux/drivers/net/dsa/mv88e6xxx/ |
H A 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 LE [all...] |
/linux/drivers/net/ethernet/chelsio/cxgb4/ |
H A 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 in cxgb4_ptp_redirect_rx_packet() 206 cxgb4_ptp_adjfine(struct ptp_clock_info * ptp,long scaled_ppm) cxgb4_ptp_adjfine() argument 272 cxgb4_ptp_adjtime(struct ptp_clock_info * ptp,s64 delta) cxgb4_ptp_adjtime() argument 316 cxgb4_ptp_gettime(struct ptp_clock_info * ptp,struct timespec64 * ts) cxgb4_ptp_gettime() argument 339 cxgb4_ptp_settime(struct ptp_clock_info * ptp,const struct timespec64 * ts) cxgb4_ptp_settime() argument 395 cxgb4_ptp_enable(struct ptp_clock_info __always_unused * ptp,struct ptp_clock_request __always_unused * request,int __always_unused on) cxgb4_ptp_enable() argument [all...] |
/linux/drivers/net/ethernet/stmicro/stmmac/ |
H A D | stmmac_ptp.c | 3 PTP 1588 clock using the STMMAC. 16 * @ptp: pointer to ptp_clock_info structure 23 static int stmmac_adjust_freq(struct ptp_clock_info *ptp, long scaled_ppm) in stmmac_adjust_freq() argument 26 container_of(ptp, struct stmmac_priv, ptp_clock_ops); in stmmac_adjust_freq() 42 * @ptp: pointer to ptp_clock_info structure 47 static int stmmac_adjust_time(struct ptp_clock_info *ptp, s64 delta) in stmmac_adjust_time() argument 50 container_of(ptp, struct stmmac_priv, ptp_clock_ops); in stmmac_adjust_time() 69 /* If EST is enabled, disabled it before adjust ptp time. */ in stmmac_adjust_time() 83 /* Calculate new basetime and re-configured EST after PTP time adjust. */ in stmmac_adjust_time() 117 * @ptp 123 stmmac_get_time(struct ptp_clock_info * ptp,struct timespec64 * ts) stmmac_get_time() argument 148 stmmac_set_time(struct ptp_clock_info * ptp,const struct timespec64 * ts) stmmac_set_time() argument 162 stmmac_enable(struct ptp_clock_info * ptp,struct ptp_clock_request * rq,int on) stmmac_enable() argument 256 stmmac_getcrosststamp(struct ptp_clock_info * ptp,struct system_device_crosststamp * xtstamp) stmmac_getcrosststamp() argument [all...] |
/linux/drivers/net/ethernet/meta/fbnic/ |
H A D | fbnic_time.c | 14 /* FBNIC timing & PTP implementation 31 static struct fbnic_dev *fbnic_from_ptp_info(struct ptp_clock_info *ptp) in fbnic_from_ptp_info() argument 33 return container_of(ptp, struct fbnic_dev, ptp_info); in fbnic_from_ptp_info() 94 static long fbnic_ptp_do_aux_work(struct ptp_clock_info *ptp) in fbnic_ptp_do_aux_work() argument 96 struct fbnic_dev *fbd = fbnic_from_ptp_info(ptp); in fbnic_ptp_do_aux_work() 107 static int fbnic_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm) in fbnic_ptp_adjfine() argument 109 struct fbnic_dev *fbd = fbnic_from_ptp_info(ptp); in fbnic_ptp_adjfine() 128 static int fbnic_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta) in fbnic_ptp_adjtime() argument 130 struct fbnic_dev *fbd = fbnic_from_ptp_info(ptp); in fbnic_ptp_adjtime() 146 fbnic_ptp_gettimex64(struct ptp_clock_info *ptp, struc argument 181 fbnic_ptp_settime64(struct ptp_clock_info * ptp,const struct timespec64 * ts) fbnic_ptp_settime64() argument [all...] |