/linux/include/linux/ |
A D | ptp_clock_kernel.h | 165 struct ptp_clock; 241 extern int ptp_clock_unregister(struct ptp_clock *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); 316 static inline void ptp_clock_event(struct ptp_clock *ptp, in ptp_clock_event() 319 static inline int ptp_clock_index(struct ptp_clock *ptp) in ptp_clock_index() 321 static inline int ptp_find_pin(struct ptp_clock *ptp, in ptp_find_pin() [all …]
|
/linux/drivers/ptp/ |
A D | ptp_clock.c | 78 struct ptp_clock *ptp = container_of(pc, struct ptp_clock, clock); in ptp_clock_settime() 90 struct ptp_clock *ptp = container_of(pc, struct ptp_clock, clock); in ptp_clock_gettime() 102 struct ptp_clock *ptp = container_of(pc, struct ptp_clock, clock); in ptp_clock_adjtime() 170 struct ptp_clock *ptp = container_of(dev, struct ptp_clock, dev); in ptp_clock_release() 183 struct ptp_clock *ptp = container_of(work, struct ptp_clock, in ptp_aux_kworker() 199 struct ptp_clock *ptp; in ptp_clock_register() 320 int ptp_clock_unregister(struct ptp_clock *ptp) in ptp_clock_unregister() 372 int ptp_clock_index(struct ptp_clock *ptp) in ptp_clock_index() 378 int ptp_find_pin(struct ptp_clock *ptp, in ptp_find_pin() 396 int ptp_find_pin_unlocked(struct ptp_clock *ptp, in ptp_find_pin_unlocked() [all …]
|
A D | ptp_private.h | 30 struct ptp_clock { struct 62 struct ptp_clock *pclock; argument 64 struct ptp_clock *clock; 84 static inline bool ptp_vclock_in_use(struct ptp_clock *ptp) 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); 129 struct ptp_vclock *ptp_vclock_register(struct ptp_clock *pclock);
|
A D | ptp_sysfs.c | 16 struct ptp_clock *ptp = dev_get_drvdata(dev); in clock_name_show() 25 struct ptp_clock *ptp = dev_get_drvdata(dev); \ 41 struct ptp_clock *ptp = dev_get_drvdata(dev); in extts_enable_store() 66 struct ptp_clock *ptp = dev_get_drvdata(dev); in extts_fifo_show() 101 struct ptp_clock *ptp = dev_get_drvdata(dev); in period_store() 129 struct ptp_clock *ptp = dev_get_drvdata(dev); in pps_enable_store() 154 struct ptp_clock *ptp = dev_get_drvdata(dev); in unregister_vclock() 176 struct ptp_clock *ptp = dev_get_drvdata(dev); in n_vclocks_show() 193 struct ptp_clock *ptp = dev_get_drvdata(dev); in n_vclocks_store() 252 struct ptp_clock *ptp = dev_get_drvdata(dev); in max_vclocks_show() [all …]
|
A D | ptp_kvm_common.c | 21 struct ptp_clock *ptp_clock; member 132 ptp_clock_unregister(kvm_ptp_clock.ptp_clock); in ptp_kvm_exit() 148 kvm_ptp_clock.ptp_clock = ptp_clock_register(&kvm_ptp_clock.caps, NULL); in ptp_kvm_init() 150 return PTR_ERR_OR_ZERO(kvm_ptp_clock.ptp_clock); in ptp_kvm_init()
|
A D | ptp_pch.c | 113 struct ptp_clock *ptp_clock; member 361 ptp_clock_event(pch_dev->ptp_clock, &event); in isr() 375 ptp_clock_event(pch_dev->ptp_clock, &event); in isr() 511 ptp_clock_unregister(chip->ptp_clock); in pch_remove() 577 chip->ptp_clock = ptp_clock_register(&chip->caps, &pdev->dev); in pch_probe() 578 if (IS_ERR(chip->ptp_clock)) { in pch_probe() 579 ret = PTR_ERR(chip->ptp_clock); in pch_probe() 619 ptp_clock_unregister(chip->ptp_clock); in pch_probe()
|
A D | ptp_vclock.c | 99 struct ptp_clock *ptp = vclock->pclock; in ptp_vclock_read() 117 struct ptp_vclock *ptp_vclock_register(struct ptp_clock *pclock) in ptp_vclock_register() 156 struct ptp_clock *ptp; in ptp_get_vclocks_index() 193 struct ptp_clock *ptp; in ptp_convert_timestamp()
|
A D | ptp_chardev.c | 48 int ptp_set_pinfunc(struct ptp_clock *ptp, unsigned int pin, in ptp_set_pinfunc() 111 struct ptp_clock *ptp = container_of(pc, struct ptp_clock, clock); in ptp_ioctl() 434 struct ptp_clock *ptp = container_of(pc, struct ptp_clock, clock); in ptp_poll() 446 struct ptp_clock *ptp = container_of(pc, struct ptp_clock, clock); in ptp_read()
|
/linux/drivers/net/ethernet/xscale/ |
A D | ptp_ixp46x.c | 28 struct ptp_clock *ptp_clock; member 92 ptp_clock_event(ixp_clock->ptp_clock, &event); in isr() 106 ptp_clock_event(ixp_clock->ptp_clock, &event); in isr() 248 *phc_index = ptp_clock_index(ixp_clock.ptp_clock); in ixp46x_ptp_find() 250 if (!ixp_clock.ptp_clock) in ixp46x_ptp_find() 260 struct ptp_clock *ptp_clock = d; in ptp_ixp_unregister_action() local 262 ptp_clock_unregister(ptp_clock); in ptp_ixp_unregister_action() 263 ixp_clock.ptp_clock = NULL; in ptp_ixp_unregister_action() 282 if (IS_ERR(ixp_clock.ptp_clock)) in ptp_ixp_probe() 283 return PTR_ERR(ixp_clock.ptp_clock); in ptp_ixp_probe() [all …]
|
/linux/drivers/net/ethernet/mscc/ |
A D | ocelot_ptp.c | 205 pin = ptp_find_pin(ocelot->ptp_clock, PTP_PF_PEROUT, in ocelot_ptp_enable() 308 struct ptp_clock *ptp_clock; in ocelot_init_timestamp() local 323 ptp_clock = ptp_clock_register(&ocelot->ptp_info, ocelot->dev); in ocelot_init_timestamp() 324 if (IS_ERR(ptp_clock)) in ocelot_init_timestamp() 325 return PTR_ERR(ptp_clock); in ocelot_init_timestamp() 327 if (!ptp_clock) in ocelot_init_timestamp() 330 ocelot->ptp_clock = ptp_clock; in ocelot_init_timestamp() 349 if (ocelot->ptp_clock) in ocelot_deinit_timestamp() 350 ptp_clock_unregister(ocelot->ptp_clock); in ocelot_deinit_timestamp()
|
/linux/drivers/net/ethernet/marvell/mvpp2/ |
A D | mvpp2_tai.c | 58 struct ptp_clock *ptp_clock; member 342 return ptp_clock_index(tai->ptp_clock); in mvpp22_tai_ptp_clock_index() 377 ptp_schedule_worker(tai->ptp_clock, delay); in mvpp22_tai_start() 382 ptp_cancel_worker_sync(tai->ptp_clock); in mvpp22_tai_stop() 389 if (!IS_ERR(tai->ptp_clock)) in mvpp22_tai_remove() 390 ptp_clock_unregister(tai->ptp_clock); in mvpp22_tai_remove() 450 tai->ptp_clock = ptp_clock_register(&tai->caps, dev); in mvpp22_tai_probe() 451 if (IS_ERR(tai->ptp_clock)) in mvpp22_tai_probe() 452 return PTR_ERR(tai->ptp_clock); in mvpp22_tai_probe()
|
/linux/drivers/net/ethernet/mellanox/mlx4/ |
A D | en_clock.c | 85 if (mdev->ptp_clock) { in mlx4_en_remove_timestamp() 86 ptp_clock_unregister(mdev->ptp_clock); in mlx4_en_remove_timestamp() 87 mdev->ptp_clock = NULL; in mlx4_en_remove_timestamp() 272 if (mdev->ptp_clock) in mlx4_en_init_timestamp() 294 mdev->ptp_clock = ptp_clock_register(&mdev->ptp_clock_info, in mlx4_en_init_timestamp() 296 if (IS_ERR(mdev->ptp_clock)) { in mlx4_en_init_timestamp() 297 mdev->ptp_clock = NULL; in mlx4_en_init_timestamp() 299 } else if (mdev->ptp_clock) { in mlx4_en_init_timestamp()
|
/linux/drivers/net/ethernet/intel/e1000e/ |
A D | ptp.c | 282 adapter->ptp_clock = NULL; in e1000e_ptp_init() 329 adapter->ptp_clock = ptp_clock_register(&adapter->ptp_clock_info, in e1000e_ptp_init() 331 if (IS_ERR(adapter->ptp_clock)) { in e1000e_ptp_init() 332 adapter->ptp_clock = NULL; in e1000e_ptp_init() 334 } else if (adapter->ptp_clock) { in e1000e_ptp_init() 352 if (adapter->ptp_clock) { in e1000e_ptp_remove() 353 ptp_clock_unregister(adapter->ptp_clock); in e1000e_ptp_remove() 354 adapter->ptp_clock = NULL; in e1000e_ptp_remove()
|
/linux/drivers/net/ethernet/marvell/octeontx2/nic/ |
A D | otx2_ptp.c | 180 ptp_clock_event(ptp->ptp_clock, &event); in otx2_ptp_extts_check() 206 pin = ptp_find_pin(ptp->ptp_clock, PTP_PF_EXTTS, in otx2_ptp_enable() 289 ptp_ptr->ptp_clock = ptp_clock_register(&ptp_ptr->ptp_info, pfvf->dev); in otx2_ptp_init() 290 if (IS_ERR_OR_NULL(ptp_ptr->ptp_clock)) { in otx2_ptp_init() 291 err = ptp_ptr->ptp_clock ? in otx2_ptp_init() 292 PTR_ERR(ptp_ptr->ptp_clock) : -ENODEV; in otx2_ptp_init() 311 ptp_clock_unregister(ptp->ptp_clock); in otx2_ptp_destroy() 322 return ptp_clock_index(pfvf->ptp->ptp_clock); in otx2_ptp_clock_index()
|
/linux/drivers/net/ethernet/chelsio/cxgb4/ |
A D | cxgb4_ptp.c | 424 if (!IS_ERR_OR_NULL(adapter->ptp_clock)) in cxgb4_ptp_init() 431 adapter->ptp_clock = ptp_clock_register(&adapter->ptp_clock_info, in cxgb4_ptp_init() 433 if (IS_ERR_OR_NULL(adapter->ptp_clock)) { in cxgb4_ptp_init() 434 adapter->ptp_clock = NULL; in cxgb4_ptp_init() 443 ptp_clock_unregister(adapter->ptp_clock); in cxgb4_ptp_init() 444 adapter->ptp_clock = NULL; in cxgb4_ptp_init() 461 if (adapter->ptp_clock) { in cxgb4_ptp_stop() 462 ptp_clock_unregister(adapter->ptp_clock); in cxgb4_ptp_stop() 463 adapter->ptp_clock = NULL; in cxgb4_ptp_stop()
|
/linux/drivers/net/ethernet/broadcom/bnxt/ |
A D | bnxt_ptp.c | 602 ptp_schedule_worker(ptp->ptp_clock, 0); in bnxt_get_tx_ts_p5() 735 if (ptp->ptp_clock) { in bnxt_ptp_init() 736 ptp_clock_unregister(ptp->ptp_clock); in bnxt_ptp_init() 737 ptp->ptp_clock = NULL; in bnxt_ptp_init() 759 if (IS_ERR(ptp->ptp_clock)) { in bnxt_ptp_init() 760 int err = PTR_ERR(ptp->ptp_clock); in bnxt_ptp_init() 762 ptp->ptp_clock = NULL; in bnxt_ptp_init() 771 ptp_schedule_worker(ptp->ptp_clock, 0); in bnxt_ptp_init() 783 if (ptp->ptp_clock) in bnxt_ptp_clear() 784 ptp_clock_unregister(ptp->ptp_clock); in bnxt_ptp_clear() [all …]
|
/linux/drivers/net/ethernet/stmicro/stmmac/ |
A D | stmmac_ptp.c | 319 priv->ptp_clock = ptp_clock_register(&priv->ptp_clock_ops, in stmmac_ptp_register() 321 if (IS_ERR(priv->ptp_clock)) { in stmmac_ptp_register() 323 priv->ptp_clock = NULL; in stmmac_ptp_register() 324 } else if (priv->ptp_clock) in stmmac_ptp_register() 336 if (priv->ptp_clock) { in stmmac_ptp_unregister() 337 ptp_clock_unregister(priv->ptp_clock); in stmmac_ptp_unregister() 338 priv->ptp_clock = NULL; in stmmac_ptp_unregister()
|
A D | stmmac_hwtstamp.c | 27 u32 ptp_clock, int gmac4, u32 *ssinc) in config_sub_second_increment() argument 42 data = (2000000000ULL / ptp_clock); in config_sub_second_increment() 44 data = (1000000000ULL / ptp_clock); in config_sub_second_increment() 200 ptp_clock_event(priv->ptp_clock, &event); in timestamp_interrupt()
|
/linux/drivers/net/dsa/hirschmann/ |
A D | hellcreek_ptp.c | 412 hellcreek->ptp_clock = ptp_clock_register(&hellcreek->ptp_clock_info, in hellcreek_ptp_setup() 414 if (IS_ERR(hellcreek->ptp_clock)) in hellcreek_ptp_setup() 415 return PTR_ERR(hellcreek->ptp_clock); in hellcreek_ptp_setup() 433 if (hellcreek->ptp_clock) in hellcreek_ptp_setup() 434 ptp_clock_unregister(hellcreek->ptp_clock); in hellcreek_ptp_setup() 449 if (hellcreek->ptp_clock) in hellcreek_ptp_free() 450 ptp_clock_unregister(hellcreek->ptp_clock); in hellcreek_ptp_free() 451 hellcreek->ptp_clock = NULL; in hellcreek_ptp_free()
|
/linux/drivers/net/ethernet/cavium/common/ |
A D | cavium_ptp.h | 24 struct ptp_clock *ptp_clock; member 46 return ptp_clock_index(clock->ptp_clock); in cavium_ptp_clock_index()
|
/linux/drivers/net/ethernet/amd/xgbe/ |
A D | xgbe-ptp.c | 230 struct ptp_clock *clock; in xgbe_ptp_register() 250 pdata->ptp_clock = clock; in xgbe_ptp_register() 277 if (pdata->ptp_clock) in xgbe_ptp_unregister() 278 ptp_clock_unregister(pdata->ptp_clock); in xgbe_ptp_unregister()
|
/linux/drivers/net/dsa/mv88e6xxx/ |
A D | ptp.c | 194 ptp_clock_event(chip->ptp_clock, &ev); in mv88e6352_tai_event_work() 289 pin = ptp_find_pin(chip->ptp_clock, PTP_PF_EXTTS, rq->extts.index); in mv88e6352_ptp_enable_extts() 494 chip->ptp_clock = ptp_clock_register(&chip->ptp_clock_info, chip->dev); in mv88e6xxx_ptp_setup() 495 if (IS_ERR(chip->ptp_clock)) in mv88e6xxx_ptp_setup() 496 return PTR_ERR(chip->ptp_clock); in mv88e6xxx_ptp_setup() 506 if (chip->ptp_clock) { in mv88e6xxx_ptp_free() 511 ptp_clock_unregister(chip->ptp_clock); in mv88e6xxx_ptp_free() 512 chip->ptp_clock = NULL; in mv88e6xxx_ptp_free()
|
/linux/drivers/net/ethernet/intel/ixgbe/ |
A D | ixgbe_ptp.c | 678 if (!adapter->ptp_clock) in ixgbe_ptp_check_pps_event() 683 ptp_clock_event(adapter->ptp_clock, &event); in ixgbe_ptp_check_pps_event() 1349 if (!IS_ERR_OR_NULL(adapter->ptp_clock)) in ixgbe_ptp_create_clock() 1404 adapter->ptp_clock = NULL; in ixgbe_ptp_create_clock() 1411 if (IS_ERR(adapter->ptp_clock)) { in ixgbe_ptp_create_clock() 1412 err = PTR_ERR(adapter->ptp_clock); in ixgbe_ptp_create_clock() 1413 adapter->ptp_clock = NULL; in ixgbe_ptp_create_clock() 1416 } else if (adapter->ptp_clock) in ixgbe_ptp_create_clock() 1496 if (adapter->ptp_clock) { in ixgbe_ptp_stop() 1497 ptp_clock_unregister(adapter->ptp_clock); in ixgbe_ptp_stop() [all …]
|
/linux/drivers/net/ethernet/cadence/ |
A D | macb_ptp.c | 375 bp->ptp_clock = ptp_clock_register(&bp->ptp_clock_info, &dev->dev); in gem_ptp_init() 376 if (IS_ERR(bp->ptp_clock)) { in gem_ptp_init() 378 PTR_ERR(bp->ptp_clock)); in gem_ptp_init() 379 bp->ptp_clock = NULL; in gem_ptp_init() 381 } else if (bp->ptp_clock == NULL) { in gem_ptp_init() 403 if (bp->ptp_clock) in gem_ptp_remove() 404 ptp_clock_unregister(bp->ptp_clock); in gem_ptp_remove()
|
/linux/drivers/net/ethernet/ti/ |
A D | am65-cpts.c | 160 struct ptp_clock *ptp_clock; member 316 ptp_clock_event(cpts->ptp_clock, &pevent); in am65_cpts_fifo_read() 340 ptp_schedule_worker(cpts->ptp_clock, 0); in am65_cpts_fifo_read() 796 ptp_schedule_worker(cpts->ptp_clock, 0); in am65_cpts_tx_timestamp() 925 ptp_clock_unregister(cpts->ptp_clock); in am65_cpts_release() 1000 cpts->ptp_clock = ptp_clock_register(&cpts->ptp_info, cpts->dev); in am65_cpts_create() 1001 if (IS_ERR_OR_NULL(cpts->ptp_clock)) { in am65_cpts_create() 1003 PTR_ERR(cpts->ptp_clock)); in am65_cpts_create() 1004 ret = cpts->ptp_clock ? PTR_ERR(cpts->ptp_clock) : -ENODEV; in am65_cpts_create() 1007 cpts->phc_index = ptp_clock_index(cpts->ptp_clock); in am65_cpts_create()
|