Symbol: ptp
arch/mips/include/asm/octeon/cvmx-pko-defs.h
577
uint64_t ptp:1;
arch/mips/include/asm/octeon/cvmx-pko-defs.h
587
uint64_t ptp:1;
arch/mips/include/asm/octeon/cvmx-pko-defs.h
595
uint64_t ptp:1;
arch/mips/include/asm/octeon/cvmx-pko-defs.h
605
uint64_t ptp:1;
arch/sparc/mm/srmmu.c
139
unsigned long ptp = __nocache_pa(ptep) >> 4;
arch/sparc/mm/srmmu.c
140
set_pte((pte_t *)&pmd_val(*pmdp), __pte(SRMMU_ET_PTD | ptp));
drivers/clk/mxs/clk-imx28.c
203
clks[ptp] = mxs_clk_div("ptp", "ptp_sel", ENET, 21, 6, 27);
drivers/gpu/drm/nouveau/include/nvkm/subdev/mmu.h
147
} ptc, ptp;
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c
101
slot = __ffs(ptp->free);
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c
102
ptp->free &= ~BIT(slot);
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c
103
if (!ptp->free)
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c
104
list_del(&ptp->head);
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c
106
pt->memory = pt->ptp->pt->memory;
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c
107
pt->base = slot << ptp->shift;
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c
108
pt->addr = pt->ptp->pt->addr + pt->base;
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c
147
mutex_lock(&mmu->ptp.mutex);
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c
149
mutex_unlock(&mmu->ptp.mutex);
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c
175
mutex_lock(&mmu->ptp.mutex);
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c
177
mutex_unlock(&mmu->ptp.mutex);
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c
250
mutex_init(&mmu->ptp.mutex);
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c
251
INIT_LIST_HEAD(&mmu->ptp.list);
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c
44
const int slot = pt->base >> pt->ptp->shift;
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c
45
struct nvkm_mmu_ptp *ptp = pt->ptp;
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c
50
if (!ptp->free)
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c
51
list_add(&ptp->head, &mmu->ptp.list);
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c
52
ptp->free |= BIT(slot);
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c
55
if (ptp->free == ptp->mask) {
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c
56
nvkm_mmu_ptc_put(mmu, force, &ptp->pt);
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c
57
list_del(&ptp->head);
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c
58
kfree(ptp);
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c
68
struct nvkm_mmu_ptp *ptp;
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c
74
ptp = list_first_entry_or_null(&mmu->ptp.list, typeof(*ptp), head);
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c
75
if (!ptp) {
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c
77
if (!(ptp = kmalloc_obj(*ptp))) {
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c
82
ptp->pt = nvkm_mmu_ptc_get(mmu, 0x1000, 0x1000, false);
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c
83
if (!ptp->pt) {
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c
84
kfree(ptp);
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c
89
ptp->shift = order_base_2(size);
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c
90
slot = nvkm_memory_size(ptp->pt->memory) >> ptp->shift;
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c
91
ptp->mask = (1 << slot) - 1;
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c
92
ptp->free = ptp->mask;
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c
93
list_add(&ptp->head, &mmu->ptp.list);
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c
95
pt->ptp = ptp;
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/priv.h
61
struct nvkm_mmu_ptp *ptp;
drivers/hv/hv_util.c
731
static int hv_ptp_adjfine(struct ptp_clock_info *ptp, long delta)
drivers/hv/hv_util.c
735
static int hv_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/net/dsa/hirschmann/hellcreek_hwtstamp.c
336
long hellcreek_hwtstamp_work(struct ptp_clock_info *ptp)
drivers/net/dsa/hirschmann/hellcreek_hwtstamp.c
338
struct hellcreek *hellcreek = ptp_to_hellcreek(ptp);
drivers/net/dsa/hirschmann/hellcreek_hwtstamp.h
54
long hellcreek_hwtstamp_work(struct ptp_clock_info *ptp);
drivers/net/dsa/hirschmann/hellcreek_ptp.c
104
static int hellcreek_ptp_settime(struct ptp_clock_info *ptp,
drivers/net/dsa/hirschmann/hellcreek_ptp.c
107
struct hellcreek *hellcreek = ptp_to_hellcreek(ptp);
drivers/net/dsa/hirschmann/hellcreek_ptp.c
132
static int hellcreek_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/net/dsa/hirschmann/hellcreek_ptp.c
134
struct hellcreek *hellcreek = ptp_to_hellcreek(ptp);
drivers/net/dsa/hirschmann/hellcreek_ptp.c
179
static int hellcreek_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/net/dsa/hirschmann/hellcreek_ptp.c
181
struct hellcreek *hellcreek = ptp_to_hellcreek(ptp);
drivers/net/dsa/hirschmann/hellcreek_ptp.c
192
hellcreek_ptp_gettimex(ptp, &now, NULL);
drivers/net/dsa/hirschmann/hellcreek_ptp.c
194
hellcreek_ptp_settime(ptp, &now);
drivers/net/dsa/hirschmann/hellcreek_ptp.c
227
static int hellcreek_ptp_enable(struct ptp_clock_info *ptp,
drivers/net/dsa/hirschmann/hellcreek_ptp.c
88
static int hellcreek_ptp_gettimex(struct ptp_clock_info *ptp,
drivers/net/dsa/hirschmann/hellcreek_ptp.c
92
struct hellcreek *hellcreek = ptp_to_hellcreek(ptp);
drivers/net/dsa/hirschmann/hellcreek_ptp.h
67
#define ptp_to_hellcreek(ptp) \
drivers/net/dsa/hirschmann/hellcreek_ptp.h
68
container_of(ptp, struct hellcreek, ptp_clock_info)
drivers/net/dsa/microchip/ksz_ptp.c
619
static int ksz_ptp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts)
drivers/net/dsa/microchip/ksz_ptp.c
621
struct ksz_ptp_data *ptp_data = ptp_caps_to_data(ptp);
drivers/net/dsa/microchip/ksz_ptp.c
677
static int ksz_ptp_settime(struct ptp_clock_info *ptp,
drivers/net/dsa/microchip/ksz_ptp.c
680
struct ksz_ptp_data *ptp_data = ptp_caps_to_data(ptp);
drivers/net/dsa/microchip/ksz_ptp.c
726
static int ksz_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/net/dsa/microchip/ksz_ptp.c
728
struct ksz_ptp_data *ptp_data = ptp_caps_to_data(ptp);
drivers/net/dsa/microchip/ksz_ptp.c
766
static int ksz_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/net/dsa/microchip/ksz_ptp.c
768
struct ksz_ptp_data *ptp_data = ptp_caps_to_data(ptp);
drivers/net/dsa/microchip/ksz_ptp.c
828
static int ksz_ptp_enable(struct ptp_clock_info *ptp,
drivers/net/dsa/microchip/ksz_ptp.c
831
struct ksz_ptp_data *ptp_data = ptp_caps_to_data(ptp);
drivers/net/dsa/microchip/ksz_ptp.c
848
static int ksz_ptp_verify_pin(struct ptp_clock_info *ptp, unsigned int pin,
drivers/net/dsa/microchip/ksz_ptp.c
866
static long ksz_ptp_do_aux_work(struct ptp_clock_info *ptp)
drivers/net/dsa/microchip/ksz_ptp.c
868
struct ksz_ptp_data *ptp_data = ptp_caps_to_data(ptp);
drivers/net/dsa/mv88e6xxx/chip.h
730
int (*ptp_enable)(struct ptp_clock_info *ptp,
drivers/net/dsa/mv88e6xxx/chip.h
732
int (*ptp_verify)(struct ptp_clock_info *ptp, unsigned int pin,
drivers/net/dsa/mv88e6xxx/hwtstamp.c
442
long mv88e6xxx_hwtstamp_work(struct ptp_clock_info *ptp)
drivers/net/dsa/mv88e6xxx/hwtstamp.c
444
struct mv88e6xxx_chip *chip = ptp_to_chip(ptp);
drivers/net/dsa/mv88e6xxx/hwtstamp.h
127
long mv88e6xxx_hwtstamp_work(struct ptp_clock_info *ptp);
drivers/net/dsa/mv88e6xxx/ptp.c
243
static int mv88e6xxx_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/net/dsa/mv88e6xxx/ptp.c
245
struct mv88e6xxx_chip *chip = ptp_to_chip(ptp);
drivers/net/dsa/mv88e6xxx/ptp.c
270
static int mv88e6xxx_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/net/dsa/mv88e6xxx/ptp.c
272
struct mv88e6xxx_chip *chip = ptp_to_chip(ptp);
drivers/net/dsa/mv88e6xxx/ptp.c
281
static int mv88e6xxx_ptp_gettime(struct ptp_clock_info *ptp,
drivers/net/dsa/mv88e6xxx/ptp.c
284
struct mv88e6xxx_chip *chip = ptp_to_chip(ptp);
drivers/net/dsa/mv88e6xxx/ptp.c
296
static int mv88e6xxx_ptp_settime(struct ptp_clock_info *ptp,
drivers/net/dsa/mv88e6xxx/ptp.c
299
struct mv88e6xxx_chip *chip = ptp_to_chip(ptp);
drivers/net/dsa/mv88e6xxx/ptp.c
357
static int mv88e6352_ptp_enable(struct ptp_clock_info *ptp,
drivers/net/dsa/mv88e6xxx/ptp.c
360
struct mv88e6xxx_chip *chip = ptp_to_chip(ptp);
drivers/net/dsa/mv88e6xxx/ptp.c
370
static int mv88e6352_ptp_verify(struct ptp_clock_info *ptp, unsigned int pin,
drivers/net/dsa/mv88e6xxx/ptp.h
72
#define ptp_to_chip(ptp) container_of(ptp, struct mv88e6xxx_chip, \
drivers/net/dsa/ocelot/felix.c
1714
if (ocelot->ptp) {
drivers/net/dsa/ocelot/felix.c
1719
ocelot->ptp = 0;
drivers/net/dsa/ocelot/felix.c
1932
if (!ocelot->ptp)
drivers/net/dsa/ocelot/felix.c
2390
int num_flooding_pgids, bool ptp,
drivers/net/dsa/ocelot/felix.c
2413
ocelot->ptp = ptp;
drivers/net/dsa/ocelot/felix.h
102
int num_flooding_pgids, bool ptp,
drivers/net/dsa/sja1105/sja1105_ptp.c
340
static long sja1105_rxtstamp_work(struct ptp_clock_info *ptp)
drivers/net/dsa/sja1105/sja1105_ptp.c
342
struct sja1105_ptp_data *ptp_data = ptp_caps_to_data(ptp);
drivers/net/dsa/sja1105/sja1105_ptp.c
538
static int sja1105_ptp_gettimex(struct ptp_clock_info *ptp,
drivers/net/dsa/sja1105/sja1105_ptp.c
542
struct sja1105_ptp_data *ptp_data = ptp_caps_to_data(ptp);
drivers/net/dsa/sja1105/sja1105_ptp.c
592
static int sja1105_ptp_settime(struct ptp_clock_info *ptp,
drivers/net/dsa/sja1105/sja1105_ptp.c
595
struct sja1105_ptp_data *ptp_data = ptp_caps_to_data(ptp);
drivers/net/dsa/sja1105/sja1105_ptp.c
609
static int sja1105_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/net/dsa/sja1105/sja1105_ptp.c
611
struct sja1105_ptp_data *ptp_data = ptp_caps_to_data(ptp);
drivers/net/dsa/sja1105/sja1105_ptp.c
658
static int sja1105_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/net/dsa/sja1105/sja1105_ptp.c
660
struct sja1105_ptp_data *ptp_data = ptp_caps_to_data(ptp);
drivers/net/dsa/sja1105/sja1105_ptp.c
833
static int sja1105_ptp_enable(struct ptp_clock_info *ptp,
drivers/net/dsa/sja1105/sja1105_ptp.c
836
struct sja1105_ptp_data *ptp_data = ptp_caps_to_data(ptp);
drivers/net/dsa/sja1105/sja1105_ptp.c
848
static int sja1105_ptp_verify_pin(struct ptp_clock_info *ptp, unsigned int pin,
drivers/net/dsa/sja1105/sja1105_ptp.c
851
struct sja1105_ptp_data *ptp_data = ptp_caps_to_data(ptp);
drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
278
static int aq_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
280
struct aq_ptp_s *aq_ptp = container_of(ptp, struct aq_ptp_s, ptp_info);
drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
297
static int aq_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
299
struct aq_ptp_s *aq_ptp = container_of(ptp, struct aq_ptp_s, ptp_info);
drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
317
static int aq_ptp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts)
drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
319
struct aq_ptp_s *aq_ptp = container_of(ptp, struct aq_ptp_s, ptp_info);
drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
340
static int aq_ptp_settime(struct ptp_clock_info *ptp,
drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
343
struct aq_ptp_s *aq_ptp = container_of(ptp, struct aq_ptp_s, ptp_info);
drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
389
static int aq_ptp_perout_pin_configure(struct ptp_clock_info *ptp,
drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
392
struct aq_ptp_s *aq_ptp = container_of(ptp, struct aq_ptp_s, ptp_info);
drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
400
if (pin_index >= ptp->n_per_out)
drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
426
static int aq_ptp_pps_pin_configure(struct ptp_clock_info *ptp,
drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
429
struct aq_ptp_s *aq_ptp = container_of(ptp, struct aq_ptp_s, ptp_info);
drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
436
if (pin_index >= ptp->n_per_out)
drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
460
static int aq_ptp_extts_pin_configure(struct ptp_clock_info *ptp,
drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
463
struct aq_ptp_s *aq_ptp = container_of(ptp, struct aq_ptp_s, ptp_info);
drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
467
if (pin_index >= ptp->n_ext_ts)
drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
487
static int aq_ptp_gpio_feature_enable(struct ptp_clock_info *ptp,
drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
492
return aq_ptp_extts_pin_configure(ptp, rq, on);
drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
494
return aq_ptp_perout_pin_configure(ptp, rq, on);
drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
496
return aq_ptp_pps_pin_configure(ptp, rq, on);
drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
510
static int aq_ptp_verify(struct ptp_clock_info *ptp, unsigned int pin,
drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
514
if (!ptp->pin_config || pin >= ptp->n_pins)
drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
518
if (chan != ptp->pin_config[pin].chan)
drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
522
if (func != ptp->pin_config[pin].func)
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
13659
static int bnx2x_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
13661
struct bnx2x *bp = container_of(ptp, struct bnx2x, ptp_clock_info);
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
13728
static int bnx2x_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
13730
struct bnx2x *bp = container_of(ptp, struct bnx2x, ptp_clock_info);
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
13745
static int bnx2x_ptp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts)
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
13747
struct bnx2x *bp = container_of(ptp, struct bnx2x, ptp_clock_info);
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
13765
static int bnx2x_ptp_settime(struct ptp_clock_info *ptp,
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
13768
struct bnx2x *bp = container_of(ptp, struct bnx2x, ptp_clock_info);
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
13788
static int bnx2x_ptp_enable(struct ptp_clock_info *ptp,
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
13791
struct bnx2x *bp = container_of(ptp, struct bnx2x, ptp_clock_info);
drivers/net/ethernet/broadcom/bnxt/bnxt.c
14406
struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
drivers/net/ethernet/broadcom/bnxt/bnxt.c
14414
if (ptp) {
drivers/net/ethernet/broadcom/bnxt/bnxt.c
14417
write_seqlock_irqsave(&ptp->ptp_lock, flags);
drivers/net/ethernet/broadcom/bnxt/bnxt.c
14419
write_sequnlock_irqrestore(&ptp->ptp_lock, flags);
drivers/net/ethernet/broadcom/bnxt/bnxt.c
14480
struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
drivers/net/ethernet/broadcom/bnxt/bnxt.c
14484
if (ptp) {
drivers/net/ethernet/broadcom/bnxt/bnxt.c
14487
write_seqlock_irqsave(&ptp->ptp_lock, flags);
drivers/net/ethernet/broadcom/bnxt/bnxt.c
14489
write_sequnlock_irqrestore(&ptp->ptp_lock, flags);
drivers/net/ethernet/broadcom/bnxt/bnxt.c
2350
struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
drivers/net/ethernet/broadcom/bnxt/bnxt.c
2352
ns = bnxt_timecounter_cyc2time(ptp, ts);
drivers/net/ethernet/broadcom/bnxt/bnxt.c
2904
struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
drivers/net/ethernet/broadcom/bnxt/bnxt.c
2908
if (!ptp)
drivers/net/ethernet/broadcom/bnxt/bnxt.c
2913
BNXT_PHC_BITS) | ptp->current_time);
drivers/net/ethernet/broadcom/bnxt/bnxt.c
2914
write_seqlock_irqsave(&ptp->ptp_lock, flags);
drivers/net/ethernet/broadcom/bnxt/bnxt.c
2915
bnxt_ptp_rtc_timecounter_init(ptp, ns);
drivers/net/ethernet/broadcom/bnxt/bnxt.c
2916
write_sequnlock_irqrestore(&ptp->ptp_lock, flags);
drivers/net/ethernet/broadcom/bnxt/bnxt.c
479
struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
drivers/net/ethernet/broadcom/bnxt/bnxt.c
542
if (unlikely(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) && ptp &&
drivers/net/ethernet/broadcom/bnxt/bnxt.c
543
ptp->tx_tstamp_en) {
drivers/net/ethernet/broadcom/bnxt/bnxt.c
552
!bnxt_ptp_get_txts_prod(ptp, &txts_prod)) {
drivers/net/ethernet/broadcom/bnxt/bnxt.c
559
ptp->txts_req[txts_prod].tx_seqid = seq_id;
drivers/net/ethernet/broadcom/bnxt/bnxt.c
560
ptp->txts_req[txts_prod].tx_hdr_off = hdr_off;
drivers/net/ethernet/broadcom/bnxt/bnxt.c
799
ptp->txts_req[txts_prod].tx_skb = ERR_PTR(-EIO);
drivers/net/ethernet/broadcom/bnxt/bnxt.c
9651
struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
drivers/net/ethernet/broadcom/bnxt/bnxt.c
9676
if (!ptp) {
drivers/net/ethernet/broadcom/bnxt/bnxt.c
9677
ptp = kzalloc_obj(*ptp);
drivers/net/ethernet/broadcom/bnxt/bnxt.c
9678
if (!ptp) {
drivers/net/ethernet/broadcom/bnxt/bnxt.c
9682
ptp->bp = bp;
drivers/net/ethernet/broadcom/bnxt/bnxt.c
9683
bp->ptp_cfg = ptp;
drivers/net/ethernet/broadcom/bnxt/bnxt.c
9689
ptp->refclk_regs[0] = le32_to_cpu(resp->ts_ref_clock_reg_lower);
drivers/net/ethernet/broadcom/bnxt/bnxt.c
9690
ptp->refclk_regs[1] = le32_to_cpu(resp->ts_ref_clock_reg_upper);
drivers/net/ethernet/broadcom/bnxt/bnxt.c
9692
ptp->refclk_regs[0] = BNXT_TS_REG_TIMESYNC_TS0_LOWER;
drivers/net/ethernet/broadcom/bnxt/bnxt.c
9693
ptp->refclk_regs[1] = BNXT_TS_REG_TIMESYNC_TS0_UPPER;
drivers/net/ethernet/broadcom/bnxt/bnxt.c
9698
ptp->rtc_configured =
drivers/net/ethernet/broadcom/bnxt/bnxt.c
9710
kfree(ptp);
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
5422
struct bnxt_ptp_cfg *ptp;
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
5424
ptp = bp->ptp_cfg;
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
5427
if (!ptp)
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
5433
if (ptp->ptp_clock)
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
5434
info->phc_index = ptp_clock_index(ptp->ptp_clock);
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
5661
struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
5663
if (ptp) {
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
5664
ts_stats->pkts = ptp->stats.ts_pkts;
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
5665
ts_stats->lost = ptp->stats.ts_lost;
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
5666
ts_stats->err = atomic64_read(&ptp->stats.ts_err);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1023
struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1025
return !(bp->fw_cap & BNXT_FW_CAP_PTP_PPS) == !ptp->ptp_info.pin_config;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1030
struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1033
if (!ptp->ptp_clock) {
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1034
memset(&ptp->cc, 0, sizeof(ptp->cc));
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1035
ptp->cc.read = bnxt_cc_read;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1036
ptp->cc.mask = CYCLECOUNTER_MASK(48);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1039
ptp->cc.shift = BNXT_CYCLES_SHIFT;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
104
struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1040
ptp->cc.mult = clocksource_khz2mult(BNXT_DEVCLK_FREQ, ptp->cc.shift);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1041
ptp->cmult = ptp->cc.mult;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1043
ptp->cc.shift = 0;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1044
ptp->cc.mult = 1;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1046
ptp->next_overflow_check = jiffies + BNXT_PHC_OVERFLOW_PERIOD;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1049
write_seqlock_irqsave(&ptp->ptp_lock, flags);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1050
timecounter_init(&ptp->tc, &ptp->cc, ktime_to_ns(ktime_get_real()));
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1051
write_sequnlock_irqrestore(&ptp->ptp_lock, flags);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1056
void bnxt_ptp_rtc_timecounter_init(struct bnxt_ptp_cfg *ptp, u64 ns)
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1058
timecounter_init(&ptp->tc, &ptp->cc, ns);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1060
ptp->tc.cycle_last = ns & ptp->cc.mask;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
109
read_seqlock_excl_irqsave(&ptp->ptp_lock, flags);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1094
struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1096
if (ptp->ptp_clock) {
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1097
ptp_clock_unregister(ptp->ptp_clock);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1098
ptp->ptp_clock = NULL;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1100
kfree(ptp->ptp_info.pin_config);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1101
ptp->ptp_info.pin_config = NULL;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1106
struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1109
if (!ptp)
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
111
read_sequnlock_excl_irqrestore(&ptp->ptp_lock, flags);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1116
if (ptp->ptp_clock && bnxt_pps_config_ok(bp))
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1121
WRITE_ONCE(ptp->tx_avail, BNXT_MAX_TX_TS);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1122
seqlock_init(&ptp->ptp_lock);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1123
spin_lock_init(&ptp->ptp_tx_lock);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1127
rc = bnxt_ptp_init_rtc(bp, ptp->rtc_configured);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1136
ptp->ptp_info = bnxt_ptp_caps;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1144
ptp->ptp_info.getcrosststamp = bnxt_ptp_getcrosststamp;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1147
ptp->ptp_clock = ptp_clock_register(&ptp->ptp_info, &bp->pdev->dev);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1148
if (IS_ERR(ptp->ptp_clock)) {
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1149
int err = PTR_ERR(ptp->ptp_clock);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1151
ptp->ptp_clock = NULL;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1156
ptp->stats.ts_pkts = 0;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1157
ptp->stats.ts_lost = 0;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1158
atomic64_set(&ptp->stats.ts_err, 0);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1161
bnxt_refclk_read(bp, NULL, &ptp->current_time);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1162
WRITE_ONCE(ptp->old_time, ptp->current_time >> BNXT_HI_TIMER_SHIFT);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1163
ptp_schedule_worker(ptp->ptp_clock, 0);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1165
ptp->txts_tmo = BNXT_PTP_DFLT_TX_TMO;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1176
struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1178
if (!ptp)
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
118
struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1181
if (ptp->ptp_clock)
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1182
ptp_clock_unregister(ptp->ptp_clock);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1184
ptp->ptp_clock = NULL;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1185
kfree(ptp->ptp_info.pin_config);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
1186
ptp->ptp_info.pin_config = NULL;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
122
read_seqlock_excl_irqsave(&ptp->ptp_lock, flags);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
125
read_sequnlock_excl_irqrestore(&ptp->ptp_lock, flags);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
130
*low = readl(bp->bar0 + ptp->refclk_mapped_regs[0]);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
133
read_sequnlock_excl_irqrestore(&ptp->ptp_lock, flags);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
139
struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
141
if (!ptp)
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
143
WRITE_ONCE(ptp->old_time, ptp->current_time >> BNXT_HI_TIMER_SHIFT);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
144
bnxt_refclk_read(bp, NULL, &ptp->current_time);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
185
struct bnxt_ptp_cfg *ptp = container_of(ptp_info, struct bnxt_ptp_cfg,
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
191
rc = bnxt_refclk_read_low(ptp->bp, sts, &low);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
195
cycles = bnxt_extend_cycles_32b_to_48b(ptp, low);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
196
ns = bnxt_timecounter_cyc2time(ptp, cycles);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
204
struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
206
bnxt_refclk_read(ptp->bp, NULL, &ptp->current_time);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
207
WRITE_ONCE(ptp->old_time, ptp->current_time >> BNXT_HI_TIMER_SHIFT);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
210
static int bnxt_ptp_adjphc(struct bnxt_ptp_cfg *ptp, s64 delta)
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
215
rc = hwrm_req_init(ptp->bp, req, HWRM_PORT_MAC_CFG);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
222
rc = hwrm_req_send(ptp->bp, req);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
224
netdev_err(ptp->bp->dev, "ptp adjphc failed. rc = %x\n", rc);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
226
bnxt_ptp_update_current_time(ptp->bp);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
234
struct bnxt_ptp_cfg *ptp = container_of(ptp_info, struct bnxt_ptp_cfg,
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
238
if (BNXT_PTP_USE_RTC(ptp->bp))
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
239
return bnxt_ptp_adjphc(ptp, delta);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
241
write_seqlock_irqsave(&ptp->ptp_lock, flags);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
242
timecounter_adjtime(&ptp->tc, delta);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
243
write_sequnlock_irqrestore(&ptp->ptp_lock, flags);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
268
struct bnxt_ptp_cfg *ptp = container_of(ptp_info, struct bnxt_ptp_cfg,
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
270
struct bnxt *bp = ptp->bp;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
276
write_seqlock_irqsave(&ptp->ptp_lock, flags);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
277
timecounter_read(&ptp->tc);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
278
ptp->cc.mult = adjust_by_scaled_ppm(ptp->cmult, scaled_ppm);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
279
write_sequnlock_irqrestore(&ptp->ptp_lock, flags);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
285
struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
290
ns = bnxt_timecounter_cyc2time(ptp, pps_ts);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
311
struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
318
netdev_err(ptp->bp->dev, "1PPS: Invalid pin. Check pin-function configuration\n");
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
322
rc = hwrm_req_init(ptp->bp, req, HWRM_FUNC_PTP_PIN_CFG);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
336
rc = hwrm_req_send(ptp->bp, req);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
340
ptp->pps_info.pins[pin].usage = usage;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
341
ptp->pps_info.pins[pin].state = state;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
362
struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
366
if (!ptp || !ptp->tstamp_filters)
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
373
if (!(bp->fw_cap & BNXT_FW_CAP_RX_ALL_PKT_TS) && (ptp->tstamp_filters &
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
376
ptp->tstamp_filters &= ~(PORT_MAC_CFG_REQ_FLAGS_ALL_RX_TS_CAPTURE_ENABLE |
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
381
req->flags = cpu_to_le32(ptp->tstamp_filters);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
383
req->rx_ts_capture_ptp_msg_type = cpu_to_le16(ptp->rxctl);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
387
bp->ptp_all_rx_tstamp = !!(ptp->tstamp_filters &
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
391
ptp->tstamp_filters = 0;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
400
struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
405
if (!ptp || !(bp->fw_cap & BNXT_FW_CAP_PTP_PPS) ||
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
406
!(ptp->ptp_info.pin_config))
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
408
pps = &ptp->pps_info;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
422
static int bnxt_get_target_cycles(struct bnxt_ptp_cfg *ptp, u64 target_ns,
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
429
rc = bnxt_refclk_read(ptp->bp, NULL, &cycles_now);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
433
nsec_now = bnxt_timecounter_cyc2time(ptp, cycles_now);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
436
*cycles_delta = div64_u64(nsec_delta << ptp->cc.shift, ptp->cc.mult);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
440
static int bnxt_ptp_perout_cfg(struct bnxt_ptp_cfg *ptp,
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
444
struct bnxt *bp = ptp->bp;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
454
rc = bnxt_get_target_cycles(ptp, target_ns, &delta);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
479
struct bnxt_ptp_cfg *ptp = container_of(ptp_info, struct bnxt_ptp_cfg,
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
481
struct bnxt *bp = ptp->bp;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
488
pin_id = ptp_find_pin(ptp->ptp_clock, PTP_PF_EXTTS,
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
499
ptp->pps_info.pins[pin_id].event = BNXT_PPS_EVENT_EXTERNAL;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
503
pin_id = ptp_find_pin(ptp->ptp_clock, PTP_PF_PEROUT,
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
512
rc = bnxt_ptp_perout_cfg(ptp, rq);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
522
ptp->pps_info.pins[0].event = BNXT_PPS_EVENT_INTERNAL;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
525
netdev_err(ptp->bp->dev, "Unrecognized PIN function\n");
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
534
struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
537
switch (ptp->rx_filter) {
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
553
if (ptp->tx_tstamp_en)
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
558
ptp->tstamp_filters = flags;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
568
struct bnxt_ptp_cfg *ptp;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
573
ptp = bp->ptp_cfg;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
574
if (!ptp)
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
581
old_rx_filter = ptp->rx_filter;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
582
old_rxctl = ptp->rxctl;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
583
old_tx_tstamp_en = ptp->tx_tstamp_en;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
586
ptp->rxctl = 0;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
587
ptp->rx_filter = HWTSTAMP_FILTER_NONE;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
591
ptp->rx_filter = HWTSTAMP_FILTER_ALL;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
598
ptp->rxctl = BNXT_PTP_MSG_EVENTS;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
599
ptp->rx_filter = HWTSTAMP_FILTER_PTP_V2_EVENT;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
604
ptp->rxctl = BNXT_PTP_MSG_SYNC;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
605
ptp->rx_filter = HWTSTAMP_FILTER_PTP_V2_SYNC;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
610
ptp->rxctl = BNXT_PTP_MSG_DELAY_REQ;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
611
ptp->rx_filter = HWTSTAMP_FILTER_PTP_V2_DELAY_REQ;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
618
ptp->tx_tstamp_en = 1;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
62
struct bnxt_ptp_cfg *ptp = container_of(ptp_info, struct bnxt_ptp_cfg,
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
620
ptp->tx_tstamp_en = 0;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
626
stmpconf->rx_filter = ptp->rx_filter;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
630
ptp->rx_filter = old_rx_filter;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
631
ptp->rxctl = old_rxctl;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
632
ptp->tx_tstamp_en = old_tx_tstamp_en;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
640
struct bnxt_ptp_cfg *ptp;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
642
ptp = bp->ptp_cfg;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
643
if (!ptp)
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
647
stmpconf->tx_type = ptp->tx_tstamp_en ? HWTSTAMP_TX_ON
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
650
stmpconf->rx_filter = ptp->rx_filter;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
67
if (BNXT_PTP_USE_RTC(ptp->bp))
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
671
struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
675
reg_arr = ptp->refclk_regs;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
68
return bnxt_ptp_cfg_settime(ptp->bp, ns);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
681
ptp->refclk_mapped_regs[i] = BNXT_PTP_GRC_WIN_BASE +
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
682
(ptp->refclk_regs[i] & BNXT_GRC_OFFSET_MASK);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
689
ptp->refclk_mapped_regs[i] = reg_arr[i];
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
70
write_seqlock_irqsave(&ptp->ptp_lock, flags);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
704
struct bnxt_ptp_cfg *ptp = container_of(cc, struct bnxt_ptp_cfg, cc);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
707
__bnxt_refclk_read(ptp->bp, NULL, &ns);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
71
timecounter_init(&ptp->tc, &ptp->cc, ns);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
713
struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
72
write_sequnlock_irqrestore(&ptp->ptp_lock, flags);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
721
txts_req = &ptp->txts_req[slot];
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
730
ns = bnxt_timecounter_cyc2time(ptp, ts);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
733
ptp->stats.ts_pkts++;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
738
ptp->stats.ts_lost++;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
751
struct bnxt_ptp_cfg *ptp = container_of(ptp_info, struct bnxt_ptp_cfg,
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
754
struct bnxt *bp = ptp->bp;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
755
u16 cons = ptp->txts_cons;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
760
num_requests = BNXT_MAX_TX_TS - READ_ONCE(ptp->tx_avail);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
762
if (IS_ERR(ptp->txts_req[cons].tx_skb))
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
764
if (!ptp->txts_req[cons].tx_skb)
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
770
BNXT_PTP_INC_TX_AVAIL(ptp);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
773
ptp->txts_cons = cons;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
775
if (!time_after_eq(now, ptp->next_period)) {
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
778
return ptp->next_period - now;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
782
ptp->next_period = now + HZ;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
783
if (time_after_eq(now, ptp->next_overflow_check)) {
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
784
write_seqlock_irqsave(&ptp->ptp_lock, flags);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
785
timecounter_read(&ptp->tc);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
786
write_sequnlock_irqrestore(&ptp->ptp_lock, flags);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
787
ptp->next_overflow_check = now + BNXT_PHC_OVERFLOW_PERIOD;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
794
void bnxt_ptp_free_txts_skbs(struct bnxt_ptp_cfg *ptp)
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
797
u16 cons = ptp->txts_cons;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
80
struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
802
ptp_cancel_worker_sync(ptp->ptp_clock);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
804
ptp->tx_avail = BNXT_MAX_TX_TS;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
805
while (cons != ptp->txts_prod) {
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
806
txts_req = &ptp->txts_req[cons];
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
811
ptp->txts_cons = cons;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
812
ptp_schedule_worker(ptp->ptp_clock, 0);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
815
int bnxt_ptp_get_txts_prod(struct bnxt_ptp_cfg *ptp, u16 *prod)
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
817
spin_lock_bh(&ptp->ptp_tx_lock);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
818
if (ptp->tx_avail) {
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
819
*prod = ptp->txts_prod;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
820
ptp->txts_prod = NEXT_TXTS(*prod);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
821
ptp->tx_avail--;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
822
spin_unlock_bh(&ptp->ptp_tx_lock);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
825
spin_unlock_bh(&ptp->ptp_tx_lock);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
826
atomic64_inc(&ptp->stats.ts_err);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
832
struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
835
txts_req = &ptp->txts_req[prod];
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
836
txts_req->abs_txts_tmo = jiffies + msecs_to_jiffies(ptp->txts_tmo);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
840
ptp_schedule_worker(ptp->ptp_clock, 0);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
845
struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
847
if (!ptp)
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
850
*ts = bnxt_extend_cycles_32b_to_48b(ptp, pkt_ts);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
859
struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
86
high_before = readl(bp->bar0 + ptp->refclk_mapped_regs[1]);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
877
ns = bnxt_timecounter_cyc2time(ptp, ts);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
88
low = readl(bp->bar0 + ptp->refclk_mapped_regs[0]);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
890
struct bnxt_ptp_cfg *ptp = (struct bnxt_ptp_cfg *)ctx;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
893
struct bnxt *bp = ptp->bp;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
90
high_now = readl(bp->bar0 + ptp->refclk_mapped_regs[1]);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
908
*device = ns_to_ktime(bnxt_timecounter_cyc2time(ptp, ptm_local_ts));
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
922
struct bnxt_ptp_cfg *ptp = container_of(ptp_info, struct bnxt_ptp_cfg,
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
926
ptp, NULL, xtstamp);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
93
low = readl(bp->bar0 + ptp->refclk_mapped_regs[0]);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
950
struct bnxt_ptp_cfg *ptp = container_of(ptp_info, struct bnxt_ptp_cfg,
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
953
if (ptp->pps_info.pins[pin].usage <= BNXT_PPS_PIN_PPS_OUT &&
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
964
struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
982
ptp_info = &ptp->ptp_info;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
983
pps_info = &ptp->pps_info;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h
151
#define BNXT_PTP_INC_TX_AVAIL(ptp) \
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h
153
spin_lock_bh(&(ptp)->ptp_tx_lock); \
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h
154
(ptp)->tx_avail++; \
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h
155
spin_unlock_bh(&(ptp)->ptp_tx_lock); \
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h
168
void bnxt_ptp_free_txts_skbs(struct bnxt_ptp_cfg *ptp);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h
169
int bnxt_ptp_get_txts_prod(struct bnxt_ptp_cfg *ptp, u16 *prod);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h
174
void bnxt_ptp_rtc_timecounter_init(struct bnxt_ptp_cfg *ptp, u64 ns);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h
178
static inline u64 bnxt_timecounter_cyc2time(struct bnxt_ptp_cfg *ptp, u64 ts)
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h
184
seq = read_seqbegin(&ptp->ptp_lock);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h
185
ns = timecounter_cyc2time(&ptp->tc, ts);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h
186
} while (read_seqretry(&ptp->ptp_lock, seq));
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h
191
static inline u64 bnxt_extend_cycles_32b_to_48b(struct bnxt_ptp_cfg *ptp, u32 ts)
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h
195
time = (u64)READ_ONCE(ptp->old_time) << BNXT_HI_TIMER_SHIFT;
drivers/net/ethernet/broadcom/tg3.c
6166
static int tg3_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/net/ethernet/broadcom/tg3.c
6168
struct tg3 *tp = container_of(ptp, struct tg3, ptp_info);
drivers/net/ethernet/broadcom/tg3.c
6194
static int tg3_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/net/ethernet/broadcom/tg3.c
6196
struct tg3 *tp = container_of(ptp, struct tg3, ptp_info);
drivers/net/ethernet/broadcom/tg3.c
6205
static int tg3_ptp_gettimex(struct ptp_clock_info *ptp, struct timespec64 *ts,
drivers/net/ethernet/broadcom/tg3.c
6209
struct tg3 *tp = container_of(ptp, struct tg3, ptp_info);
drivers/net/ethernet/broadcom/tg3.c
6221
static int tg3_ptp_settime(struct ptp_clock_info *ptp,
drivers/net/ethernet/broadcom/tg3.c
6225
struct tg3 *tp = container_of(ptp, struct tg3, ptp_info);
drivers/net/ethernet/broadcom/tg3.c
6237
static int tg3_ptp_enable(struct ptp_clock_info *ptp,
drivers/net/ethernet/broadcom/tg3.c
6240
struct tg3 *tp = container_of(ptp, struct tg3, ptp_info);
drivers/net/ethernet/broadcom/tg3.c
6314
static long tg3_ptp_ts_aux_work(struct ptp_clock_info *ptp)
drivers/net/ethernet/broadcom/tg3.c
6316
struct tg3 *tp = container_of(ptp, struct tg3, ptp_info);
drivers/net/ethernet/cadence/macb_ptp.c
124
static int gem_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/net/ethernet/cadence/macb_ptp.c
126
struct macb *bp = container_of(ptp, struct macb, ptp_clock_info);
drivers/net/ethernet/cadence/macb_ptp.c
159
static int gem_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/net/ethernet/cadence/macb_ptp.c
161
struct macb *bp = container_of(ptp, struct macb, ptp_clock_info);
drivers/net/ethernet/cadence/macb_ptp.c
185
static int gem_ptp_enable(struct ptp_clock_info *ptp,
drivers/net/ethernet/cadence/macb_ptp.c
43
static int gem_tsu_get_time(struct ptp_clock_info *ptp, struct timespec64 *ts,
drivers/net/ethernet/cadence/macb_ptp.c
46
struct macb *bp = container_of(ptp, struct macb, ptp_clock_info);
drivers/net/ethernet/cadence/macb_ptp.c
79
static int gem_tsu_set_time(struct ptp_clock_info *ptp,
drivers/net/ethernet/cadence/macb_ptp.c
82
struct macb *bp = container_of(ptp, struct macb, ptp_clock_info);
drivers/net/ethernet/cavium/common/cavium_ptp.c
61
struct cavium_ptp *ptp;
drivers/net/ethernet/cavium/common/cavium_ptp.c
69
ptp = pci_get_drvdata(pdev);
drivers/net/ethernet/cavium/common/cavium_ptp.c
70
if (!ptp)
drivers/net/ethernet/cavium/common/cavium_ptp.c
71
ptp = ERR_PTR(-EPROBE_DEFER);
drivers/net/ethernet/cavium/common/cavium_ptp.c
72
if (IS_ERR(ptp))
drivers/net/ethernet/cavium/common/cavium_ptp.c
75
return ptp;
drivers/net/ethernet/cavium/common/cavium_ptp.c
79
void cavium_ptp_put(struct cavium_ptp *ptp)
drivers/net/ethernet/cavium/common/cavium_ptp.c
81
if (!ptp)
drivers/net/ethernet/cavium/common/cavium_ptp.c
83
pci_dev_put(ptp->pdev);
drivers/net/ethernet/cavium/common/cavium_ptp.h
30
void cavium_ptp_put(struct cavium_ptp *ptp);
drivers/net/ethernet/cavium/common/cavium_ptp.h
32
static inline u64 cavium_ptp_tstamp2time(struct cavium_ptp *ptp, u64 tstamp)
drivers/net/ethernet/cavium/common/cavium_ptp.h
37
spin_lock_irqsave(&ptp->spin_lock, flags);
drivers/net/ethernet/cavium/common/cavium_ptp.h
38
ret = timecounter_cyc2time(&ptp->time_counter, tstamp);
drivers/net/ethernet/cavium/common/cavium_ptp.h
39
spin_unlock_irqrestore(&ptp->spin_lock, flags);
drivers/net/ethernet/cavium/common/cavium_ptp.h
56
static inline void cavium_ptp_put(struct cavium_ptp *ptp) {}
drivers/net/ethernet/cavium/common/cavium_ptp.h
58
static inline u64 cavium_ptp_tstamp2time(struct cavium_ptp *ptp, u64 tstamp)
drivers/net/ethernet/cavium/liquidio/lio_main.c
1513
static int liquidio_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/net/ethernet/cavium/liquidio/lio_main.c
1515
struct lio *lio = container_of(ptp, struct lio, ptp_info);
drivers/net/ethernet/cavium/liquidio/lio_main.c
1551
static int liquidio_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/net/ethernet/cavium/liquidio/lio_main.c
1554
struct lio *lio = container_of(ptp, struct lio, ptp_info);
drivers/net/ethernet/cavium/liquidio/lio_main.c
1568
static int liquidio_ptp_gettime(struct ptp_clock_info *ptp,
drivers/net/ethernet/cavium/liquidio/lio_main.c
1573
struct lio *lio = container_of(ptp, struct lio, ptp_info);
drivers/net/ethernet/cavium/liquidio/lio_main.c
1591
static int liquidio_ptp_settime(struct ptp_clock_info *ptp,
drivers/net/ethernet/cavium/liquidio/lio_main.c
1596
struct lio *lio = container_of(ptp, struct lio, ptp_info);
drivers/net/ethernet/cavium/liquidio/lio_main.c
1616
liquidio_ptp_enable(struct ptp_clock_info __maybe_unused *ptp,
drivers/net/ethernet/cavium/octeon/octeon_mgmt.c
699
union cvmx_mio_ptp_clock_cfg ptp;
drivers/net/ethernet/cavium/octeon/octeon_mgmt.c
705
ptp.u64 = cvmx_read_csr(CVMX_MIO_PTP_CLOCK_CFG);
drivers/net/ethernet/cavium/octeon/octeon_mgmt.c
706
if (!ptp.s.ext_clk_en) {
drivers/net/ethernet/cavium/octeon/octeon_mgmt.c
712
if (!ptp.s.ptp_en)
drivers/net/ethernet/cavium/octeon/octeon_mgmt.c
722
ptp.s.ext_clk_in, (NSEC_PER_SEC << 32) / clock_comp);
drivers/net/ethernet/cavium/octeon/octeon_mgmt.c
726
if (!ptp.s.ptp_en) {
drivers/net/ethernet/cavium/octeon/octeon_mgmt.c
727
ptp.s.ptp_en = 1;
drivers/net/ethernet/cavium/octeon/octeon_mgmt.c
728
cvmx_write_csr(CVMX_MIO_PTP_CLOCK_CFG, ptp.u64);
drivers/net/ethernet/cavium/thunder/nic.h
602
struct set_ptp ptp;
drivers/net/ethernet/cavium/thunder/nic_main.c
1088
nic_config_timestamp(nic, vf, &mbx.ptp);
drivers/net/ethernet/cavium/thunder/nic_main.c
886
static void nic_config_timestamp(struct nicpf *nic, int vf, struct set_ptp *ptp)
drivers/net/ethernet/cavium/thunder/nic_main.c
902
if (ptp->enable && !pkind->hdr_sl) {
drivers/net/ethernet/cavium/thunder/nic_main.c
912
} else if (!ptp->enable && pkind->hdr_sl) {
drivers/net/ethernet/cavium/thunder/nicvf_main.c
1420
mbx.ptp.msg = NIC_MBOX_MSG_PTP_CFG;
drivers/net/ethernet/cavium/thunder/nicvf_main.c
1421
mbx.ptp.enable = enable;
drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c
206
static int cxgb4_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c
208
struct adapter *adapter = (struct adapter *)container_of(ptp,
drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c
272
static int cxgb4_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c
275
(struct adapter *)container_of(ptp, struct adapter,
drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c
316
static int cxgb4_ptp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts)
drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c
318
struct adapter *adapter = container_of(ptp, struct adapter,
drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c
339
static int cxgb4_ptp_settime(struct ptp_clock_info *ptp,
drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c
342
struct adapter *adapter = (struct adapter *)container_of(ptp,
drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c
395
static int cxgb4_ptp_enable(struct ptp_clock_info __always_unused *ptp,
drivers/net/ethernet/engleder/tsnep_ptp.c
100
static int tsnep_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/net/ethernet/engleder/tsnep_ptp.c
102
struct tsnep_adapter *adapter = container_of(ptp, struct tsnep_adapter,
drivers/net/ethernet/engleder/tsnep_ptp.c
125
static int tsnep_ptp_gettimex64(struct ptp_clock_info *ptp,
drivers/net/ethernet/engleder/tsnep_ptp.c
129
struct tsnep_adapter *adapter = container_of(ptp, struct tsnep_adapter,
drivers/net/ethernet/engleder/tsnep_ptp.c
152
static int tsnep_ptp_settime64(struct ptp_clock_info *ptp,
drivers/net/ethernet/engleder/tsnep_ptp.c
155
struct tsnep_adapter *adapter = container_of(ptp, struct tsnep_adapter,
drivers/net/ethernet/engleder/tsnep_ptp.c
174
static int tsnep_ptp_getcyclesx64(struct ptp_clock_info *ptp,
drivers/net/ethernet/engleder/tsnep_ptp.c
178
struct tsnep_adapter *adapter = container_of(ptp, struct tsnep_adapter,
drivers/net/ethernet/engleder/tsnep_ptp.c
72
static int tsnep_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/net/ethernet/engleder/tsnep_ptp.c
74
struct tsnep_adapter *adapter = container_of(ptp, struct tsnep_adapter,
drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c
359
struct ptp_qoriq *ptp = NULL;
drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c
375
ptp = platform_get_drvdata(ptp_dev);
drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c
379
if (ptp)
drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c
380
info->phc_index = ptp->phc_index;
drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c
15
static int dpaa2_ptp_enable(struct ptp_clock_info *ptp,
drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c
18
struct ptp_qoriq *ptp_qoriq = container_of(ptp, struct ptp_qoriq, caps);
drivers/net/ethernet/freescale/fec_ptp.c
350
static int fec_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/net/ethernet/freescale/fec_ptp.c
361
container_of(ptp, struct fec_enet_private, ptp_caps);
drivers/net/ethernet/freescale/fec_ptp.c
420
static int fec_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/net/ethernet/freescale/fec_ptp.c
423
container_of(ptp, struct fec_enet_private, ptp_caps);
drivers/net/ethernet/freescale/fec_ptp.c
441
static int fec_ptp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts)
drivers/net/ethernet/freescale/fec_ptp.c
444
container_of(ptp, struct fec_enet_private, ptp_caps);
drivers/net/ethernet/freescale/fec_ptp.c
472
static int fec_ptp_settime(struct ptp_clock_info *ptp,
drivers/net/ethernet/freescale/fec_ptp.c
476
container_of(ptp, struct fec_enet_private, ptp_caps);
drivers/net/ethernet/freescale/fec_ptp.c
524
static int fec_ptp_enable(struct ptp_clock_info *ptp,
drivers/net/ethernet/freescale/fec_ptp.c
528
container_of(ptp, struct fec_enet_private, ptp_caps);
drivers/net/ethernet/freescale/gianfar.c
1920
fcb->ptp = 1;
drivers/net/ethernet/freescale/gianfar.h
578
u8 ptp; /* Flag to enable tx timestamping */
drivers/net/ethernet/freescale/gianfar_ethtool.c
1471
struct ptp_qoriq *ptp = NULL;
drivers/net/ethernet/freescale/gianfar_ethtool.c
1483
ptp = platform_get_drvdata(ptp_dev);
drivers/net/ethernet/freescale/gianfar_ethtool.c
1488
if (ptp)
drivers/net/ethernet/freescale/gianfar_ethtool.c
1489
info->phc_index = ptp->phc_index;
drivers/net/ethernet/google/gve/gve.h
923
struct gve_ptp *ptp;
drivers/net/ethernet/google/gve/gve_ethtool.c
975
if (priv->ptp)
drivers/net/ethernet/google/gve/gve_ethtool.c
976
info->phc_index = ptp_clock_index(priv->ptp->clock);
drivers/net/ethernet/google/gve/gve_ptp.c
100
if (!ptp)
drivers/net/ethernet/google/gve/gve_ptp.c
103
if (ptp->clock)
drivers/net/ethernet/google/gve/gve_ptp.c
104
ptp_clock_unregister(ptp->clock);
drivers/net/ethernet/google/gve/gve_ptp.c
106
kfree(ptp);
drivers/net/ethernet/google/gve/gve_ptp.c
107
priv->ptp = NULL;
drivers/net/ethernet/google/gve/gve_ptp.c
133
ptp_schedule_worker(priv->ptp->clock,
drivers/net/ethernet/google/gve/gve_ptp.c
44
const struct gve_ptp *ptp = container_of(info, struct gve_ptp, info);
drivers/net/ethernet/google/gve/gve_ptp.c
45
struct gve_priv *priv = ptp->priv;
drivers/net/ethernet/google/gve/gve_ptp.c
70
struct gve_ptp *ptp;
drivers/net/ethernet/google/gve/gve_ptp.c
73
priv->ptp = kzalloc_obj(*priv->ptp);
drivers/net/ethernet/google/gve/gve_ptp.c
74
if (!priv->ptp)
drivers/net/ethernet/google/gve/gve_ptp.c
77
ptp = priv->ptp;
drivers/net/ethernet/google/gve/gve_ptp.c
78
ptp->info = gve_ptp_caps;
drivers/net/ethernet/google/gve/gve_ptp.c
79
ptp->clock = ptp_clock_register(&ptp->info, &priv->pdev->dev);
drivers/net/ethernet/google/gve/gve_ptp.c
81
if (IS_ERR(ptp->clock)) {
drivers/net/ethernet/google/gve/gve_ptp.c
83
err = PTR_ERR(ptp->clock);
drivers/net/ethernet/google/gve/gve_ptp.c
87
ptp->priv = priv;
drivers/net/ethernet/google/gve/gve_ptp.c
91
kfree(ptp);
drivers/net/ethernet/google/gve/gve_ptp.c
92
priv->ptp = NULL;
drivers/net/ethernet/google/gve/gve_ptp.c
98
struct gve_ptp *ptp = priv->ptp;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c
2732
struct hclge_ptp *ptp = hdev->ptp;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c
2733
u32 sw_cfg = ptp->ptp_cfg;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c
2739
seq_printf(s, "phc %s's debug info:\n", ptp->info.name);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c
2741
str_yes_no(test_bit(HCLGE_PTP_FLAG_EN, &ptp->flags)));
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c
2743
str_yes_no(test_bit(HCLGE_PTP_FLAG_TX_EN, &ptp->flags)));
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c
2745
str_yes_no(test_bit(HCLGE_PTP_FLAG_RX_EN, &ptp->flags)));
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c
2747
last_rx = jiffies_to_msecs(ptp->last_rx);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c
2750
seq_printf(s, "rx count: %lu\n", ptp->rx_cnt);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c
2752
tx_start = jiffies_to_msecs(ptp->tx_start);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c
2755
seq_printf(s, "tx count: %lu\n", ptp->tx_cnt);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c
2756
seq_printf(s, "tx skipped count: %lu\n", ptp->tx_skipped);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c
2757
seq_printf(s, "tx timeout count: %lu\n", ptp->tx_timeout);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c
2758
seq_printf(s, "last tx seqid: %u\n", ptp->last_tx_seqid);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c
2768
ptp->ts_cfg.tx_type, ptp->ts_cfg.rx_filter);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
3705
spin_lock_irqsave(&hdev->ptp->lock, flags);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
3707
spin_unlock_irqrestore(&hdev->ptp->lock, flags);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
4706
!time_is_before_jiffies(hdev->ptp->tx_start + HZ))
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
4710
spin_lock_irqsave(&hdev->ptp->lock, flags);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
4718
spin_unlock_irqrestore(&hdev->ptp->lock, flags);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h
986
struct hclge_ptp *ptp;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
11
struct hclge_ptp *ptp = hdev->ptp;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
115
if (!hdev->ptp || !test_bit(HCLGE_PTP_FLAG_RX_EN, &hdev->ptp->flags))
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
122
spin_lock_irqsave(&hdev->ptp->lock, flags);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
123
sec_h = readl(hdev->ptp->io_base + HCLGE_PTP_CUR_TIME_SEC_H_REG);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
124
spin_unlock_irqrestore(&hdev->ptp->lock, flags);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
128
hdev->ptp->last_rx = jiffies;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
129
hdev->ptp->rx_cnt++;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
13
ptp->cycle.quo = readl(hdev->ptp->io_base + HCLGE_PTP_CYCLE_QUO_REG) &
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
132
static int hclge_ptp_gettimex(struct ptp_clock_info *ptp, struct timespec64 *ts,
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
135
struct hclge_dev *hdev = hclge_ptp_get_hdev(ptp);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
140
spin_lock_irqsave(&hdev->ptp->lock, flags);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
141
ns = readl(hdev->ptp->io_base + HCLGE_PTP_CUR_TIME_NSEC_REG);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
142
hi = readl(hdev->ptp->io_base + HCLGE_PTP_CUR_TIME_SEC_H_REG);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
143
lo = readl(hdev->ptp->io_base + HCLGE_PTP_CUR_TIME_SEC_L_REG);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
144
spin_unlock_irqrestore(&hdev->ptp->lock, flags);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
15
ptp->cycle.numer = readl(hdev->ptp->io_base + HCLGE_PTP_CYCLE_NUM_REG);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
152
static int hclge_ptp_settime(struct ptp_clock_info *ptp,
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
155
struct hclge_dev *hdev = hclge_ptp_get_hdev(ptp);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
158
spin_lock_irqsave(&hdev->ptp->lock, flags);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
159
writel(ts->tv_nsec, hdev->ptp->io_base + HCLGE_PTP_TIME_NSEC_REG);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
16
ptp->cycle.den = readl(hdev->ptp->io_base + HCLGE_PTP_CYCLE_DEN_REG);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
161
hdev->ptp->io_base + HCLGE_PTP_TIME_SEC_H_REG);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
163
hdev->ptp->io_base + HCLGE_PTP_TIME_SEC_L_REG);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
166
hdev->ptp->io_base + HCLGE_PTP_TIME_SYNC_REG);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
167
spin_unlock_irqrestore(&hdev->ptp->lock, flags);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
172
static int hclge_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
174
struct hclge_dev *hdev = hclge_ptp_get_hdev(ptp);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
18
if (ptp->cycle.den == 0) {
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
189
hclge_ptp_gettimex(ptp, &ts, NULL);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
193
return hclge_ptp_settime(ptp, &ts);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
198
spin_lock_irqsave(&hdev->ptp->lock, flags);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
199
writel(adj_val, hdev->ptp->io_base + HCLGE_PTP_TIME_NSEC_REG);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
201
hdev->ptp->io_base + HCLGE_PTP_TIME_ADJ_REG);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
202
spin_unlock_irqrestore(&hdev->ptp->lock, flags);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
216
*config = hdev->ptp->ts_cfg;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
26
static int hclge_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
28
struct hclge_dev *hdev = hclge_ptp_get_hdev(ptp);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
29
struct hclge_ptp_cycle *cycle = &hdev->ptp->cycle;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
341
unsigned long flags = hdev->ptp->flags;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
345
if (test_bit(HCLGE_PTP_FLAG_EN, &hdev->ptp->flags))
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
360
hdev->ptp->flags = flags;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
361
hdev->ptp->ptp_cfg = ptp_cfg;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
383
hdev->ptp->ts_cfg = *config;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
404
if (hdev->ptp->clock)
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
405
info->phc_index = ptp_clock_index(hdev->ptp->clock);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
428
struct hclge_ptp *ptp;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
430
ptp = devm_kzalloc(&hdev->pdev->dev, sizeof(*ptp), GFP_KERNEL);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
431
if (!ptp)
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
434
ptp->hdev = hdev;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
435
snprintf(ptp->info.name, sizeof(ptp->info.name), "%s",
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
437
ptp->info.owner = THIS_MODULE;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
438
ptp->info.max_adj = HCLGE_PTP_CYCLE_ADJ_MAX;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
439
ptp->info.n_ext_ts = 0;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
44
spin_lock_irqsave(&hdev->ptp->lock, flags);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
440
ptp->info.pps = 0;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
441
ptp->info.adjfine = hclge_ptp_adjfine;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
442
ptp->info.adjtime = hclge_ptp_adjtime;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
443
ptp->info.gettimex64 = hclge_ptp_gettimex;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
444
ptp->info.settime64 = hclge_ptp_settime;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
446
ptp->info.n_alarm = 0;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
448
spin_lock_init(&ptp->lock);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
449
ptp->io_base = hdev->hw.hw.io_base + HCLGE_PTP_REG_OFFSET;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
450
ptp->ts_cfg.rx_filter = HWTSTAMP_FILTER_NONE;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
451
ptp->ts_cfg.tx_type = HWTSTAMP_TX_OFF;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
452
hdev->ptp = ptp;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
454
ptp->clock = ptp_clock_register(&ptp->info, &hdev->pdev->dev);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
455
if (IS_ERR(ptp->clock)) {
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
458
ptp->info.n_alarm, PTR_ERR(ptp->clock));
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
46
hdev->ptp->io_base + HCLGE_PTP_CYCLE_QUO_REG);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
460
} else if (!ptp->clock) {
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
47
writel(numerator, hdev->ptp->io_base + HCLGE_PTP_CYCLE_NUM_REG);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
470
ptp_clock_unregister(hdev->ptp->clock);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
471
hdev->ptp->clock = NULL;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
472
devm_kfree(&hdev->pdev->dev, hdev->ptp);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
473
hdev->ptp = NULL;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
48
writel(cycle->den, hdev->ptp->io_base + HCLGE_PTP_CYCLE_DEN_REG);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
485
if (!hdev->ptp) {
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
499
set_bit(HCLGE_PTP_FLAG_EN, &hdev->ptp->flags);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
50
hdev->ptp->io_base + HCLGE_PTP_CYCLE_CFG_REG);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
500
ret = hclge_ptp_adjfine(&hdev->ptp->info, 0);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
507
ret = hclge_ptp_set_ts_mode(hdev, &hdev->ptp->ts_cfg);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
51
spin_unlock_irqrestore(&hdev->ptp->lock, flags);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
515
ret = hclge_ptp_settime(&hdev->ptp->info, &ts);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
528
clear_bit(HCLGE_PTP_FLAG_EN, &hdev->ptp->flags);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
538
struct hclge_ptp *ptp = hdev->ptp;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
540
if (!ptp)
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
545
clear_bit(HCLGE_PTP_FLAG_EN, &ptp->flags);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
546
ptp->ts_cfg.rx_filter = HWTSTAMP_FILTER_NONE;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
547
ptp->ts_cfg.tx_type = HWTSTAMP_TX_OFF;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
549
if (hclge_ptp_set_ts_mode(hdev, &ptp->ts_cfg))
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
552
if (ptp->tx_skb) {
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
553
struct sk_buff *skb = ptp->tx_skb;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
555
ptp->tx_skb = NULL;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
60
struct hclge_ptp *ptp = hdev->ptp;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
62
if (!ptp)
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
65
if (!test_bit(HCLGE_PTP_FLAG_TX_EN, &ptp->flags) ||
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
67
ptp->tx_skipped++;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
71
ptp->tx_start = jiffies;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
72
ptp->tx_skb = skb_get(skb);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
73
ptp->tx_cnt++;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
80
struct sk_buff *skb = hdev->ptp->tx_skb;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
85
ns = readl(hdev->ptp->io_base + HCLGE_PTP_TX_TS_NSEC_REG) &
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
87
lo = readl(hdev->ptp->io_base + HCLGE_PTP_TX_TS_SEC_L_REG);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
88
hi = readl(hdev->ptp->io_base + HCLGE_PTP_TX_TS_SEC_H_REG) &
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
90
hdev->ptp->last_tx_seqid = readl(hdev->ptp->io_base +
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
94
hdev->ptp->tx_skb = NULL;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
95
hdev->ptp->tx_cleaned++;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.h
127
struct hclge_ptp *ptp = container_of(info, struct hclge_ptp, info);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.h
129
return ptp->hdev;
drivers/net/ethernet/intel/e1000e/ptp.c
141
static int e1000e_phc_getcrosststamp(struct ptp_clock_info *ptp,
drivers/net/ethernet/intel/e1000e/ptp.c
144
struct e1000_adapter *adapter = container_of(ptp, struct e1000_adapter,
drivers/net/ethernet/intel/e1000e/ptp.c
162
static int e1000e_phc_gettimex(struct ptp_clock_info *ptp,
drivers/net/ethernet/intel/e1000e/ptp.c
166
struct e1000_adapter *adapter = container_of(ptp, struct e1000_adapter,
drivers/net/ethernet/intel/e1000e/ptp.c
192
static int e1000e_phc_settime(struct ptp_clock_info *ptp,
drivers/net/ethernet/intel/e1000e/ptp.c
195
struct e1000_adapter *adapter = container_of(ptp, struct e1000_adapter,
drivers/net/ethernet/intel/e1000e/ptp.c
219
static int e1000e_phc_enable(struct ptp_clock_info __always_unused *ptp,
drivers/net/ethernet/intel/e1000e/ptp.c
27
static int e1000e_phc_adjfine(struct ptp_clock_info *ptp, long delta)
drivers/net/ethernet/intel/e1000e/ptp.c
29
struct e1000_adapter *adapter = container_of(ptp, struct e1000_adapter,
drivers/net/ethernet/intel/e1000e/ptp.c
66
static int e1000e_phc_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/net/ethernet/intel/e1000e/ptp.c
68
struct e1000_adapter *adapter = container_of(ptp, struct e1000_adapter,
drivers/net/ethernet/intel/i40e/i40e_ptp.c
257
static int i40e_ptp_verify(struct ptp_clock_info *ptp, unsigned int pin,
drivers/net/ethernet/intel/i40e/i40e_ptp.c
347
static int i40e_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/net/ethernet/intel/i40e/i40e_ptp.c
349
struct i40e_pf *pf = container_of(ptp, struct i40e_pf, ptp_caps);
drivers/net/ethernet/intel/i40e/i40e_ptp.c
402
static int i40e_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/net/ethernet/intel/i40e/i40e_ptp.c
404
struct i40e_pf *pf = container_of(ptp, struct i40e_pf, ptp_caps);
drivers/net/ethernet/intel/i40e/i40e_ptp.c
449
static int i40e_ptp_gettimex(struct ptp_clock_info *ptp, struct timespec64 *ts,
drivers/net/ethernet/intel/i40e/i40e_ptp.c
452
struct i40e_pf *pf = container_of(ptp, struct i40e_pf, ptp_caps);
drivers/net/ethernet/intel/i40e/i40e_ptp.c
469
static int i40e_ptp_settime(struct ptp_clock_info *ptp,
drivers/net/ethernet/intel/i40e/i40e_ptp.c
472
struct i40e_pf *pf = container_of(ptp, struct i40e_pf, ptp_caps);
drivers/net/ethernet/intel/i40e/i40e_ptp.c
490
static int i40e_pps_configure(struct ptp_clock_info *ptp,
drivers/net/ethernet/intel/i40e/i40e_ptp.c
494
struct i40e_pf *pf = container_of(ptp, struct i40e_pf, ptp_caps);
drivers/net/ethernet/intel/i40e/i40e_ptp.c
595
static int i40e_ptp_feature_enable(struct ptp_clock_info *ptp,
drivers/net/ethernet/intel/i40e/i40e_ptp.c
599
struct i40e_pf *pf = container_of(ptp, struct i40e_pf, ptp_caps);
drivers/net/ethernet/intel/i40e/i40e_ptp.c
615
return i40e_pps_configure(ptp, rq, on);
drivers/net/ethernet/intel/iavf/iavf.h
448
struct iavf_ptp ptp;
drivers/net/ethernet/intel/iavf/iavf_main.c
2680
memset(&adapter->ptp.hw_caps, 0, sizeof(adapter->ptp.hw_caps));
drivers/net/ethernet/intel/iavf/iavf_main.c
5048
*config = adapter->ptp.hwtstamp_config;
drivers/net/ethernet/intel/iavf/iavf_main.c
5418
INIT_LIST_HEAD(&adapter->ptp.aq_cmds);
drivers/net/ethernet/intel/iavf/iavf_main.c
5419
init_waitqueue_head(&adapter->ptp.phc_time_waitqueue);
drivers/net/ethernet/intel/iavf/iavf_main.c
5420
mutex_init(&adapter->ptp.aq_cmd_lock);
drivers/net/ethernet/intel/iavf/iavf_ptp.c
118
return (adapter->ptp.hw_caps.caps & cap) == cap;
drivers/net/ethernet/intel/iavf/iavf_ptp.c
157
mutex_lock(&adapter->ptp.aq_cmd_lock);
drivers/net/ethernet/intel/iavf/iavf_ptp.c
158
list_add_tail(&cmd->list, &adapter->ptp.aq_cmds);
drivers/net/ethernet/intel/iavf/iavf_ptp.c
159
mutex_unlock(&adapter->ptp.aq_cmd_lock);
drivers/net/ethernet/intel/iavf/iavf_ptp.c
181
if (!adapter->ptp.clock)
drivers/net/ethernet/intel/iavf/iavf_ptp.c
219
adapter->ptp.phc_time_ready = false;
drivers/net/ethernet/intel/iavf/iavf_ptp.c
227
ret = wait_event_interruptible_timeout(adapter->ptp.phc_time_waitqueue,
drivers/net/ethernet/intel/iavf/iavf_ptp.c
228
adapter->ptp.phc_time_ready,
drivers/net/ethernet/intel/iavf/iavf_ptp.c
238
*ts = ns_to_timespec64(adapter->ptp.cached_phc_time);
drivers/net/ethernet/intel/iavf/iavf_ptp.c
249
if (!adapter->ptp.clock)
drivers/net/ethernet/intel/iavf/iavf_ptp.c
273
if (!time_is_before_jiffies(adapter->ptp.cached_phc_updated + HZ))
drivers/net/ethernet/intel/iavf/iavf_ptp.c
321
struct ptp_clock_info *ptp_info = &adapter->ptp.info;
drivers/net/ethernet/intel/iavf/iavf_ptp.c
336
adapter->ptp.clock = clock;
drivers/net/ethernet/intel/iavf/iavf_ptp.c
339
adapter->ptp.info.name);
drivers/net/ethernet/intel/iavf/iavf_ptp.c
372
rx_ring->ptp = &adapter->ptp;
drivers/net/ethernet/intel/iavf/iavf_ptp.c
375
ptp_schedule_worker(adapter->ptp.clock, 0);
drivers/net/ethernet/intel/iavf/iavf_ptp.c
388
if (!adapter->ptp.clock)
drivers/net/ethernet/intel/iavf/iavf_ptp.c
392
adapter->ptp.info.name);
drivers/net/ethernet/intel/iavf/iavf_ptp.c
393
ptp_clock_unregister(adapter->ptp.clock);
drivers/net/ethernet/intel/iavf/iavf_ptp.c
394
adapter->ptp.clock = NULL;
drivers/net/ethernet/intel/iavf/iavf_ptp.c
397
mutex_lock(&adapter->ptp.aq_cmd_lock);
drivers/net/ethernet/intel/iavf/iavf_ptp.c
398
list_for_each_entry_safe(cmd, tmp, &adapter->ptp.aq_cmds, list) {
drivers/net/ethernet/intel/iavf/iavf_ptp.c
403
mutex_unlock(&adapter->ptp.aq_cmd_lock);
drivers/net/ethernet/intel/iavf/iavf_ptp.c
405
adapter->ptp.hwtstamp_config.rx_filter = HWTSTAMP_FILTER_NONE;
drivers/net/ethernet/intel/iavf/iavf_ptp.c
424
if (adapter->ptp.clock && !phc)
drivers/net/ethernet/intel/iavf/iavf_ptp.c
426
else if (!adapter->ptp.clock && phc)
drivers/net/ethernet/intel/iavf/iavf_ptp.c
431
adapter->ptp.hwtstamp_config.rx_filter = HWTSTAMP_FILTER_NONE;
drivers/net/ethernet/intel/iavf/iavf_ptp.c
8
container_of_const(info, struct iavf_adapter, ptp.info)
drivers/net/ethernet/intel/iavf/iavf_ptp.c
99
adapter->ptp.hwtstamp_config = *config;
drivers/net/ethernet/intel/iavf/iavf_txrx.c
1111
ns = iavf_ptp_extend_32b_timestamp(rx_ring->ptp->cached_phc_time,
drivers/net/ethernet/intel/iavf/iavf_txrx.h
284
struct iavf_ptp *ptp;
drivers/net/ethernet/intel/iavf/iavf_virtchnl.c
1531
if (!adapter->ptp.clock) {
drivers/net/ethernet/intel/iavf/iavf_virtchnl.c
1540
mutex_lock(&adapter->ptp.aq_cmd_lock);
drivers/net/ethernet/intel/iavf/iavf_virtchnl.c
1541
cmd = list_first_entry_or_null(&adapter->ptp.aq_cmds,
drivers/net/ethernet/intel/iavf/iavf_virtchnl.c
1570
if (list_empty(&adapter->ptp.aq_cmds))
drivers/net/ethernet/intel/iavf/iavf_virtchnl.c
1575
mutex_unlock(&adapter->ptp.aq_cmd_lock);
drivers/net/ethernet/intel/iavf/iavf_virtchnl.c
2298
adapter->ptp.cached_phc_time = msg->time;
drivers/net/ethernet/intel/iavf/iavf_virtchnl.c
2299
adapter->ptp.cached_phc_updated = jiffies;
drivers/net/ethernet/intel/iavf/iavf_virtchnl.c
2300
adapter->ptp.phc_time_ready = true;
drivers/net/ethernet/intel/iavf/iavf_virtchnl.c
2302
wake_up(&adapter->ptp.phc_time_waitqueue);
drivers/net/ethernet/intel/iavf/iavf_virtchnl.c
2725
if (msglen != sizeof(adapter->ptp.hw_caps))
drivers/net/ethernet/intel/iavf/iavf_virtchnl.c
2728
adapter->ptp.hw_caps = *(struct virtchnl_ptp_caps *)msg;
drivers/net/ethernet/intel/iavf/iavf_virtchnl.c
363
adapter->ptp.hw_caps = caps;
drivers/net/ethernet/intel/ice/ice.h
596
struct ice_ptp ptp;
drivers/net/ethernet/intel/ice/ice.h
709
return pf->ptp.tx_interrupt_mode != ICE_PTP_TX_INTERRUPT_NONE;
drivers/net/ethernet/intel/ice/ice_dpll.c
2455
pf->ptp.port.port_num,
drivers/net/ethernet/intel/ice/ice_dpll.c
3656
ret = ice_dpll_init_rclk_pin(pf, count + pf->ptp.port.port_num,
drivers/net/ethernet/intel/ice/ice_dpll.c
573
(pf->ptp.port.port_num + ICE_CGU_BYPASS_MUX_OFFSET_E825C));
drivers/net/ethernet/intel/ice/ice_dpll.c
581
(pf->ptp.port.port_num + ICE_CGU_BYPASS_MUX_OFFSET_E825C));
drivers/net/ethernet/intel/ice/ice_ethtool.c
141
ICE_PF_STAT("tx_hwtstamp_skipped", ptp.tx_hwtstamp_skipped),
drivers/net/ethernet/intel/ice/ice_ethtool.c
142
ICE_PF_STAT("tx_hwtstamp_timeouts", ptp.tx_hwtstamp_timeouts),
drivers/net/ethernet/intel/ice/ice_ethtool.c
143
ICE_PF_STAT("tx_hwtstamp_flushed", ptp.tx_hwtstamp_flushed),
drivers/net/ethernet/intel/ice/ice_ethtool.c
144
ICE_PF_STAT("tx_hwtstamp_discarded", ptp.tx_hwtstamp_discarded),
drivers/net/ethernet/intel/ice/ice_ethtool.c
145
ICE_PF_STAT("late_cached_phc_updates", ptp.late_cached_phc_updates),
drivers/net/ethernet/intel/ice/ice_ethtool.c
3293
tx_rings[i].tx_tstamps = &pf->ptp.port.tx;
drivers/net/ethernet/intel/ice/ice_ethtool.c
3350
rx_rings[i].cached_phctime = pf->ptp.cached_phc_time;
drivers/net/ethernet/intel/ice/ice_ethtool.c
3767
if (pf->ptp.state != ICE_PTP_READY)
drivers/net/ethernet/intel/ice/ice_ethtool.c
4748
struct ice_ptp *ptp = &pf->ptp;
drivers/net/ethernet/intel/ice/ice_ethtool.c
4750
ts_stats->pkts = ptp->tx_hwtstamp_good;
drivers/net/ethernet/intel/ice/ice_ethtool.c
4751
ts_stats->err = ptp->tx_hwtstamp_skipped +
drivers/net/ethernet/intel/ice/ice_ethtool.c
4752
ptp->tx_hwtstamp_flushed +
drivers/net/ethernet/intel/ice/ice_ethtool.c
4753
ptp->tx_hwtstamp_discarded;
drivers/net/ethernet/intel/ice/ice_ethtool.c
4754
ts_stats->lost = ptp->tx_hwtstamp_timeouts;
drivers/net/ethernet/intel/ice/ice_lib.c
1410
ring->tx_tstamps = &pf->ptp.port.tx;
drivers/net/ethernet/intel/ice/ice_lib.c
1435
ring->cached_phctime = pf->ptp.cached_phc_time;
drivers/net/ethernet/intel/ice/ice_main.c
3144
tx = &pf->ptp.port.tx;
drivers/net/ethernet/intel/ice/ice_main.c
3267
pf->ptp.ext_ts_irq |= gltsyn_stat &
drivers/net/ethernet/intel/ice/ice_main.c
3971
if (pf->ptp.clock)
drivers/net/ethernet/intel/ice/ice_main.c
3972
ptp_clock_unregister(pf->ptp.clock);
drivers/net/ethernet/intel/ice/ice_ptp.c
1007
ice_ptp_mark_tx_tracker_stale(&pf->ptp.port.tx);
drivers/net/ethernet/intel/ice/ice_ptp.c
105
switch (pf->ptp.tx_interrupt_mode) {
drivers/net/ethernet/intel/ice/ice_ptp.c
1151
kthread_queue_delayed_work(pf->ptp.kworker,
drivers/net/ethernet/intel/ice/ice_ptp.c
1163
kthread_queue_delayed_work(pf->ptp.kworker,
drivers/net/ethernet/intel/ice/ice_ptp.c
118
enable = pf->ptp.tstamp_config.tx_type == HWTSTAMP_TX_ON;
drivers/net/ethernet/intel/ice/ice_ptp.c
1258
kthread_queue_delayed_work(pf->ptp.kworker, &ptp_port->ov_work,
drivers/net/ethernet/intel/ice/ice_ptp.c
1287
if (pf->ptp.state != ICE_PTP_READY)
drivers/net/ethernet/intel/ice/ice_ptp.c
1290
ptp_port = &pf->ptp.port;
drivers/net/ethernet/intel/ice/ice_ptp.c
1375
for (quad = 0; quad < ICE_GET_QUAD_NUM(hw->ptp.num_lports);
drivers/net/ethernet/intel/ice/ice_ptp.c
1392
for (port = 0; port < hw->ptp.num_lports; port++) {
drivers/net/ethernet/intel/ice/ice_ptp.c
1417
ice_ptp_port_phy_restart(&pf->ptp.port);
drivers/net/ethernet/intel/ice/ice_ptp.c
1476
if (pf->ptp.state != ICE_PTP_READY)
drivers/net/ethernet/intel/ice/ice_ptp.c
1489
if (!(pf->ptp.ext_ts_irq & (1 << chan)))
drivers/net/ethernet/intel/ice/ice_ptp.c
1501
desc = &pf->ptp.ice_pin_desc[pin_desc_idx];
drivers/net/ethernet/intel/ice/ice_ptp.c
1507
pf->ptp.ext_ts_irq &= ~(1 << chan);
drivers/net/ethernet/intel/ice/ice_ptp.c
1508
ptp_clock_event(pf->ptp.clock, &event);
drivers/net/ethernet/intel/ice/ice_ptp.c
1538
gpio_pin = pf->ptp.ice_pin_desc[pin_desc_idx].gpio[0];
drivers/net/ethernet/intel/ice/ice_ptp.c
1568
for (unsigned int i = 0; i < pf->ptp.info.n_ext_ts; i++)
drivers/net/ethernet/intel/ice/ice_ptp.c
1569
if ((pf->ptp.extts_rqs[i].flags &
drivers/net/ethernet/intel/ice/ice_ptp.c
1592
for (unsigned int i = 0; i < pf->ptp.info.n_ext_ts ; i++)
drivers/net/ethernet/intel/ice/ice_ptp.c
1593
if (pf->ptp.extts_rqs[i].flags & PTP_ENABLE_FEATURE)
drivers/net/ethernet/intel/ice/ice_ptp.c
1594
ice_ptp_cfg_extts(pf, &pf->ptp.extts_rqs[i],
drivers/net/ethernet/intel/ice/ice_ptp.c
1608
for (unsigned int i = 0; i < pf->ptp.info.n_ext_ts ; i++)
drivers/net/ethernet/intel/ice/ice_ptp.c
1609
if (pf->ptp.extts_rqs[i].flags & PTP_ENABLE_FEATURE)
drivers/net/ethernet/intel/ice/ice_ptp.c
1610
ice_ptp_cfg_extts(pf, &pf->ptp.extts_rqs[i],
drivers/net/ethernet/intel/ice/ice_ptp.c
1705
gpio_pin = pf->ptp.ice_pin_desc[pin_desc_idx].gpio[1];
drivers/net/ethernet/intel/ice/ice_ptp.c
1706
prop_delay_ns = pf->ptp.ice_pin_desc[pin_desc_idx].delay[1];
drivers/net/ethernet/intel/ice/ice_ptp.c
1715
if (strncmp(pf->ptp.pin_desc[pin_desc_idx].name, "1PPS", 64) == 0 &&
drivers/net/ethernet/intel/ice/ice_ptp.c
1758
for (unsigned int i = 0; i < pf->ptp.info.n_per_out; i++)
drivers/net/ethernet/intel/ice/ice_ptp.c
1759
if (pf->ptp.perout_rqs[i].period.sec ||
drivers/net/ethernet/intel/ice/ice_ptp.c
1760
pf->ptp.perout_rqs[i].period.nsec)
drivers/net/ethernet/intel/ice/ice_ptp.c
1761
ice_ptp_cfg_perout(pf, &pf->ptp.perout_rqs[i],
drivers/net/ethernet/intel/ice/ice_ptp.c
1775
for (unsigned int i = 0; i < pf->ptp.info.n_per_out; i++)
drivers/net/ethernet/intel/ice/ice_ptp.c
1776
if (pf->ptp.perout_rqs[i].period.sec ||
drivers/net/ethernet/intel/ice/ice_ptp.c
1777
pf->ptp.perout_rqs[i].period.nsec)
drivers/net/ethernet/intel/ice/ice_ptp.c
1778
ice_ptp_cfg_perout(pf, &pf->ptp.perout_rqs[i],
drivers/net/ethernet/intel/ice/ice_ptp.c
1797
pin_desc = &pf->ptp.ice_pin_desc[pin];
drivers/net/ethernet/intel/ice/ice_ptp.c
1837
&pf->ptp.perout_rqs[rq->perout.index];
drivers/net/ethernet/intel/ice/ice_ptp.c
1851
&pf->ptp.extts_rqs[rq->extts.index];
drivers/net/ethernet/intel/ice/ice_ptp.c
187
enable_rx = pf->ptp.tstamp_config.rx_filter == HWTSTAMP_FILTER_ALL;
drivers/net/ethernet/intel/ice/ice_ptp.c
2210
if (pf->ptp.state != ICE_PTP_READY)
drivers/net/ethernet/intel/ice/ice_ptp.c
2213
*config = pf->ptp.tstamp_config;
drivers/net/ethernet/intel/ice/ice_ptp.c
2228
pf->ptp.tstamp_config.tx_type = HWTSTAMP_TX_OFF;
drivers/net/ethernet/intel/ice/ice_ptp.c
2231
pf->ptp.tstamp_config.tx_type = HWTSTAMP_TX_ON;
drivers/net/ethernet/intel/ice/ice_ptp.c
2239
pf->ptp.tstamp_config.rx_filter = HWTSTAMP_FILTER_NONE;
drivers/net/ethernet/intel/ice/ice_ptp.c
2255
pf->ptp.tstamp_config.rx_filter = HWTSTAMP_FILTER_ALL;
drivers/net/ethernet/intel/ice/ice_ptp.c
2282
if (pf->ptp.state != ICE_PTP_READY)
drivers/net/ethernet/intel/ice/ice_ptp.c
2290
*config = pf->ptp.tstamp_config;
drivers/net/ethernet/intel/ice/ice_ptp.c
2335
for (unsigned int i = 0; i < pf->ptp.info.n_pins; i++) {
drivers/net/ethernet/intel/ice/ice_ptp.c
2336
const struct ice_ptp_pin_desc *desc = &pf->ptp.ice_pin_desc[i];
drivers/net/ethernet/intel/ice/ice_ptp.c
2337
struct ptp_pin_desc *pin = &pf->ptp.pin_desc[i];
drivers/net/ethernet/intel/ice/ice_ptp.c
2350
pf->ptp.info.pin_config = pf->ptp.pin_desc;
drivers/net/ethernet/intel/ice/ice_ptp.c
2362
struct ptp_clock_info *info = &pf->ptp.info;
drivers/net/ethernet/intel/ice/ice_ptp.c
2431
pf->ptp.info.n_pins = n_pins;
drivers/net/ethernet/intel/ice/ice_ptp.c
2446
pf->ptp.info.getcrosststamp = ice_ptp_getcrosststamp;
drivers/net/ethernet/intel/ice/ice_ptp.c
2449
pf->ptp.ice_pin_desc = ice_pin_desc_e825c;
drivers/net/ethernet/intel/ice/ice_ptp.c
2450
pf->ptp.info.n_pins = ARRAY_SIZE(ice_pin_desc_e825c);
drivers/net/ethernet/intel/ice/ice_ptp.c
2452
pf->ptp.ice_pin_desc = ice_pin_desc_e82x;
drivers/net/ethernet/intel/ice/ice_ptp.c
2453
pf->ptp.info.n_pins = ARRAY_SIZE(ice_pin_desc_e82x);
drivers/net/ethernet/intel/ice/ice_ptp.c
2471
struct ice_ptp *ptp = &pf->ptp;
drivers/net/ethernet/intel/ice/ice_ptp.c
2479
ptp->ice_pin_desc = ice_pin_desc_dpll;
drivers/net/ethernet/intel/ice/ice_ptp.c
2480
ptp->info.n_pins = ARRAY_SIZE(ice_pin_desc_dpll);
drivers/net/ethernet/intel/ice/ice_ptp.c
2482
pf->ptp.ice_pin_desc = ice_pin_desc_e810;
drivers/net/ethernet/intel/ice/ice_ptp.c
2483
pf->ptp.info.n_pins = ARRAY_SIZE(ice_pin_desc_e810);
drivers/net/ethernet/intel/ice/ice_ptp.c
2497
ptp->ice_pin_desc = (const struct ice_ptp_pin_desc *)desc;
drivers/net/ethernet/intel/ice/ice_ptp.c
2500
ptp->info.pin_config = ptp->pin_desc;
drivers/net/ethernet/intel/ice/ice_ptp.c
2523
pf->ptp.info.getcrosststamp = ice_ptp_getcrosststamp;
drivers/net/ethernet/intel/ice/ice_ptp.c
2527
pf->ptp.ice_pin_desc = ice_pin_desc_e810;
drivers/net/ethernet/intel/ice/ice_ptp.c
2528
pf->ptp.info.n_pins = ARRAY_SIZE(ice_pin_desc_e810);
drivers/net/ethernet/intel/ice/ice_ptp.c
2538
struct ptp_clock_info *info = &pf->ptp.info;
drivers/net/ethernet/intel/ice/ice_ptp.c
2590
if (pf->ptp.clock)
drivers/net/ethernet/intel/ice/ice_ptp.c
2595
info = &pf->ptp.info;
drivers/net/ethernet/intel/ice/ice_ptp.c
2599
pf->ptp.clock = ptp_clock_register(info, dev);
drivers/net/ethernet/intel/ice/ice_ptp.c
2600
if (IS_ERR(pf->ptp.clock)) {
drivers/net/ethernet/intel/ice/ice_ptp.c
2602
return PTR_ERR(pf->ptp.clock);
drivers/net/ethernet/intel/ice/ice_ptp.c
2658
switch (pf->ptp.tx_interrupt_mode) {
drivers/net/ethernet/intel/ice/ice_ptp.c
2664
ice_ptp_process_tx_tstamp(&pf->ptp.port.tx);
drivers/net/ethernet/intel/ice/ice_ptp.c
2672
pf->ptp.tx_interrupt_mode);
drivers/net/ethernet/intel/ice/ice_ptp.c
2714
switch (pf->ptp.tx_interrupt_mode) {
drivers/net/ethernet/intel/ice/ice_ptp.c
2718
if (ice_port_has_timestamps(&pf->ptp.port.tx))
drivers/net/ethernet/intel/ice/ice_ptp.c
2727
pf->ptp.tx_interrupt_mode);
drivers/net/ethernet/intel/ice/ice_ptp.c
2732
for (i = 0; i < ICE_GET_QUAD_NUM(hw->ptp.num_lports); i++) {
drivers/net/ethernet/intel/ice/ice_ptp.c
2762
struct ice_ptp_tx *tx = &pf->ptp.port.tx;
drivers/net/ethernet/intel/ice/ice_ptp.c
2828
if (!pf->ptp.port.tx.has_ready_bitmap)
drivers/net/ethernet/intel/ice/ice_ptp.c
2834
for (i = 0; i < ICE_GET_QUAD_NUM(hw->ptp.num_lports); i++) {
drivers/net/ethernet/intel/ice/ice_ptp.c
2858
struct ice_ptp *ptp = container_of(work, struct ice_ptp, work.work);
drivers/net/ethernet/intel/ice/ice_ptp.c
2859
struct ice_pf *pf = container_of(ptp, struct ice_pf, ptp);
drivers/net/ethernet/intel/ice/ice_ptp.c
2862
if (pf->ptp.state != ICE_PTP_READY)
drivers/net/ethernet/intel/ice/ice_ptp.c
2870
kthread_queue_delayed_work(ptp->kworker, &ptp->work,
drivers/net/ethernet/intel/ice/ice_ptp.c
2884
pf->ptp.state == ICE_PTP_READY)
drivers/net/ethernet/intel/ice/ice_ptp.c
2885
kthread_queue_delayed_work(pf->ptp.kworker, &pf->ptp.work, 0);
drivers/net/ethernet/intel/ice/ice_ptp.c
2926
struct ice_ptp *ptp = &pf->ptp;
drivers/net/ethernet/intel/ice/ice_ptp.c
2930
if (ptp->state != ICE_PTP_READY)
drivers/net/ethernet/intel/ice/ice_ptp.c
2933
ptp->state = ICE_PTP_RESETTING;
drivers/net/ethernet/intel/ice/ice_ptp.c
2938
kthread_cancel_delayed_work_sync(&ptp->work);
drivers/net/ethernet/intel/ice/ice_ptp.c
2946
ice_ptp_release_tx_tracker(pf, &pf->ptp.port.tx);
drivers/net/ethernet/intel/ice/ice_ptp.c
2957
ptp->reset_time = ktime_get_real_ns();
drivers/net/ethernet/intel/ice/ice_ptp.c
2969
struct ice_ptp *ptp = &pf->ptp;
drivers/net/ethernet/intel/ice/ice_ptp.c
2998
if (ptp->cached_phc_time) {
drivers/net/ethernet/intel/ice/ice_ptp.c
2999
time_diff = ktime_get_real_ns() - ptp->reset_time;
drivers/net/ethernet/intel/ice/ice_ptp.c
3000
ts = ns_to_timespec64(ptp->cached_phc_time + time_diff);
drivers/net/ethernet/intel/ice/ice_ptp.c
3041
struct ice_ptp *ptp = &pf->ptp;
drivers/net/ethernet/intel/ice/ice_ptp.c
3044
if (ptp->state == ICE_PTP_READY) {
drivers/net/ethernet/intel/ice/ice_ptp.c
3046
} else if (ptp->state != ICE_PTP_RESETTING) {
drivers/net/ethernet/intel/ice/ice_ptp.c
3058
ptp->state = ICE_PTP_READY;
drivers/net/ethernet/intel/ice/ice_ptp.c
3064
ptp->state = ICE_PTP_ERROR;
drivers/net/ethernet/intel/ice/ice_ptp.c
3081
struct ice_ptp *ptp = &pf->ptp;
drivers/net/ethernet/intel/ice/ice_ptp.c
3086
INIT_LIST_HEAD(&ptp->port.list_node);
drivers/net/ethernet/intel/ice/ice_ptp.c
3089
list_add(&ptp->port.list_node,
drivers/net/ethernet/intel/ice/ice_ptp.c
3098
struct ice_ptp *ptp = &pf->ptp;
drivers/net/ethernet/intel/ice/ice_ptp.c
3102
list_del(&ptp->port.list_node);
drivers/net/ethernet/intel/ice/ice_ptp.c
3186
pf->ptp.clock = NULL;
drivers/net/ethernet/intel/ice/ice_ptp.c
3200
static int ice_ptp_init_work(struct ice_pf *pf, struct ice_ptp *ptp)
drivers/net/ethernet/intel/ice/ice_ptp.c
3205
kthread_init_delayed_work(&ptp->work, ice_ptp_periodic_work);
drivers/net/ethernet/intel/ice/ice_ptp.c
3215
ptp->kworker = kworker;
drivers/net/ethernet/intel/ice/ice_ptp.c
3218
kthread_queue_delayed_work(ptp->kworker, &ptp->work, 0);
drivers/net/ethernet/intel/ice/ice_ptp.c
3269
pf->ptp.tx_interrupt_mode = ICE_PTP_TX_INTERRUPT_ALL;
drivers/net/ethernet/intel/ice/ice_ptp.c
3271
pf->ptp.tx_interrupt_mode = ICE_PTP_TX_INTERRUPT_NONE;
drivers/net/ethernet/intel/ice/ice_ptp.c
3275
pf->ptp.tx_interrupt_mode = ICE_PTP_TX_INTERRUPT_SELF;
drivers/net/ethernet/intel/ice/ice_ptp.c
3293
struct ice_ptp *ptp = &pf->ptp;
drivers/net/ethernet/intel/ice/ice_ptp.c
3297
ptp->state = ICE_PTP_INITIALIZING;
drivers/net/ethernet/intel/ice/ice_ptp.c
3303
ptp->port.port_num = hw->lane_num;
drivers/net/ethernet/intel/ice/ice_ptp.c
3325
err = ice_ptp_init_port(pf, &ptp->port);
drivers/net/ethernet/intel/ice/ice_ptp.c
3335
ptp->state = ICE_PTP_READY;
drivers/net/ethernet/intel/ice/ice_ptp.c
3337
err = ice_ptp_init_work(pf, ptp);
drivers/net/ethernet/intel/ice/ice_ptp.c
3345
mutex_destroy(&ptp->port.ps_lock);
drivers/net/ethernet/intel/ice/ice_ptp.c
3349
if (pf->ptp.clock) {
drivers/net/ethernet/intel/ice/ice_ptp.c
3350
ptp_clock_unregister(ptp->clock);
drivers/net/ethernet/intel/ice/ice_ptp.c
3351
pf->ptp.clock = NULL;
drivers/net/ethernet/intel/ice/ice_ptp.c
3356
ptp->state = ICE_PTP_UNINIT;
drivers/net/ethernet/intel/ice/ice_ptp.c
3369
if (pf->ptp.state == ICE_PTP_UNINIT)
drivers/net/ethernet/intel/ice/ice_ptp.c
3372
if (pf->ptp.state != ICE_PTP_READY) {
drivers/net/ethernet/intel/ice/ice_ptp.c
3373
mutex_destroy(&pf->ptp.port.ps_lock);
drivers/net/ethernet/intel/ice/ice_ptp.c
3375
if (pf->ptp.clock) {
drivers/net/ethernet/intel/ice/ice_ptp.c
3376
ptp_clock_unregister(pf->ptp.clock);
drivers/net/ethernet/intel/ice/ice_ptp.c
3377
pf->ptp.clock = NULL;
drivers/net/ethernet/intel/ice/ice_ptp.c
3382
pf->ptp.state = ICE_PTP_UNINIT;
drivers/net/ethernet/intel/ice/ice_ptp.c
3389
ice_ptp_release_tx_tracker(pf, &pf->ptp.port.tx);
drivers/net/ethernet/intel/ice/ice_ptp.c
3393
kthread_cancel_delayed_work_sync(&pf->ptp.work);
drivers/net/ethernet/intel/ice/ice_ptp.c
3395
ice_ptp_port_phy_stop(&pf->ptp.port);
drivers/net/ethernet/intel/ice/ice_ptp.c
3396
mutex_destroy(&pf->ptp.port.ps_lock);
drivers/net/ethernet/intel/ice/ice_ptp.c
3397
if (pf->ptp.kworker) {
drivers/net/ethernet/intel/ice/ice_ptp.c
3398
kthread_destroy_worker(pf->ptp.kworker);
drivers/net/ethernet/intel/ice/ice_ptp.c
3399
pf->ptp.kworker = NULL;
drivers/net/ethernet/intel/ice/ice_ptp.c
3402
if (!pf->ptp.clock)
drivers/net/ethernet/intel/ice/ice_ptp.c
3408
ptp_clock_unregister(pf->ptp.clock);
drivers/net/ethernet/intel/ice/ice_ptp.c
3409
pf->ptp.clock = NULL;
drivers/net/ethernet/intel/ice/ice_ptp.c
347
discard_time = pf->ptp.cached_phc_jiffies + msecs_to_jiffies(2000);
drivers/net/ethernet/intel/ice/ice_ptp.c
349
pf->ptp.tx_hwtstamp_discarded++;
drivers/net/ethernet/intel/ice/ice_ptp.c
353
return ice_ptp_extend_32b_ts(pf->ptp.cached_phc_time,
drivers/net/ethernet/intel/ice/ice_ptp.c
392
params = &pf->hw.ptp.phy.e810;
drivers/net/ethernet/intel/ice/ice_ptp.c
397
pf->ptp.tx_hwtstamp_timeouts++;
drivers/net/ethernet/intel/ice/ice_ptp.c
446
params = &pf->hw.ptp.phy.e810;
drivers/net/ethernet/intel/ice/ice_ptp.c
505
pf->ptp.tx_hwtstamp_good++;
drivers/net/ethernet/intel/ice/ice_ptp.c
601
pf->ptp.tx_hwtstamp_timeouts++;
drivers/net/ethernet/intel/ice/ice_ptp.c
66
return !ctrl_pf ? NULL : &ctrl_pf->ptp;
drivers/net/ethernet/intel/ice/ice_ptp.c
677
pf->ptp.tx_hwtstamp_good += tstamp_good;
drivers/net/ethernet/intel/ice/ice_ptp.c
775
pf->ptp.tx_hwtstamp_flushed++;
drivers/net/ethernet/intel/ice/ice_ptp.c
80
const struct ptp_clock_info *info = &pf->ptp.info;
drivers/net/ethernet/intel/ice/ice_ptp.c
926
update_before = pf->ptp.cached_phc_jiffies + msecs_to_jiffies(2000);
drivers/net/ethernet/intel/ice/ice_ptp.c
927
if (pf->ptp.cached_phc_time &&
drivers/net/ethernet/intel/ice/ice_ptp.c
929
unsigned long time_taken = jiffies - pf->ptp.cached_phc_jiffies;
drivers/net/ethernet/intel/ice/ice_ptp.c
933
pf->ptp.late_cached_phc_updates++;
drivers/net/ethernet/intel/ice/ice_ptp.c
940
WRITE_ONCE(pf->ptp.cached_phc_time, systime);
drivers/net/ethernet/intel/ice/ice_ptp.c
941
WRITE_ONCE(pf->ptp.cached_phc_jiffies, jiffies);
drivers/net/ethernet/intel/ice/ice_ptp.c
998
kthread_queue_delayed_work(pf->ptp.kworker, &pf->ptp.work,
drivers/net/ethernet/intel/ice/ice_ptp.h
276
container_of(__ptp_port_to_ptp((p)), struct ice_pf, ptp)
drivers/net/ethernet/intel/ice/ice_ptp.h
281
container_of(__ptp_info_to_ptp((i)), struct ice_pf, ptp)
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
1125
for (port = 0; port < hw->ptp.num_lports; port++) {
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
1185
for (port = 0; port < hw->ptp.num_lports; port++) {
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
1281
for (port = 0; port < hw->ptp.num_lports; port++) {
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
1309
for (port = 0; port < hw->ptp.num_lports; port++) {
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
1537
enable = hw->ptp.phy.eth56g.onestep_ena;
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
1538
peer_delay = hw->ptp.phy.eth56g.peer_delay;
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
1539
sfd_ena = hw->ptp.phy.eth56g.sfd_ena;
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
1731
onestep = hw->ptp.phy.eth56g.onestep_ena;
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
1732
sfd = hw->ptp.phy.eth56g.sfd_ena;
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
1788
onestep = hw->ptp.phy.eth56g.onestep_ena;
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
2132
const struct ice_eth56g_params *params = &hw->ptp.phy.eth56g;
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
2136
mask = (1 << hw->ptp.ports_per_phy) - 1;
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
2146
*ts_status |= (status & mask) << (phy * hw->ptp.ports_per_phy);
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
2190
struct ice_ptp_hw *ptp = &hw->ptp;
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
2193
params = &ptp->phy.eth56g;
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
2198
ptp->ports_per_phy = 4;
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
2199
ptp->num_lports = params->num_phys * ptp->ports_per_phy;
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
2220
phy_port = port % hw->ptp.ports_per_phy;
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
2222
ICE_GET_QUAD_NUM(hw->ptp.ports_per_phy);
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
2552
if (quad >= ICE_GET_QUAD_NUM(hw->ptp.num_lports))
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
2557
if (!(quad % ICE_GET_QUAD_NUM(hw->ptp.ports_per_phy)))
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
2740
for (quad = 0; quad < ICE_GET_QUAD_NUM(hw->ptp.num_lports); quad++)
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
2754
for (port = 0; port < hw->ptp.num_lports; port++) {
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
2812
for (port = 0; port < hw->ptp.num_lports; port++) {
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
2915
for (port = 0; port < hw->ptp.num_lports; port++) {
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
2941
for (port = 0; port < hw->ptp.num_lports; port++) {
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
3874
for (port = 0; port < hw->ptp.num_lports; port++) {
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
392
tgt_phy = port >= hw->ptp.ports_per_phy;
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
393
curr_phy = hw->lane_num >= hw->ptp.ports_per_phy;
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
4240
static void ice_ptp_init_phy_e82x(struct ice_ptp_hw *ptp)
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
4242
ptp->num_lports = 8;
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
4243
ptp->ports_per_phy = 8;
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
4325
struct ice_e810_params *params = &hw->ptp.phy.e810;
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
4559
struct ice_e810_params *params = &hw->ptp.phy.e810;
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
4651
struct ice_e810_params *params = &hw->ptp.phy.e810;
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
485
lane %= hw->ptp.ports_per_phy;
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
4892
static void ice_ptp_init_phy_e810(struct ice_ptp_hw *ptp)
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
4894
ptp->num_lports = 8;
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
4895
ptp->ports_per_phy = 4;
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
4897
init_waitqueue_head(&ptp->phy.e810.atqbal_wq);
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
5016
static void ice_ptp_init_phy_e830(struct ice_ptp_hw *ptp)
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
5018
ptp->num_lports = 8;
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
5019
ptp->ports_per_phy = 4;
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
5086
struct ice_ptp_hw *ptp = &hw->ptp;
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
5090
ice_ptp_init_phy_e810(ptp);
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
5093
ice_ptp_init_phy_e830(ptp);
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
5096
ice_ptp_init_phy_e82x(ptp);
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
511
if (port >= hw->ptp.num_lports)
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
5153
for (port = 0; port < hw->ptp.num_lports; port++) {
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
5199
for (port = 0; port < hw->ptp.num_lports; port++) {
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
540
if (port >= hw->ptp.num_lports)
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
713
if (port >= hw->ptp.num_lports)
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
738
if (port >= hw->ptp.num_lports)
drivers/net/ethernet/intel/ice/ice_tspll.c
665
if (active_clk == port % hw->ptp.ports_per_phy +
drivers/net/ethernet/intel/ice/ice_txrx.c
2132
tx_ring->vsi->back->ptp.tx_hwtstamp_skipped++;
drivers/net/ethernet/intel/ice/ice_type.h
978
struct ice_ptp_hw ptp;
drivers/net/ethernet/intel/idpf/idpf.h
737
struct idpf_ptp *ptp;
drivers/net/ethernet/intel/idpf/idpf_dev.c
173
adapter->ptp->cmd.shtime_enable_mask = PF_GLTSYN_CMD_SYNC_SHTIME_EN_M;
drivers/net/ethernet/intel/idpf/idpf_dev.c
174
adapter->ptp->cmd.exec_cmd_mask = PF_GLTSYN_CMD_SYNC_EXEC_CMD_M;
drivers/net/ethernet/intel/idpf/idpf_ethtool.c
1696
vport->adapter->ptp->tx_tstamp_access == IDPF_PTP_NONE)
drivers/net/ethernet/intel/idpf/idpf_ethtool.c
1724
if (!vport->adapter->ptp) {
drivers/net/ethernet/intel/idpf/idpf_ethtool.c
1730
vport->adapter->ptp->clock) {
drivers/net/ethernet/intel/idpf/idpf_ethtool.c
1731
info->phc_index = ptp_clock_index(vport->adapter->ptp->clock);
drivers/net/ethernet/intel/idpf/idpf_ptp.c
1006
struct idpf_ptp *ptp = adapter->ptp;
drivers/net/ethernet/intel/idpf/idpf_ptp.c
1008
if (!ptp)
drivers/net/ethernet/intel/idpf/idpf_ptp.c
1011
if (ptp->tx_tstamp_access != IDPF_PTP_NONE &&
drivers/net/ethernet/intel/idpf/idpf_ptp.c
1012
ptp->get_dev_clk_time_access != IDPF_PTP_NONE)
drivers/net/ethernet/intel/idpf/idpf_ptp.c
1015
if (ptp->clock) {
drivers/net/ethernet/intel/idpf/idpf_ptp.c
1016
if (adapter->ptp->get_dev_clk_time_access != IDPF_PTP_NONE)
drivers/net/ethernet/intel/idpf/idpf_ptp.c
1017
ptp_cancel_worker_sync(adapter->ptp->clock);
drivers/net/ethernet/intel/idpf/idpf_ptp.c
1019
ptp_clock_unregister(ptp->clock);
drivers/net/ethernet/intel/idpf/idpf_ptp.c
102
struct idpf_ptp *ptp = adapter->ptp;
drivers/net/ethernet/intel/idpf/idpf_ptp.c
1022
kfree(ptp);
drivers/net/ethernet/intel/idpf/idpf_ptp.c
1023
adapter->ptp = NULL;
drivers/net/ethernet/intel/idpf/idpf_ptp.c
105
spin_lock(&ptp->read_dev_clk_lock);
drivers/net/ethernet/intel/idpf/idpf_ptp.c
111
lo = readl(ptp->dev_clk_regs.dev_clk_ns_l);
drivers/net/ethernet/intel/idpf/idpf_ptp.c
116
hi = readl(ptp->dev_clk_regs.dev_clk_ns_h);
drivers/net/ethernet/intel/idpf/idpf_ptp.c
118
spin_unlock(&ptp->read_dev_clk_lock);
drivers/net/ethernet/intel/idpf/idpf_ptp.c
166
switch (adapter->ptp->get_dev_clk_time_access) {
drivers/net/ethernet/intel/idpf/idpf_ptp.c
18
if (adapter->ptp->caps & direct)
drivers/net/ethernet/intel/idpf/idpf_ptp.c
193
struct idpf_ptp *ptp = adapter->ptp;
drivers/net/ethernet/intel/idpf/idpf_ptp.c
195
spin_lock(&ptp->read_dev_clk_lock);
drivers/net/ethernet/intel/idpf/idpf_ptp.c
199
dev_time_lo = readl(ptp->dev_clk_regs.dev_clk_ns_l);
drivers/net/ethernet/intel/idpf/idpf_ptp.c
20
else if (adapter->ptp->caps & mailbox)
drivers/net/ethernet/intel/idpf/idpf_ptp.c
200
dev_time_hi = readl(ptp->dev_clk_regs.dev_clk_ns_h);
drivers/net/ethernet/intel/idpf/idpf_ptp.c
202
sys_time_lo = readl(ptp->dev_clk_regs.sys_time_ns_l);
drivers/net/ethernet/intel/idpf/idpf_ptp.c
203
sys_time_hi = readl(ptp->dev_clk_regs.sys_time_ns_h);
drivers/net/ethernet/intel/idpf/idpf_ptp.c
205
spin_unlock(&ptp->read_dev_clk_lock);
drivers/net/ethernet/intel/idpf/idpf_ptp.c
254
switch (adapter->ptp->get_cross_tstamp_access) {
drivers/net/ethernet/intel/idpf/idpf_ptp.c
35
struct idpf_ptp *ptp = adapter->ptp;
drivers/net/ethernet/intel/idpf/idpf_ptp.c
383
WRITE_ONCE(adapter->ptp->cached_phc_time, systime);
drivers/net/ethernet/intel/idpf/idpf_ptp.c
384
WRITE_ONCE(adapter->ptp->cached_phc_jiffies, jiffies);
drivers/net/ethernet/intel/idpf/idpf_ptp.c
41
ptp->get_dev_clk_time_access = idpf_ptp_get_access(adapter,
drivers/net/ethernet/intel/idpf/idpf_ptp.c
424
access = adapter->ptp->set_dev_clk_time_access;
drivers/net/ethernet/intel/idpf/idpf_ptp.c
48
ptp->get_cross_tstamp_access = idpf_ptp_get_access(adapter,
drivers/net/ethernet/intel/idpf/idpf_ptp.c
480
access = adapter->ptp->adj_dev_clk_time_access;
drivers/net/ethernet/intel/idpf/idpf_ptp.c
523
access = adapter->ptp->adj_dev_clk_time_access;
drivers/net/ethernet/intel/idpf/idpf_ptp.c
527
incval = adapter->ptp->base_incval;
drivers/net/ethernet/intel/idpf/idpf_ptp.c
55
ptp->set_dev_clk_time_access = idpf_ptp_get_access(adapter,
drivers/net/ethernet/intel/idpf/idpf_ptp.c
618
struct idpf_ptp *ptp = vport->adapter->ptp;
drivers/net/ethernet/intel/idpf/idpf_ptp.c
62
ptp->adj_dev_clk_time_access = idpf_ptp_get_access(adapter,
drivers/net/ethernet/intel/idpf/idpf_ptp.c
621
discard_time = ptp->cached_phc_jiffies + 2 * HZ;
drivers/net/ethernet/intel/idpf/idpf_ptp.c
631
return idpf_ptp_tstamp_extend_32b_to_64b(ptp->cached_phc_time,
drivers/net/ethernet/intel/idpf/idpf_ptp.c
69
ptp->tx_tstamp_access = idpf_ptp_get_access(adapter,
drivers/net/ethernet/intel/idpf/idpf_ptp.c
786
struct ptp_clock_info *info = &adapter->ptp->info;
drivers/net/ethernet/intel/idpf/idpf_ptp.c
792
info->max_adj = adapter->ptp->max_adj;
drivers/net/ethernet/intel/idpf/idpf_ptp.c
825
clock = ptp_clock_register(&adapter->ptp->info,
drivers/net/ethernet/intel/idpf/idpf_ptp.c
83
shtime_enable = adapter->ptp->cmd.shtime_enable_mask;
drivers/net/ethernet/intel/idpf/idpf_ptp.c
833
adapter->ptp->clock = clock;
drivers/net/ethernet/intel/idpf/idpf_ptp.c
84
exec_cmd = adapter->ptp->cmd.exec_cmd_mask;
drivers/net/ethernet/intel/idpf/idpf_ptp.c
87
writel(shtime_enable, adapter->ptp->dev_clk_regs.cmd_sync);
drivers/net/ethernet/intel/idpf/idpf_ptp.c
88
writel(exec_cmd | shtime_enable, adapter->ptp->dev_clk_regs.cmd_sync);
drivers/net/ethernet/intel/idpf/idpf_ptp.c
939
adapter->ptp = kzalloc_obj(*adapter->ptp);
drivers/net/ethernet/intel/idpf/idpf_ptp.c
940
if (!adapter->ptp)
drivers/net/ethernet/intel/idpf/idpf_ptp.c
944
adapter->ptp->adapter = adapter;
drivers/net/ethernet/intel/idpf/idpf_ptp.c
959
if (adapter->ptp->get_dev_clk_time_access != IDPF_PTP_NONE)
drivers/net/ethernet/intel/idpf/idpf_ptp.c
960
ptp_schedule_worker(adapter->ptp->clock, 0);
drivers/net/ethernet/intel/idpf/idpf_ptp.c
965
if (adapter->ptp->adj_dev_clk_time_access != IDPF_PTP_NONE) {
drivers/net/ethernet/intel/idpf/idpf_ptp.c
967
adapter->ptp->base_incval);
drivers/net/ethernet/intel/idpf/idpf_ptp.c
973
if (adapter->ptp->set_dev_clk_time_access != IDPF_PTP_NONE) {
drivers/net/ethernet/intel/idpf/idpf_ptp.c
975
err = idpf_ptp_settime64(&adapter->ptp->info, &ts);
drivers/net/ethernet/intel/idpf/idpf_ptp.c
980
spin_lock_init(&adapter->ptp->read_dev_clk_lock);
drivers/net/ethernet/intel/idpf/idpf_ptp.c
987
if (adapter->ptp->get_dev_clk_time_access != IDPF_PTP_NONE)
drivers/net/ethernet/intel/idpf/idpf_ptp.c
988
ptp_cancel_worker_sync(adapter->ptp->clock);
drivers/net/ethernet/intel/idpf/idpf_ptp.c
990
ptp_clock_unregister(adapter->ptp->clock);
drivers/net/ethernet/intel/idpf/idpf_ptp.c
991
adapter->ptp->clock = NULL;
drivers/net/ethernet/intel/idpf/idpf_ptp.c
994
kfree(adapter->ptp);
drivers/net/ethernet/intel/idpf/idpf_ptp.c
995
adapter->ptp = NULL;
drivers/net/ethernet/intel/idpf/idpf_ptp.h
210
const struct idpf_ptp *ptp = container_of_const(info, struct idpf_ptp,
drivers/net/ethernet/intel/idpf/idpf_ptp.h
212
return ptp->adapter;
drivers/net/ethernet/intel/idpf/idpf_ptp.h
260
if (!vport->adapter->ptp ||
drivers/net/ethernet/intel/idpf/idpf_ptp.h
261
vport->adapter->ptp->get_dev_clk_time_access == IDPF_PTP_NONE)
drivers/net/ethernet/intel/idpf/idpf_virtchnl.c
196
if (!idpf_ptp_is_mb_msg(op) || !adapter->ptp->secondary_mbx.valid)
drivers/net/ethernet/intel/idpf/idpf_virtchnl.c
200
ctlq_msg->func_id = adapter->ptp->secondary_mbx.peer_mbx_q_id;
drivers/net/ethernet/intel/idpf/idpf_virtchnl.c
201
ctlq_msg->host_id = adapter->ptp->secondary_mbx.peer_id;
drivers/net/ethernet/intel/idpf/idpf_virtchnl_ptp.c
101
ptp->dev_clk_regs.sys_time_ns_l = idpf_get_reg_addr(adapter,
drivers/net/ethernet/intel/idpf/idpf_virtchnl_ptp.c
104
ptp->dev_clk_regs.sys_time_ns_h = idpf_get_reg_addr(adapter,
drivers/net/ethernet/intel/idpf/idpf_virtchnl_ptp.c
107
ptp->dev_clk_regs.cmd_sync = idpf_get_reg_addr(adapter, temp_offset);
drivers/net/ethernet/intel/idpf/idpf_virtchnl_ptp.c
110
access_type = ptp->adj_dev_clk_time_access;
drivers/net/ethernet/intel/idpf/idpf_virtchnl_ptp.c
118
ptp->dev_clk_regs.cmd = idpf_get_reg_addr(adapter, temp_offset);
drivers/net/ethernet/intel/idpf/idpf_virtchnl_ptp.c
120
ptp->dev_clk_regs.incval_l = idpf_get_reg_addr(adapter, temp_offset);
drivers/net/ethernet/intel/idpf/idpf_virtchnl_ptp.c
122
ptp->dev_clk_regs.incval_h = idpf_get_reg_addr(adapter, temp_offset);
drivers/net/ethernet/intel/idpf/idpf_virtchnl_ptp.c
124
ptp->dev_clk_regs.shadj_l = idpf_get_reg_addr(adapter, temp_offset);
drivers/net/ethernet/intel/idpf/idpf_virtchnl_ptp.c
126
ptp->dev_clk_regs.shadj_h = idpf_get_reg_addr(adapter, temp_offset);
drivers/net/ethernet/intel/idpf/idpf_virtchnl_ptp.c
130
ptp->dev_clk_regs.phy_cmd = idpf_get_reg_addr(adapter, temp_offset);
drivers/net/ethernet/intel/idpf/idpf_virtchnl_ptp.c
132
ptp->dev_clk_regs.phy_incval_l = idpf_get_reg_addr(adapter,
drivers/net/ethernet/intel/idpf/idpf_virtchnl_ptp.c
135
ptp->dev_clk_regs.phy_incval_h = idpf_get_reg_addr(adapter,
drivers/net/ethernet/intel/idpf/idpf_virtchnl_ptp.c
138
ptp->dev_clk_regs.phy_shadj_l = idpf_get_reg_addr(adapter, temp_offset);
drivers/net/ethernet/intel/idpf/idpf_virtchnl_ptp.c
140
ptp->dev_clk_regs.phy_shadj_h = idpf_get_reg_addr(adapter, temp_offset);
drivers/net/ethernet/intel/idpf/idpf_virtchnl_ptp.c
341
struct idpf_ptp *ptp = vport->adapter->ptp;
drivers/net/ethernet/intel/idpf/idpf_virtchnl_ptp.c
347
if (!ptp)
drivers/net/ethernet/intel/idpf/idpf_virtchnl_ptp.c
350
tstamp_access = ptp->tx_tstamp_access;
drivers/net/ethernet/intel/idpf/idpf_virtchnl_ptp.c
351
get_dev_clk_access = ptp->get_dev_clk_time_access;
drivers/net/ethernet/intel/idpf/idpf_virtchnl_ptp.c
37
struct idpf_ptp *ptp = adapter->ptp;
drivers/net/ethernet/intel/idpf/idpf_virtchnl_ptp.c
55
ptp->caps = le32_to_cpu(recv_ptp_caps_msg->caps);
drivers/net/ethernet/intel/idpf/idpf_virtchnl_ptp.c
56
ptp->base_incval = le64_to_cpu(recv_ptp_caps_msg->base_incval);
drivers/net/ethernet/intel/idpf/idpf_virtchnl_ptp.c
57
ptp->max_adj = le32_to_cpu(recv_ptp_caps_msg->max_adj);
drivers/net/ethernet/intel/idpf/idpf_virtchnl_ptp.c
59
scnd_mbx = &ptp->secondary_mbx;
drivers/net/ethernet/intel/idpf/idpf_virtchnl_ptp.c
72
access_type = ptp->get_dev_clk_time_access;
drivers/net/ethernet/intel/idpf/idpf_virtchnl_ptp.c
79
ptp->dev_clk_regs.dev_clk_ns_l = idpf_get_reg_addr(adapter,
drivers/net/ethernet/intel/idpf/idpf_virtchnl_ptp.c
82
ptp->dev_clk_regs.dev_clk_ns_h = idpf_get_reg_addr(adapter,
drivers/net/ethernet/intel/idpf/idpf_virtchnl_ptp.c
85
ptp->dev_clk_regs.phy_clk_ns_l = idpf_get_reg_addr(adapter,
drivers/net/ethernet/intel/idpf/idpf_virtchnl_ptp.c
88
ptp->dev_clk_regs.phy_clk_ns_h = idpf_get_reg_addr(adapter,
drivers/net/ethernet/intel/idpf/idpf_virtchnl_ptp.c
91
ptp->dev_clk_regs.cmd_sync = idpf_get_reg_addr(adapter, temp_offset);
drivers/net/ethernet/intel/idpf/idpf_virtchnl_ptp.c
94
access_type = ptp->get_cross_tstamp_access;
drivers/net/ethernet/intel/igb/igb_ptp.c
194
static int igb_ptp_adjfine_82576(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/net/ethernet/intel/igb/igb_ptp.c
196
struct igb_adapter *igb = container_of(ptp, struct igb_adapter,
drivers/net/ethernet/intel/igb/igb_ptp.c
208
static int igb_ptp_adjfine_82580(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/net/ethernet/intel/igb/igb_ptp.c
210
struct igb_adapter *igb = container_of(ptp, struct igb_adapter,
drivers/net/ethernet/intel/igb/igb_ptp.c
228
static int igb_ptp_adjtime_82576(struct ptp_clock_info *ptp, s64 delta)
drivers/net/ethernet/intel/igb/igb_ptp.c
230
struct igb_adapter *igb = container_of(ptp, struct igb_adapter,
drivers/net/ethernet/intel/igb/igb_ptp.c
241
static int igb_ptp_adjtime_i210(struct ptp_clock_info *ptp, s64 delta)
drivers/net/ethernet/intel/igb/igb_ptp.c
243
struct igb_adapter *igb = container_of(ptp, struct igb_adapter,
drivers/net/ethernet/intel/igb/igb_ptp.c
259
static int igb_ptp_gettimex_82576(struct ptp_clock_info *ptp,
drivers/net/ethernet/intel/igb/igb_ptp.c
263
struct igb_adapter *igb = container_of(ptp, struct igb_adapter,
drivers/net/ethernet/intel/igb/igb_ptp.c
286
static int igb_ptp_gettimex_82580(struct ptp_clock_info *ptp,
drivers/net/ethernet/intel/igb/igb_ptp.c
290
struct igb_adapter *igb = container_of(ptp, struct igb_adapter,
drivers/net/ethernet/intel/igb/igb_ptp.c
314
static int igb_ptp_gettimex_i210(struct ptp_clock_info *ptp,
drivers/net/ethernet/intel/igb/igb_ptp.c
318
struct igb_adapter *igb = container_of(ptp, struct igb_adapter,
drivers/net/ethernet/intel/igb/igb_ptp.c
336
static int igb_ptp_settime_82576(struct ptp_clock_info *ptp,
drivers/net/ethernet/intel/igb/igb_ptp.c
339
struct igb_adapter *igb = container_of(ptp, struct igb_adapter,
drivers/net/ethernet/intel/igb/igb_ptp.c
355
static int igb_ptp_settime_i210(struct ptp_clock_info *ptp,
drivers/net/ethernet/intel/igb/igb_ptp.c
358
struct igb_adapter *igb = container_of(ptp, struct igb_adapter,
drivers/net/ethernet/intel/igb/igb_ptp.c
489
static int igb_ptp_feature_enable_82580(struct ptp_clock_info *ptp,
drivers/net/ethernet/intel/igb/igb_ptp.c
493
container_of(ptp, struct igb_adapter, ptp_caps);
drivers/net/ethernet/intel/igb/igb_ptp.c
640
static int igb_ptp_feature_enable_i210(struct ptp_clock_info *ptp,
drivers/net/ethernet/intel/igb/igb_ptp.c
644
container_of(ptp, struct igb_adapter, ptp_caps);
drivers/net/ethernet/intel/igb/igb_ptp.c
779
static int igb_ptp_feature_enable(struct ptp_clock_info *ptp,
drivers/net/ethernet/intel/igb/igb_ptp.c
785
static int igb_ptp_verify_pin(struct ptp_clock_info *ptp, unsigned int pin,
drivers/net/ethernet/intel/igc/igc_ptp.c
1096
static int igc_ptp_getcrosststamp(struct ptp_clock_info *ptp,
drivers/net/ethernet/intel/igc/igc_ptp.c
1099
struct igc_adapter *adapter = container_of(ptp, struct igc_adapter,
drivers/net/ethernet/intel/igc/igc_ptp.c
1113
static int igc_ptp_getcyclesx64(struct ptp_clock_info *ptp,
drivers/net/ethernet/intel/igc/igc_ptp.c
1117
struct igc_adapter *igc = container_of(ptp, struct igc_adapter, ptp_caps);
drivers/net/ethernet/intel/igc/igc_ptp.c
112
static int igc_ptp_settime_i225(struct ptp_clock_info *ptp,
drivers/net/ethernet/intel/igc/igc_ptp.c
115
struct igc_adapter *igc = container_of(ptp, struct igc_adapter,
drivers/net/ethernet/intel/igc/igc_ptp.c
246
static int igc_ptp_feature_enable_i225(struct ptp_clock_info *ptp,
drivers/net/ethernet/intel/igc/igc_ptp.c
250
container_of(ptp, struct igc_adapter, ptp_caps);
drivers/net/ethernet/intel/igc/igc_ptp.c
407
static int igc_ptp_verify_pin(struct ptp_clock_info *ptp, unsigned int pin,
drivers/net/ethernet/intel/igc/igc_ptp.c
47
static int igc_ptp_adjfine_i225(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/net/ethernet/intel/igc/igc_ptp.c
49
struct igc_adapter *igc = container_of(ptp, struct igc_adapter,
drivers/net/ethernet/intel/igc/igc_ptp.c
73
static int igc_ptp_adjtime_i225(struct ptp_clock_info *ptp, s64 delta)
drivers/net/ethernet/intel/igc/igc_ptp.c
75
struct igc_adapter *igc = container_of(ptp, struct igc_adapter,
drivers/net/ethernet/intel/igc/igc_ptp.c
91
static int igc_ptp_gettimex64_i225(struct ptp_clock_info *ptp,
drivers/net/ethernet/intel/igc/igc_ptp.c
95
struct igc_adapter *igc = container_of(ptp, struct igc_adapter,
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
451
static int ixgbe_ptp_adjfine_82599(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
454
container_of(ptp, struct ixgbe_adapter, ptp_caps);
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
492
static int ixgbe_ptp_adjfine_X550(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
495
container_of(ptp, struct ixgbe_adapter, ptp_caps);
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
525
static int ixgbe_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
528
container_of(ptp, struct ixgbe_adapter, ptp_caps);
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
550
static int ixgbe_ptp_gettimex(struct ptp_clock_info *ptp,
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
555
container_of(ptp, struct ixgbe_adapter, ptp_caps);
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
604
static int ixgbe_ptp_settime(struct ptp_clock_info *ptp,
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
608
container_of(ptp, struct ixgbe_adapter, ptp_caps);
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
631
static int ixgbe_ptp_feature_enable(struct ptp_clock_info *ptp,
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
635
container_of(ptp, struct ixgbe_adapter, ptp_caps);
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
3411
void __iomem *ptp;
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
3414
ptp = port->priv->iface_base + MVPP22_PTP_BASE(port->gop_id);
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
3415
val = readl(ptp + MVPP22_PTP_INT_CAUSE);
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
5181
void __iomem *ptp;
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
5191
ptp = port->priv->iface_base + MVPP22_PTP_BASE(port->gop_id);
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
5210
mvpp2_modify(ptp + MVPP22_PTP_GCR,
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
5217
mvpp2_modify(ptp + MVPP22_PTP_GCR,
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
5223
mvpp2_modify(ptp + MVPP22_PTP_INT_MASK,
drivers/net/ethernet/marvell/mvpp2/mvpp2_tai.c
164
static int mvpp22_tai_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/net/ethernet/marvell/mvpp2/mvpp2_tai.c
166
struct mvpp2_tai *tai = ptp_to_tai(ptp);
drivers/net/ethernet/marvell/mvpp2/mvpp2_tai.c
205
static int mvpp22_tai_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/net/ethernet/marvell/mvpp2/mvpp2_tai.c
207
struct mvpp2_tai *tai = ptp_to_tai(ptp);
drivers/net/ethernet/marvell/mvpp2/mvpp2_tai.c
235
static int mvpp22_tai_gettimex64(struct ptp_clock_info *ptp,
drivers/net/ethernet/marvell/mvpp2/mvpp2_tai.c
239
struct mvpp2_tai *tai = ptp_to_tai(ptp);
drivers/net/ethernet/marvell/mvpp2/mvpp2_tai.c
276
static int mvpp22_tai_settime64(struct ptp_clock_info *ptp,
drivers/net/ethernet/marvell/mvpp2/mvpp2_tai.c
279
struct mvpp2_tai *tai = ptp_to_tai(ptp);
drivers/net/ethernet/marvell/mvpp2/mvpp2_tai.c
302
static long mvpp22_tai_aux_work(struct ptp_clock_info *ptp)
drivers/net/ethernet/marvell/mvpp2/mvpp2_tai.c
304
struct mvpp2_tai *tai = ptp_to_tai(ptp);
drivers/net/ethernet/marvell/mvpp2/mvpp2_tai.c
306
mvpp22_tai_gettimex64(ptp, &tai->stamp, NULL);
drivers/net/ethernet/marvell/mvpp2/mvpp2_tai.c
85
static struct mvpp2_tai *ptp_to_tai(struct ptp_clock_info *ptp)
drivers/net/ethernet/marvell/mvpp2/mvpp2_tai.c
87
return container_of(ptp, struct mvpp2_tai, caps);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
101
struct ptp *ptp = rvu->ptp;
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
109
if ((is_ptp_dev_cn10ka(ptp) || is_ptp_dev_cnf10ka(ptp)) &&
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
110
(is_rev_A0(ptp) || is_rev_A1(ptp)))
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
118
struct ptp *ptp = container_of(hrtimer, struct ptp, hrtimer);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
124
delta_ns = ktime_to_ns(ktime_sub(curr_ts, ptp->last_ts));
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
130
ptp_clock_hi = readq(ptp->reg_base + PTP_CLOCK_HI);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
134
writeq(500000000, ptp->reg_base + PTP_PPS_THRESH_HI);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
139
ptp->last_ts = curr_ts;
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
144
static void ptp_hrtimer_start(struct ptp *ptp, ktime_t start_ns)
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
149
hrtimer_start(&ptp->hrtimer, period_ns, HRTIMER_MODE_REL);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
150
ptp->last_ts = ktime_get();
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
153
static u64 read_ptp_tstmp_sec_nsec(struct ptp *ptp)
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
158
spin_lock_irqsave(&ptp->ptp_lock, flags);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
159
sec = readq(ptp->reg_base + PTP_CLOCK_SEC) & 0xFFFFFFFFUL;
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
160
nsec = readq(ptp->reg_base + PTP_CLOCK_HI);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
161
sec1 = readq(ptp->reg_base + PTP_CLOCK_SEC) & 0xFFFFFFFFUL;
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
164
nsec = readq(ptp->reg_base + PTP_CLOCK_HI);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
167
spin_unlock_irqrestore(&ptp->ptp_lock, flags);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
172
static u64 read_ptp_tstmp_nsec(struct ptp *ptp)
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
174
return readq(ptp->reg_base + PTP_CLOCK_HI);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
229
struct ptp *ptp_get(void)
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
231
struct ptp *ptp = first_ptp_block;
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
237
if (!ptp)
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
238
ptp = ERR_PTR(-EPROBE_DEFER);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
239
else if (!IS_ERR(ptp))
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
240
pci_dev_get(ptp->pdev);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
242
return ptp;
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
245
void ptp_put(struct ptp *ptp)
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
247
if (!ptp)
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
250
pci_dev_put(ptp->pdev);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
253
static void ptp_atomic_update(struct ptp *ptp, u64 timestamp)
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
258
writeq(timestamp, ptp->reg_base + PTP_NANO_TIMESTAMP);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
259
writeq(0, ptp->reg_base + PTP_FRNS_TIMESTAMP);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
261
ptp->reg_base + PTP_SEC_TIMESTAMP);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
265
writeq(nxt_rollover_set, ptp->reg_base + PTP_NXT_ROLLOVER_SET);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
266
writeq(curr_rollover_set, ptp->reg_base + PTP_CURR_ROLLOVER_SET);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
269
regval = readq(ptp->reg_base + PTP_CLOCK_CFG);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
272
writeq(regval, ptp->reg_base + PTP_CLOCK_CFG);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
275
static void ptp_atomic_adjtime(struct ptp *ptp, s64 delta)
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
290
ptp_clock_hi = readq(ptp->reg_base + PTP_CLOCK_HI);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
299
ptp_atomic_update(ptp, ptp_clock_hi);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
301
writeq(delta, ptp->reg_base + PTP_NANO_TIMESTAMP);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
302
writeq(0, ptp->reg_base + PTP_FRNS_TIMESTAMP);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
305
regval = readq(ptp->reg_base + PTP_CLOCK_CFG);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
308
writeq(regval, ptp->reg_base + PTP_CLOCK_CFG);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
312
static int ptp_adjfine(struct ptp *ptp, long scaled_ppm)
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
343
if (cn10k_ptp_errata(ptp)) {
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
345
freq_adj = (ptp->clock_rate * ppb) / 1000000000ULL;
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
346
freq = neg_adj ? ptp->clock_rate + freq_adj : ptp->clock_rate - freq_adj;
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
349
comp = ((u64)1000000000ull << 32) / ptp->clock_rate;
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
354
writeq(comp, ptp->reg_base + PTP_CLOCK_COMP);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
359
static int ptp_get_clock(struct ptp *ptp, u64 *clk)
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
362
*clk = ptp->read_ptp_tstmp(ptp);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
369
struct ptp *ptp = rvu->ptp;
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
374
if (!ptp)
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
377
pdev = ptp->pdev;
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
385
ptp->clock_rate = sclk * 1000000;
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
389
writeq(0, ptp->reg_base + PTP_NANO_TIMESTAMP);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
390
writeq(0, ptp->reg_base + PTP_FRNS_TIMESTAMP);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
391
writeq(0, ptp->reg_base + PTP_SEC_TIMESTAMP);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
392
writeq(0, ptp->reg_base + PTP_CURR_ROLLOVER_SET);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
393
writeq(0x3b9aca00, ptp->reg_base + PTP_NXT_ROLLOVER_SET);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
394
writeq(0x3b9aca00, ptp->reg_base + PTP_SEC_ROLLOVER);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
398
clock_cfg = readq(ptp->reg_base + PTP_CLOCK_CFG);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
401
ptp->clock_rate = ext_clk_freq;
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
415
writeq(clock_cfg, ptp->reg_base + PTP_CLOCK_CFG);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
416
clock_cfg = readq(ptp->reg_base + PTP_CLOCK_CFG);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
419
writeq(clock_cfg, ptp->reg_base + PTP_CLOCK_CFG);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
421
if (cn10k_ptp_errata(ptp))
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
422
clock_comp = ptp_calc_adjusted_comp(ptp->clock_rate);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
424
clock_comp = ((u64)1000000000ull << 32) / ptp->clock_rate;
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
427
writeq(clock_comp, ptp->reg_base + PTP_CLOCK_COMP);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
430
static int ptp_get_tstmp(struct ptp *ptp, u64 *clk)
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
434
if (is_ptp_dev_cn10ka(ptp) || is_ptp_dev_cnf10ka(ptp)) {
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
435
timestamp = readq(ptp->reg_base + PTP_TIMESTAMP);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
438
*clk = readq(ptp->reg_base + PTP_TIMESTAMP);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
444
static int ptp_set_thresh(struct ptp *ptp, u64 thresh)
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
446
if (!cn10k_ptp_errata(ptp))
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
447
writeq(thresh, ptp->reg_base + PTP_PPS_THRESH_HI);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
452
static int ptp_config_hrtimer(struct ptp *ptp, int on)
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
457
ptp_clock_hi = readq(ptp->reg_base + PTP_CLOCK_HI);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
458
ptp_hrtimer_start(ptp, (ktime_t)ptp_clock_hi);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
460
if (hrtimer_active(&ptp->hrtimer))
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
461
hrtimer_cancel(&ptp->hrtimer);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
467
static int ptp_pps_on(struct ptp *ptp, int on, u64 period)
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
471
clock_cfg = readq(ptp->reg_base + PTP_CLOCK_CFG);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
473
if (cn10k_ptp_errata(ptp) && period != NSEC_PER_SEC) {
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
474
dev_err(&ptp->pdev->dev, "Supports max period value as 1 second\n");
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
479
dev_err(&ptp->pdev->dev, "Supports max period as 8 seconds\n");
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
484
writeq(clock_cfg, ptp->reg_base + PTP_CLOCK_CFG);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
486
writeq(0, ptp->reg_base + PTP_PPS_THRESH_HI);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
487
writeq(0, ptp->reg_base + PTP_PPS_THRESH_LO);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
491
writeq(((u64)period << 32), ptp->reg_base + PTP_PPS_HI_INCR);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
492
writeq(((u64)period << 32), ptp->reg_base + PTP_PPS_LO_INCR);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
495
writeq(clock_cfg, ptp->reg_base + PTP_CLOCK_CFG);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
498
if (on && cn10k_ptp_errata(ptp)) {
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
506
ptp->clock_period = NSEC_PER_SEC / ptp->clock_rate;
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
507
writeq((0x1dcd6500ULL - ptp->clock_period) << 32,
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
508
ptp->reg_base + PTP_PPS_LO_INCR);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
511
if (cn10k_ptp_errata(ptp))
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
512
ptp_config_hrtimer(ptp, on);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
520
struct ptp *ptp;
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
523
ptp = kzalloc_obj(*ptp);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
524
if (!ptp) {
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
529
ptp->pdev = pdev;
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
539
ptp->reg_base = pcim_iomap_table(pdev)[PCI_PTP_BAR_NO];
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
541
pci_set_drvdata(pdev, ptp);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
543
first_ptp_block = ptp;
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
545
spin_lock_init(&ptp->ptp_lock);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
546
if (cn10k_ptp_errata(ptp)) {
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
547
ptp->read_ptp_tstmp = &read_ptp_tstmp_sec_nsec;
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
548
hrtimer_setup(&ptp->hrtimer, ptp_reset_thresh, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
550
ptp->read_ptp_tstmp = &read_ptp_tstmp_nsec;
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
556
kfree(ptp);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
573
struct ptp *ptp = pci_get_drvdata(pdev);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
576
if (IS_ERR_OR_NULL(ptp))
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
579
if (cn10k_ptp_errata(ptp) && hrtimer_active(&ptp->hrtimer))
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
580
hrtimer_cancel(&ptp->hrtimer);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
583
clock_cfg = readq(ptp->reg_base + PTP_CLOCK_CFG);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
585
writeq(clock_cfg, ptp->reg_base + PTP_CLOCK_CFG);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
586
kfree(ptp);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
631
if (!rvu->ptp)
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
636
err = ptp_adjfine(rvu->ptp, req->scaled_ppm);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
639
err = ptp_get_clock(rvu->ptp, &rsp->clk);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
642
err = ptp_get_tstmp(rvu->ptp, &rsp->clk);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
645
err = ptp_set_thresh(rvu->ptp, req->thresh);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
648
err = ptp_pps_on(rvu->ptp, req->pps_on, req->period);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
651
ptp_atomic_adjtime(rvu->ptp, req->delta);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
654
ptp_atomic_update(rvu->ptp, (u64)req->clk);
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
667
if (!rvu->ptp)
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
67
#define is_rev_A0(ptp) (((ptp)->pdev->revision & 0x0F) == 0x0)
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
68
#define is_rev_A1(ptp) (((ptp)->pdev->revision & 0x0F) == 0x1)
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
77
static struct ptp *first_ptp_block;
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
80
static bool is_ptp_dev_cnf10ka(struct ptp *ptp)
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
82
return ptp->pdev->subsystem_device == PCI_SUBSYS_DEVID_CNF10K_A_PTP;
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
85
static bool is_ptp_dev_cn10ka(struct ptp *ptp)
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
87
return ptp->pdev->subsystem_device == PCI_SUBSYS_DEVID_CN10K_A_PTP;
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
90
static bool cn10k_ptp_errata(struct ptp *ptp)
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
92
if ((is_ptp_dev_cn10ka(ptp) || is_ptp_dev_cnf10ka(ptp)) &&
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
93
(is_rev_A0(ptp) || is_rev_A1(ptp)))
drivers/net/ethernet/marvell/octeontx2/af/ptp.h
18
u64 (*read_ptp_tstmp)(struct ptp *ptp);
drivers/net/ethernet/marvell/octeontx2/af/ptp.h
27
struct ptp *ptp_get(void);
drivers/net/ethernet/marvell/octeontx2/af/ptp.h
28
void ptp_put(struct ptp *ptp);
drivers/net/ethernet/marvell/octeontx2/af/rvu.c
3499
rvu->ptp = ptp_get();
drivers/net/ethernet/marvell/octeontx2/af/rvu.c
3500
if (IS_ERR(rvu->ptp)) {
drivers/net/ethernet/marvell/octeontx2/af/rvu.c
3501
err = PTR_ERR(rvu->ptp);
drivers/net/ethernet/marvell/octeontx2/af/rvu.c
3504
rvu->ptp = NULL;
drivers/net/ethernet/marvell/octeontx2/af/rvu.c
3595
ptp_put(rvu->ptp);
drivers/net/ethernet/marvell/octeontx2/af/rvu.c
3623
ptp_put(rvu->ptp);
drivers/net/ethernet/marvell/octeontx2/af/rvu.h
544
struct ptp;
drivers/net/ethernet/marvell/octeontx2/af/rvu.h
637
struct ptp *ptp;
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
1012
if (pfvf->ptp && qidx < pfvf->hw.tx_queues) {
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h
535
struct otx2_ptp *ptp;
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
981
if (!pfvf->ptp)
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
2462
if (!pfvf->ptp)
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
2470
cancel_delayed_work(&pfvf->ptp->synctstamp_work);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
2480
schedule_delayed_work(&pfvf->ptp->synctstamp_work,
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
102
struct otx2_ptp *ptp = container_of(ptp_info, struct otx2_ptp,
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
106
tstamp = otx2_ptp_get_clock(ptp);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
115
struct otx2_ptp *ptp = container_of(ptp_info, struct otx2_ptp,
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
117
struct otx2_nic *pfvf = ptp->nic;
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
122
if (!ptp->nic)
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
128
req = otx2_mbox_alloc_msg_ptp_op(&ptp->nic->mbox);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
13
static bool is_tstmp_atomic_update_supported(struct otx2_ptp *ptp)
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
136
rc = otx2_sync_mbox_msg(&ptp->nic->mbox);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
144
struct otx2_ptp *ptp = container_of(ptp_info, struct otx2_ptp,
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
148
if (!ptp->nic)
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
151
req = otx2_mbox_alloc_msg_ptp_op(&ptp->nic->mbox);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
158
return otx2_sync_mbox_msg(&ptp->nic->mbox);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
161
static int ptp_set_thresh(struct otx2_ptp *ptp, u64 thresh)
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
165
if (!ptp->nic)
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
168
req = otx2_mbox_alloc_msg_ptp_op(&ptp->nic->mbox);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
175
return otx2_sync_mbox_msg(&ptp->nic->mbox);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
178
static int ptp_pps_on(struct otx2_ptp *ptp, int on, u64 period)
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
182
if (!ptp->nic)
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
185
req = otx2_mbox_alloc_msg_ptp_op(&ptp->nic->mbox);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
19
if (!ptp->nic)
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
193
return otx2_sync_mbox_msg(&ptp->nic->mbox);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
198
struct otx2_ptp *ptp = container_of(cc, struct otx2_ptp, cycle_counter);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
200
return otx2_ptp_get_clock(ptp);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
203
static u64 ptp_tstmp_read(struct otx2_ptp *ptp)
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
209
if (!ptp->nic)
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
212
req = otx2_mbox_alloc_msg_ptp_op(&ptp->nic->mbox);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
218
err = otx2_sync_mbox_msg(&ptp->nic->mbox);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
22
mutex_lock(&ptp->nic->mbox.lock);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
222
rsp = (struct ptp_rsp *)otx2_mbox_get_rsp(&ptp->nic->mbox.mbox, 0,
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
23
req = otx2_mbox_alloc_msg_ptp_get_cap(&ptp->nic->mbox);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
232
struct otx2_ptp *ptp = container_of(ptp_info, struct otx2_ptp,
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
234
struct otx2_nic *pfvf = ptp->nic;
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
237
timecounter_adjtime(&ptp->time_counter, delta);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
246
struct otx2_ptp *ptp = container_of(ptp_info, struct otx2_ptp,
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
25
mutex_unlock(&ptp->nic->mbox.lock);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
250
mutex_lock(&ptp->nic->mbox.lock);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
251
tstamp = timecounter_read(&ptp->time_counter);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
252
mutex_unlock(&ptp->nic->mbox.lock);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
261
struct otx2_ptp *ptp = container_of(ptp_info, struct otx2_ptp,
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
267
mutex_lock(&ptp->nic->mbox.lock);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
268
timecounter_init(&ptp->time_counter, &ptp->cycle_counter, nsec);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
269
mutex_unlock(&ptp->nic->mbox.lock);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
274
static int otx2_ptp_verify_pin(struct ptp_clock_info *ptp, unsigned int pin,
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
29
err = otx2_sync_mbox_msg(&ptp->nic->mbox);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
296
struct otx2_ptp *ptp = container_of(work, struct otx2_ptp,
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
301
mutex_lock(&ptp->nic->mbox.lock);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
302
tstmp = ptp_tstmp_read(ptp);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
303
mutex_unlock(&ptp->nic->mbox.lock);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
305
if (tstmp != ptp->last_extts) {
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
308
event.timestamp = ptp->ptp_tstamp2nsec(&ptp->time_counter, tstmp);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
309
ptp_clock_event(ptp->ptp_clock, &event);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
31
mutex_unlock(&ptp->nic->mbox.lock);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
311
if (ptp->thresh != new_thresh) {
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
312
mutex_lock(&ptp->nic->mbox.lock);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
313
ptp_set_thresh(ptp, new_thresh);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
314
mutex_unlock(&ptp->nic->mbox.lock);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
315
ptp->thresh = new_thresh;
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
317
ptp->last_extts = tstmp;
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
319
schedule_delayed_work(&ptp->extts_work, msecs_to_jiffies(200));
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
324
struct otx2_ptp *ptp = container_of(work, struct otx2_ptp,
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
326
struct otx2_nic *pfvf = ptp->nic;
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
330
tstamp = otx2_ptp_get_clock(ptp);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
333
ptp->tstamp = ptp->ptp_tstamp2nsec(&ptp->time_counter, tstamp);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
334
ptp->base_ns = tstamp % NSEC_PER_SEC;
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
336
schedule_delayed_work(&ptp->synctstamp_work, msecs_to_jiffies(250));
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
34
rsp = (struct ptp_get_cap_rsp *)otx2_mbox_get_rsp(&ptp->nic->mbox.mbox, 0,
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
342
struct otx2_ptp *ptp = container_of(ptp_info, struct otx2_ptp,
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
347
if (!ptp->nic)
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
352
pin = ptp_find_pin(ptp->ptp_clock, PTP_PF_EXTTS,
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
357
schedule_delayed_work(&ptp->extts_work, msecs_to_jiffies(200));
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
359
cancel_delayed_work_sync(&ptp->extts_work);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
36
mutex_unlock(&ptp->nic->mbox.lock);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
371
ptp_pps_on(ptp, on, period);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
373
ptp_pps_on(ptp, on, period);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
390
pfvf->ptp = NULL;
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
480
pfvf->ptp = ptp_ptr;
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
489
struct otx2_ptp *ptp = pfvf->ptp;
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
49
struct otx2_ptp *ptp = container_of(ptp_info, struct otx2_ptp,
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
491
if (!ptp)
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
494
cancel_delayed_work_sync(&pfvf->ptp->synctstamp_work);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
496
ptp_clock_unregister(ptp->ptp_clock);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
497
kfree(ptp);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
498
pfvf->ptp = NULL;
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
504
if (!pfvf->ptp)
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
507
return ptp_clock_index(pfvf->ptp->ptp_clock);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
51
struct otx2_nic *pfvf = ptp->nic;
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
513
if (!pfvf->ptp)
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
516
*tsns = pfvf->ptp->ptp_tstamp2nsec(&pfvf->ptp->time_counter, tstamp);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
55
if (!ptp->nic)
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
59
req = otx2_mbox_alloc_msg_ptp_op(&ptp->nic->mbox);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
66
rc = otx2_sync_mbox_msg(&ptp->nic->mbox);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
72
static u64 otx2_ptp_get_clock(struct otx2_ptp *ptp)
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
78
if (!ptp->nic)
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
81
req = otx2_mbox_alloc_msg_ptp_op(&ptp->nic->mbox);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
87
err = otx2_sync_mbox_msg(&ptp->nic->mbox);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
91
rsp = (struct ptp_rsp *)otx2_mbox_get_rsp(&ptp->nic->mbox.mbox, 0,
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
1145
ts = ns_to_timespec64(pfvf->ptp->tstamp);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
1183
ptp_offset, pfvf->ptp->base_ns, udp_csum_crt);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
151
timestamp = pfvf->ptp->convert_tx_ptp_tstmp(timestamp);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
177
timestamp = pfvf->ptp->convert_rx_ptp_tstmp(*(u64 *)data);
drivers/net/ethernet/mellanox/mlx4/en_clock.c
128
static int mlx4_en_phc_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/net/ethernet/mellanox/mlx4/en_clock.c
132
struct mlx4_en_dev *mdev = container_of(ptp, struct mlx4_en_dev,
drivers/net/ethernet/mellanox/mlx4/en_clock.c
152
static int mlx4_en_phc_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/net/ethernet/mellanox/mlx4/en_clock.c
154
struct mlx4_en_dev *mdev = container_of(ptp, struct mlx4_en_dev,
drivers/net/ethernet/mellanox/mlx4/en_clock.c
173
static int mlx4_en_phc_gettime(struct ptp_clock_info *ptp,
drivers/net/ethernet/mellanox/mlx4/en_clock.c
176
struct mlx4_en_dev *mdev = container_of(ptp, struct mlx4_en_dev,
drivers/net/ethernet/mellanox/mlx4/en_clock.c
198
static int mlx4_en_phc_settime(struct ptp_clock_info *ptp,
drivers/net/ethernet/mellanox/mlx4/en_clock.c
201
struct mlx4_en_dev *mdev = container_of(ptp, struct mlx4_en_dev,
drivers/net/ethernet/mellanox/mlx4/en_clock.c
223
static int mlx4_en_phc_enable(struct ptp_clock_info __always_unused *ptp,
drivers/net/ethernet/mellanox/mlx5/core/en.h
824
struct mlx5e_ptp *ptp;
drivers/net/ethernet/mellanox/mlx5/core/en/channels.c
51
struct mlx5e_ptp *c = chs->ptp;
drivers/net/ethernet/mellanox/mlx5/core/en/ptp.c
1013
struct mlx5e_ptp *c = priv->channels.ptp;
drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c
344
struct mlx5e_ptp *ptp_ch = priv->channels.ptp;
drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c
453
struct mlx5e_ptp *ptp_ch = priv->channels.ptp;
drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c
565
struct mlx5e_ptp *ptp_ch = priv->channels.ptp;
drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c
228
mlx5e_ptp_close(chs->ptp);
drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c
229
err = mlx5e_ptp_open(priv, &chs->params, chs->c[0]->lag_port, &chs->ptp);
drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c
340
struct mlx5e_ptp *ptp_ch = priv->channels.ptp;
drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c
387
struct mlx5e_ptp *ptp_ch = priv->channels.ptp;
drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c
479
struct mlx5e_ptp *ptp_ch = priv->channels.ptp;
drivers/net/ethernet/mellanox/mlx5/core/en/rx_res.c
31
} ptp;
drivers/net/ethernet/mellanox/mlx5/core/en/rx_res.c
427
err = mlx5e_rqt_init_direct(&res->ptp.rqt, res->mdev, false, res->drop_rqn,
drivers/net/ethernet/mellanox/mlx5/core/en/rx_res.c
434
mlx5e_rqt_get_rqtn(&res->ptp.rqt),
drivers/net/ethernet/mellanox/mlx5/core/en/rx_res.c
438
err = mlx5e_tir_init(&res->ptp.tir, builder, res->mdev, true);
drivers/net/ethernet/mellanox/mlx5/core/en/rx_res.c
445
mlx5e_rqt_destroy(&res->ptp.rqt);
drivers/net/ethernet/mellanox/mlx5/core/en/rx_res.c
466
mlx5e_tir_destroy(&res->ptp.tir);
drivers/net/ethernet/mellanox/mlx5/core/en/rx_res.c
467
mlx5e_rqt_destroy(&res->ptp.rqt);
drivers/net/ethernet/mellanox/mlx5/core/en/rx_res.c
550
return mlx5e_tir_get_tirn(&res->ptp.tir);
drivers/net/ethernet/mellanox/mlx5/core/en/rx_res.c
613
err = mlx5e_rqt_redirect_direct(&res->ptp.rqt, rqn, NULL);
drivers/net/ethernet/mellanox/mlx5/core/en/rx_res.c
616
mlx5e_rqt_get_rqtn(&res->ptp.rqt),
drivers/net/ethernet/mellanox/mlx5/core/en/rx_res.c
632
err = mlx5e_rqt_redirect_direct(&res->ptp.rqt, res->drop_rqn, NULL);
drivers/net/ethernet/mellanox/mlx5/core/en/rx_res.c
635
mlx5e_rqt_get_rqtn(&res->ptp.rqt),
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
2930
err = mlx5e_ptp_open(priv, &chs->params, chs->c[0]->lag_port, &chs->ptp);
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
2945
if (chs->ptp)
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
2946
mlx5e_ptp_close(chs->ptp);
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
2971
if (chs->ptp)
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
2972
mlx5e_ptp_activate_channel(chs->ptp);
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
3001
if (chs->ptp)
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
3002
mlx5e_ptp_deactivate_channel(chs->ptp);
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
3013
if (chs->ptp) {
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
3014
mlx5e_ptp_close(chs->ptp);
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
3015
chs->ptp = NULL;
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
3264
if (!priv->channels.ptp)
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
3267
if (!test_bit(MLX5E_PTP_STATE_TX, priv->channels.ptp->state))
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
3271
struct mlx5e_ptp *c = priv->channels.ptp;
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
3687
if (chs->ptp && test_bit(MLX5E_PTP_STATE_RX, chs->ptp->state))
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
3688
return mlx5e_modify_rq_vsd(&chs->ptp->rq, vsd);
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
3804
ptp_channel = priv->channels.ptp;
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
5533
ptp_channel = priv->channels.ptp;
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
1416
&MLX5E_STATS_GRP(ptp),
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
583
ptp_sq = !!(priv->channels.ptp &&
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
610
struct mlx5e_ptp *ptp_ch = priv->channels.ptp;
drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
1177
struct mlx5e_ptp *ptp = priv->channels.ptp;
drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
1183
if (!ptp)
drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
1187
for (i = 0; i < ptp->num_tc; i++) {
drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
1189
ptp->ptpsq[i].cq_stats;
drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
2504
static MLX5E_DECLARE_STATS_GRP_OP_NUM_STATS(ptp)
drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
2519
static MLX5E_DECLARE_STATS_GRP_OP_FILL_STRS(ptp)
drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
2548
static MLX5E_DECLARE_STATS_GRP_OP_FILL_STATS(ptp)
drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
2584
static MLX5E_DECLARE_STATS_GRP_OP_UPDATE_STATS(ptp) { return; }
drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
2703
MLX5E_DEFINE_STATS_GRP(ptp, 0);
drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
2727
&MLX5E_STATS_GRP(ptp),
drivers/net/ethernet/mellanox/mlx5/core/en_stats.h
537
extern MLX5E_DECLARE_STATS_GRP(ptp);
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
1005
static int mlx5_ptp_verify(struct ptp_clock_info *ptp, unsigned int pin,
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
1008
struct mlx5_clock *clock = container_of(ptp, struct mlx5_clock,
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
1189
ptp_clock_event(clock->ptp, &ptp_event);
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
1364
clock->ptp = ptp_clock_register(&clock->ptp_info,
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
1366
if (IS_ERR(clock->ptp)) {
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
1369
clock->ptp);
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
1370
clock->ptp = NULL;
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
1373
if (clock->ptp)
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
1374
ptp_schedule_worker(clock->ptp, 0);
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
1381
if (clock->ptp) {
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
1382
ptp_clock_unregister(clock->ptp);
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
1383
clock->ptp = NULL;
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
1425
if (!clock->ptp) {
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
197
static s32 mlx5_ptp_getmaxphase(struct ptp_clock_info *ptp)
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
199
struct mlx5_clock *clock = container_of(ptp, struct mlx5_clock, ptp_info);
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
326
static int mlx5_ptp_getcrosststamp(struct ptp_clock_info *ptp,
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
329
struct mlx5_clock *clock = container_of(ptp, struct mlx5_clock, ptp_info);
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
351
static int mlx5_ptp_getcrosscycles(struct ptp_clock_info *ptp,
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
355
container_of(ptp, struct mlx5_clock, ptp_info);
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
526
static int mlx5_ptp_settime(struct ptp_clock_info *ptp, const struct timespec64 *ts)
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
528
struct mlx5_clock *clock = container_of(ptp, struct mlx5_clock, ptp_info);
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
552
static int mlx5_ptp_gettimex(struct ptp_clock_info *ptp, struct timespec64 *ts,
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
555
struct mlx5_clock *clock = container_of(ptp, struct mlx5_clock, ptp_info);
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
574
static int mlx5_ptp_getcyclesx(struct ptp_clock_info *ptp,
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
578
struct mlx5_clock *clock = container_of(ptp, struct mlx5_clock,
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
613
static int mlx5_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
615
struct mlx5_clock *clock = container_of(ptp, struct mlx5_clock, ptp_info);
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
641
static int mlx5_ptp_adjphase(struct ptp_clock_info *ptp, s32 delta)
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
643
struct mlx5_clock *clock = container_of(ptp, struct mlx5_clock, ptp_info);
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
675
static int mlx5_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
677
struct mlx5_clock *clock = container_of(ptp, struct mlx5_clock, ptp_info);
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
701
ptp_schedule_worker(clock->ptp, timer->overflow_period);
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
708
static int mlx5_extts_configure(struct ptp_clock_info *ptp,
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
713
container_of(ptp, struct mlx5_clock, ptp_info);
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
731
pin = ptp_find_pin(clock->ptp, PTP_PF_EXTTS, rq->extts.index);
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
892
static int mlx5_perout_configure(struct ptp_clock_info *ptp,
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
897
container_of(ptp, struct mlx5_clock, ptp_info);
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
914
pin = ptp_find_pin(clock->ptp, PTP_PF_PEROUT, rq->perout.index);
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
972
static int mlx5_pps_configure(struct ptp_clock_info *ptp,
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
977
container_of(ptp, struct mlx5_clock, ptp_info);
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
983
static int mlx5_ptp_enable(struct ptp_clock_info *ptp,
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
989
return mlx5_extts_configure(ptp, rq, on);
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
991
return mlx5_perout_configure(ptp, rq, on);
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
993
return mlx5_pps_configure(ptp, rq, on);
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.h
57
struct ptp_clock *ptp;
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.h
92
return mdev->clock->ptp ? ptp_clock_index(mdev->clock->ptp) : -1;
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
1680
INIT_DELAYED_WORK(&mlxsw_sp_port->ptp.shaper_dw,
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
1753
cancel_delayed_work_sync(&mlxsw_sp_port->ptp.shaper_dw);
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
2249
mlxsw_core_schedule_dw(&mlxsw_sp_port->ptp.shaper_dw, 0);
drivers/net/ethernet/mellanox/mlxsw/spectrum.h
359
} ptp;
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
107
mlxsw_sp1_ptp_clock(struct ptp_clock_info *ptp)
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
1088
*config = mlxsw_sp_port->ptp.hwtstamp_config;
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
109
return container_of(ptp, struct mlxsw_sp1_ptp_clock, common.ptp_info);
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
1170
orig_ing_types |= tmp->ptp.ing_types;
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
1171
orig_egr_types |= tmp->ptp.egr_types;
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
1174
ing_types |= tmp->ptp.ing_types;
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
1175
egr_types |= tmp->ptp.egr_types;
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
1195
return mlxsw_sp_port->ptp.ing_types || mlxsw_sp_port->ptp.egr_types;
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
1238
ptp.shaper_dw);
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
1266
mlxsw_sp_port->ptp.hwtstamp_config = *config;
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
1267
mlxsw_sp_port->ptp.ing_types = ing_types;
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
1268
mlxsw_sp_port->ptp.egr_types = egr_types;
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
1283
info->phc_index = ptp_clock_index(mlxsw_sp->clock->ptp);
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
1341
void *stats = &mlxsw_sp_port->ptp.stats;
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
1640
ptp_enabled = mlxsw_sp_port->ptp.ing_types ||
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
1641
mlxsw_sp_port->ptp.egr_types;
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
1654
mlxsw_sp_port->ptp.ing_types = new_ing_types;
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
1655
mlxsw_sp_port->ptp.egr_types = new_egr_types;
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
1673
info->phc_index = ptp_clock_index(mlxsw_sp->clock->ptp);
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
190
static int mlxsw_sp1_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
192
struct mlxsw_sp1_ptp_clock *clock = mlxsw_sp1_ptp_clock(ptp);
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
206
static int mlxsw_sp1_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
208
struct mlxsw_sp1_ptp_clock *clock = mlxsw_sp1_ptp_clock(ptp);
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
219
static int mlxsw_sp1_ptp_gettimex(struct ptp_clock_info *ptp,
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
223
struct mlxsw_sp1_ptp_clock *clock = mlxsw_sp1_ptp_clock(ptp);
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
236
static int mlxsw_sp1_ptp_settime(struct ptp_clock_info *ptp,
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
239
struct mlxsw_sp1_ptp_clock *clock = mlxsw_sp1_ptp_clock(ptp);
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
312
clock->common.ptp = ptp_clock_register(&clock->common.ptp_info, dev);
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
313
if (IS_ERR(clock->common.ptp)) {
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
314
err = PTR_ERR(clock->common.ptp);
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
332
ptp_clock_unregister(clock_common->ptp);
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
373
static int mlxsw_sp2_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
376
container_of(ptp, struct mlxsw_sp_ptp_clock, ptp_info);
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
386
static int mlxsw_sp2_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
389
container_of(ptp, struct mlxsw_sp_ptp_clock, ptp_info);
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
409
static int mlxsw_sp2_ptp_gettimex(struct ptp_clock_info *ptp,
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
414
container_of(ptp, struct mlxsw_sp_ptp_clock, ptp_info);
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
423
static int mlxsw_sp2_ptp_settime(struct ptp_clock_info *ptp,
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
427
container_of(ptp, struct mlxsw_sp_ptp_clock, ptp_info);
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
463
clock->ptp = ptp_clock_register(&clock->ptp_info, dev);
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
464
if (IS_ERR(clock->ptp)) {
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
465
err = PTR_ERR(clock->ptp);
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
480
ptp_clock_unregister(clock->ptp);
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
719
types = ingress ? mlxsw_sp_port->ptp.ing_types :
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
720
mlxsw_sp_port->ptp.egr_types;
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
761
types = ingress ? mlxsw_sp_port->ptp.ing_types :
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
762
mlxsw_sp_port->ptp.egr_types;
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
78
struct ptp_clock *ptp;
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
823
&mlxsw_sp_port->ptp.stats.rx_gcd :
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
824
&mlxsw_sp_port->ptp.stats.tx_gcd;
drivers/net/ethernet/meta/fbnic/fbnic.h
81
struct ptp_clock *ptp;
drivers/net/ethernet/meta/fbnic/fbnic_ethtool.c
1598
tsinfo->phc_index = ptp_clock_index(fbn->fbd->ptp);
drivers/net/ethernet/meta/fbnic/fbnic_time.c
107
static int fbnic_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/net/ethernet/meta/fbnic/fbnic_time.c
109
struct fbnic_dev *fbd = fbnic_from_ptp_info(ptp);
drivers/net/ethernet/meta/fbnic/fbnic_time.c
128
static int fbnic_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/net/ethernet/meta/fbnic/fbnic_time.c
130
struct fbnic_dev *fbd = fbnic_from_ptp_info(ptp);
drivers/net/ethernet/meta/fbnic/fbnic_time.c
146
fbnic_ptp_gettimex64(struct ptp_clock_info *ptp, struct timespec64 *ts,
drivers/net/ethernet/meta/fbnic/fbnic_time.c
149
struct fbnic_dev *fbd = fbnic_from_ptp_info(ptp);
drivers/net/ethernet/meta/fbnic/fbnic_time.c
181
fbnic_ptp_settime64(struct ptp_clock_info *ptp, const struct timespec64 *ts)
drivers/net/ethernet/meta/fbnic/fbnic_time.c
183
struct fbnic_dev *fbd = fbnic_from_ptp_info(ptp);
drivers/net/ethernet/meta/fbnic/fbnic_time.c
269
return ptp_schedule_worker(fbn->fbd->ptp, FBNIC_TS_HIGH_REFRESH_JIF);
drivers/net/ethernet/meta/fbnic/fbnic_time.c
274
ptp_cancel_worker_sync(fbn->fbd->ptp);
drivers/net/ethernet/meta/fbnic/fbnic_time.c
291
fbd->ptp = ptp_clock_register(&fbd->ptp_info, dev);
drivers/net/ethernet/meta/fbnic/fbnic_time.c
292
if (IS_ERR(fbd->ptp))
drivers/net/ethernet/meta/fbnic/fbnic_time.c
293
dev_err(dev, "Failed to register PTP: %pe\n", fbd->ptp);
drivers/net/ethernet/meta/fbnic/fbnic_time.c
295
return PTR_ERR_OR_ZERO(fbd->ptp);
drivers/net/ethernet/meta/fbnic/fbnic_time.c
300
if (!fbd->ptp)
drivers/net/ethernet/meta/fbnic/fbnic_time.c
302
ptp_clock_unregister(fbd->ptp);
drivers/net/ethernet/meta/fbnic/fbnic_time.c
31
static struct fbnic_dev *fbnic_from_ptp_info(struct ptp_clock_info *ptp)
drivers/net/ethernet/meta/fbnic/fbnic_time.c
33
return container_of(ptp, struct fbnic_dev, ptp_info);
drivers/net/ethernet/meta/fbnic/fbnic_time.c
94
static long fbnic_ptp_do_aux_work(struct ptp_clock_info *ptp)
drivers/net/ethernet/meta/fbnic/fbnic_time.c
96
struct fbnic_dev *fbd = fbnic_from_ptp_info(ptp);
drivers/net/ethernet/microchip/lan743x_ethtool.c
1054
if (adapter->ptp.ptp_clock)
drivers/net/ethernet/microchip/lan743x_ethtool.c
1055
ts_info->phc_index = ptp_clock_index(adapter->ptp.ptp_clock);
drivers/net/ethernet/microchip/lan743x_main.h
1064
struct lan743x_ptp ptp;
drivers/net/ethernet/microchip/lan743x_ptp.c
1001
container_of(ptp, struct lan743x_ptp, ptp_clock_info);
drivers/net/ethernet/microchip/lan743x_ptp.c
1003
container_of(lan_ptp, struct lan743x_adapter, ptp);
drivers/net/ethernet/microchip/lan743x_ptp.c
1029
struct lan743x_ptp *ptp = &adapter->ptp;
drivers/net/ethernet/microchip/lan743x_ptp.c
1033
mutex_lock(&ptp->command_lock);
drivers/net/ethernet/microchip/lan743x_ptp.c
1042
mutex_unlock(&ptp->command_lock);
drivers/net/ethernet/microchip/lan743x_ptp.c
1045
extts = &ptp->extts[channel];
drivers/net/ethernet/microchip/lan743x_ptp.c
105
spin_lock_bh(&ptp->tx_ts_lock);
drivers/net/ethernet/microchip/lan743x_ptp.c
1054
struct lan743x_ptp *ptp =
drivers/net/ethernet/microchip/lan743x_ptp.c
1057
container_of(ptp, struct lan743x_adapter, ptp);
drivers/net/ethernet/microchip/lan743x_ptp.c
106
c = ptp->tx_ts_skb_queue_size;
drivers/net/ethernet/microchip/lan743x_ptp.c
108
if (c > ptp->tx_ts_queue_size)
drivers/net/ethernet/microchip/lan743x_ptp.c
109
c = ptp->tx_ts_queue_size;
drivers/net/ethernet/microchip/lan743x_ptp.c
1124
ptp_clock_event(ptp->ptp_clock,
drivers/net/ethernet/microchip/lan743x_ptp.c
114
ignore_sync = ((ptp->tx_ts_ignore_sync_queue &
drivers/net/ethernet/microchip/lan743x_ptp.c
1157
ptp_clock_event(ptp->ptp_clock,
drivers/net/ethernet/microchip/lan743x_ptp.c
116
skb = ptp->tx_ts_skb_queue[i];
drivers/net/ethernet/microchip/lan743x_ptp.c
117
nseconds = ptp->tx_ts_nseconds_queue[i];
drivers/net/ethernet/microchip/lan743x_ptp.c
118
seconds = ptp->tx_ts_seconds_queue[i];
drivers/net/ethernet/microchip/lan743x_ptp.c
1189
struct lan743x_ptp *ptp = &adapter->ptp;
drivers/net/ethernet/microchip/lan743x_ptp.c
119
header = ptp->tx_ts_header_queue[i];
drivers/net/ethernet/microchip/lan743x_ptp.c
1191
mutex_lock(&ptp->command_lock);
drivers/net/ethernet/microchip/lan743x_ptp.c
1206
mutex_unlock(&ptp->command_lock);
drivers/net/ethernet/microchip/lan743x_ptp.c
1212
struct lan743x_ptp *ptp = &adapter->ptp;
drivers/net/ethernet/microchip/lan743x_ptp.c
1214
mutex_lock(&ptp->command_lock);
drivers/net/ethernet/microchip/lan743x_ptp.c
1228
mutex_unlock(&ptp->command_lock);
drivers/net/ethernet/microchip/lan743x_ptp.c
1234
struct lan743x_ptp *ptp = &adapter->ptp;
drivers/net/ethernet/microchip/lan743x_ptp.c
130
ptp->tx_ts_skb_queue[i] = NULL;
drivers/net/ethernet/microchip/lan743x_ptp.c
131
ptp->tx_ts_seconds_queue[i] = 0;
drivers/net/ethernet/microchip/lan743x_ptp.c
1317
mutex_lock(&ptp->command_lock);
drivers/net/ethernet/microchip/lan743x_ptp.c
132
ptp->tx_ts_nseconds_queue[i] = 0;
drivers/net/ethernet/microchip/lan743x_ptp.c
133
ptp->tx_ts_header_queue[i] = 0;
drivers/net/ethernet/microchip/lan743x_ptp.c
1340
mutex_unlock(&ptp->command_lock);
drivers/net/ethernet/microchip/lan743x_ptp.c
1343
mutex_lock(&ptp->command_lock);
drivers/net/ethernet/microchip/lan743x_ptp.c
1352
mutex_unlock(&ptp->command_lock);
drivers/net/ethernet/microchip/lan743x_ptp.c
1359
struct lan743x_ptp *ptp = NULL;
drivers/net/ethernet/microchip/lan743x_ptp.c
1363
ptp = &adapter->ptp;
drivers/net/ethernet/microchip/lan743x_ptp.c
137
ptp->tx_ts_ignore_sync_queue >>= c;
drivers/net/ethernet/microchip/lan743x_ptp.c
1371
ptp_schedule_worker(ptp->ptp_clock, 0);
drivers/net/ethernet/microchip/lan743x_ptp.c
139
ptp->tx_ts_skb_queue[i - c] = ptp->tx_ts_skb_queue[i];
drivers/net/ethernet/microchip/lan743x_ptp.c
140
ptp->tx_ts_seconds_queue[i - c] = ptp->tx_ts_seconds_queue[i];
drivers/net/ethernet/microchip/lan743x_ptp.c
1401
struct lan743x_ptp *ptp = &adapter->ptp;
drivers/net/ethernet/microchip/lan743x_ptp.c
1403
spin_lock_bh(&ptp->tx_ts_lock);
drivers/net/ethernet/microchip/lan743x_ptp.c
1404
if (ptp->tx_ts_skb_queue_size < LAN743X_PTP_NUMBER_OF_TX_TIMESTAMPS) {
drivers/net/ethernet/microchip/lan743x_ptp.c
1405
ptp->tx_ts_skb_queue[ptp->tx_ts_skb_queue_size] = skb;
drivers/net/ethernet/microchip/lan743x_ptp.c
1407
ptp->tx_ts_ignore_sync_queue |=
drivers/net/ethernet/microchip/lan743x_ptp.c
1408
BIT(ptp->tx_ts_skb_queue_size);
drivers/net/ethernet/microchip/lan743x_ptp.c
1409
ptp->tx_ts_skb_queue_size++;
drivers/net/ethernet/microchip/lan743x_ptp.c
141
ptp->tx_ts_nseconds_queue[i - c] = ptp->tx_ts_nseconds_queue[i];
drivers/net/ethernet/microchip/lan743x_ptp.c
1419
spin_unlock_bh(&ptp->tx_ts_lock);
drivers/net/ethernet/microchip/lan743x_ptp.c
142
ptp->tx_ts_header_queue[i - c] = ptp->tx_ts_header_queue[i];
drivers/net/ethernet/microchip/lan743x_ptp.c
144
ptp->tx_ts_skb_queue[i] = NULL;
drivers/net/ethernet/microchip/lan743x_ptp.c
145
ptp->tx_ts_seconds_queue[i] = 0;
drivers/net/ethernet/microchip/lan743x_ptp.c
1455
struct lan743x_ptp *ptp = &adapter->ptp;
drivers/net/ethernet/microchip/lan743x_ptp.c
1458
mutex_init(&ptp->command_lock);
drivers/net/ethernet/microchip/lan743x_ptp.c
1459
spin_lock_init(&ptp->tx_ts_lock);
drivers/net/ethernet/microchip/lan743x_ptp.c
146
ptp->tx_ts_nseconds_queue[i] = 0;
drivers/net/ethernet/microchip/lan743x_ptp.c
1460
ptp->used_event_ch = 0;
drivers/net/ethernet/microchip/lan743x_ptp.c
1463
ptp->perout[i].event_ch = -1;
drivers/net/ethernet/microchip/lan743x_ptp.c
1464
ptp->perout[i].gpio_pin = -1;
drivers/net/ethernet/microchip/lan743x_ptp.c
147
ptp->tx_ts_header_queue[i] = 0;
drivers/net/ethernet/microchip/lan743x_ptp.c
1474
struct lan743x_ptp *ptp = &adapter->ptp;
drivers/net/ethernet/microchip/lan743x_ptp.c
149
ptp->tx_ts_skb_queue_size -= c;
drivers/net/ethernet/microchip/lan743x_ptp.c
1493
ptp->flags |= PTP_FLAG_ISR_ENABLED;
drivers/net/ethernet/microchip/lan743x_ptp.c
150
ptp->tx_ts_queue_size -= c;
drivers/net/ethernet/microchip/lan743x_ptp.c
1519
struct ptp_pin_desc *ptp_pin = &ptp->pin_config[i];
drivers/net/ethernet/microchip/lan743x_ptp.c
152
ptp->pending_tx_timestamps -= c;
drivers/net/ethernet/microchip/lan743x_ptp.c
1527
ptp->ptp_clock_info.owner = THIS_MODULE;
drivers/net/ethernet/microchip/lan743x_ptp.c
1528
snprintf(ptp->ptp_clock_info.name, 16, "%pm",
drivers/net/ethernet/microchip/lan743x_ptp.c
153
spin_unlock_bh(&ptp->tx_ts_lock);
drivers/net/ethernet/microchip/lan743x_ptp.c
1530
ptp->ptp_clock_info.max_adj = LAN743X_PTP_MAX_FREQ_ADJ_IN_PPB;
drivers/net/ethernet/microchip/lan743x_ptp.c
1531
ptp->ptp_clock_info.n_alarm = 0;
drivers/net/ethernet/microchip/lan743x_ptp.c
1532
ptp->ptp_clock_info.n_ext_ts = LAN743X_PTP_N_EXTTS;
drivers/net/ethernet/microchip/lan743x_ptp.c
1533
ptp->ptp_clock_info.n_per_out = LAN743X_PTP_N_EVENT_CHAN;
drivers/net/ethernet/microchip/lan743x_ptp.c
1534
ptp->ptp_clock_info.n_pins = n_pins;
drivers/net/ethernet/microchip/lan743x_ptp.c
1535
ptp->ptp_clock_info.pps = LAN743X_PTP_N_PPS;
drivers/net/ethernet/microchip/lan743x_ptp.c
1536
ptp->ptp_clock_info.supported_extts_flags = PTP_RISING_EDGE |
drivers/net/ethernet/microchip/lan743x_ptp.c
1539
ptp->ptp_clock_info.supported_perout_flags = PTP_PEROUT_DUTY_CYCLE;
drivers/net/ethernet/microchip/lan743x_ptp.c
1540
ptp->ptp_clock_info.pin_config = ptp->pin_config;
drivers/net/ethernet/microchip/lan743x_ptp.c
1541
ptp->ptp_clock_info.adjfine = lan743x_ptpci_adjfine;
drivers/net/ethernet/microchip/lan743x_ptp.c
1542
ptp->ptp_clock_info.adjtime = lan743x_ptpci_adjtime;
drivers/net/ethernet/microchip/lan743x_ptp.c
1543
ptp->ptp_clock_info.gettime64 = lan743x_ptpci_gettime64;
drivers/net/ethernet/microchip/lan743x_ptp.c
1544
ptp->ptp_clock_info.getcrosststamp = NULL;
drivers/net/ethernet/microchip/lan743x_ptp.c
1545
ptp->ptp_clock_info.settime64 = lan743x_ptpci_settime64;
drivers/net/ethernet/microchip/lan743x_ptp.c
1546
ptp->ptp_clock_info.enable = lan743x_ptpci_enable;
drivers/net/ethernet/microchip/lan743x_ptp.c
1547
ptp->ptp_clock_info.do_aux_work = lan743x_ptpci_do_aux_work;
drivers/net/ethernet/microchip/lan743x_ptp.c
1548
ptp->ptp_clock_info.verify = lan743x_ptpci_verify_pin_config;
drivers/net/ethernet/microchip/lan743x_ptp.c
1550
ptp->ptp_clock = ptp_clock_register(&ptp->ptp_clock_info,
drivers/net/ethernet/microchip/lan743x_ptp.c
1553
if (IS_ERR(ptp->ptp_clock)) {
drivers/net/ethernet/microchip/lan743x_ptp.c
1558
ptp->flags |= PTP_FLAG_PTP_CLOCK_REGISTERED;
drivers/net/ethernet/microchip/lan743x_ptp.c
1570
struct lan743x_ptp *ptp = &adapter->ptp;
drivers/net/ethernet/microchip/lan743x_ptp.c
1574
(ptp->flags & PTP_FLAG_PTP_CLOCK_REGISTERED)) {
drivers/net/ethernet/microchip/lan743x_ptp.c
1575
ptp_clock_unregister(ptp->ptp_clock);
drivers/net/ethernet/microchip/lan743x_ptp.c
1576
ptp->ptp_clock = NULL;
drivers/net/ethernet/microchip/lan743x_ptp.c
1577
ptp->flags &= ~PTP_FLAG_PTP_CLOCK_REGISTERED;
drivers/net/ethernet/microchip/lan743x_ptp.c
1582
if (ptp->flags & PTP_FLAG_ISR_ENABLED) {
drivers/net/ethernet/microchip/lan743x_ptp.c
1587
ptp->flags &= ~PTP_FLAG_ISR_ENABLED;
drivers/net/ethernet/microchip/lan743x_ptp.c
159
struct lan743x_ptp *ptp = &adapter->ptp;
drivers/net/ethernet/microchip/lan743x_ptp.c
1592
spin_lock_bh(&ptp->tx_ts_lock);
drivers/net/ethernet/microchip/lan743x_ptp.c
1596
struct sk_buff *skb = ptp->tx_ts_skb_queue[index];
drivers/net/ethernet/microchip/lan743x_ptp.c
1599
ptp->tx_ts_skb_queue[index] = NULL;
drivers/net/ethernet/microchip/lan743x_ptp.c
1600
ptp->tx_ts_seconds_queue[index] = 0;
drivers/net/ethernet/microchip/lan743x_ptp.c
1601
ptp->tx_ts_nseconds_queue[index] = 0;
drivers/net/ethernet/microchip/lan743x_ptp.c
1603
ptp->tx_ts_skb_queue_size = 0;
drivers/net/ethernet/microchip/lan743x_ptp.c
1604
ptp->tx_ts_queue_size = 0;
drivers/net/ethernet/microchip/lan743x_ptp.c
1605
ptp->pending_tx_timestamps = 0;
drivers/net/ethernet/microchip/lan743x_ptp.c
1606
spin_unlock_bh(&ptp->tx_ts_lock);
drivers/net/ethernet/microchip/lan743x_ptp.c
162
mutex_lock(&ptp->command_lock);
drivers/net/ethernet/microchip/lan743x_ptp.c
163
if (!(test_bit(event_channel, &ptp->used_event_ch))) {
drivers/net/ethernet/microchip/lan743x_ptp.c
1635
struct lan743x_ptp *ptp = &adapter->ptp;
drivers/net/ethernet/microchip/lan743x_ptp.c
1637
mutex_lock(&ptp->command_lock);
drivers/net/ethernet/microchip/lan743x_ptp.c
164
ptp->used_event_ch |= BIT(event_channel);
drivers/net/ethernet/microchip/lan743x_ptp.c
1646
mutex_unlock(&ptp->command_lock);
drivers/net/ethernet/microchip/lan743x_ptp.c
1651
struct lan743x_ptp *ptp = &adapter->ptp;
drivers/net/ethernet/microchip/lan743x_ptp.c
1656
mutex_lock(&ptp->command_lock);
drivers/net/ethernet/microchip/lan743x_ptp.c
1665
mutex_unlock(&ptp->command_lock);
drivers/net/ethernet/microchip/lan743x_ptp.c
1670
struct lan743x_ptp *ptp = &adapter->ptp;
drivers/net/ethernet/microchip/lan743x_ptp.c
1672
mutex_lock(&ptp->command_lock);
drivers/net/ethernet/microchip/lan743x_ptp.c
1683
mutex_unlock(&ptp->command_lock);
drivers/net/ethernet/microchip/lan743x_ptp.c
1690
struct lan743x_ptp *ptp = &adapter->ptp;
drivers/net/ethernet/microchip/lan743x_ptp.c
1692
mutex_lock(&ptp->command_lock);
drivers/net/ethernet/microchip/lan743x_ptp.c
1700
mutex_unlock(&ptp->command_lock);
drivers/net/ethernet/microchip/lan743x_ptp.c
1705
struct lan743x_ptp *ptp = &adapter->ptp;
drivers/net/ethernet/microchip/lan743x_ptp.c
1708
spin_lock(&ptp->tx_ts_lock);
drivers/net/ethernet/microchip/lan743x_ptp.c
1709
if (ptp->pending_tx_timestamps < LAN743X_PTP_NUMBER_OF_TX_TIMESTAMPS) {
drivers/net/ethernet/microchip/lan743x_ptp.c
171
mutex_unlock(&ptp->command_lock);
drivers/net/ethernet/microchip/lan743x_ptp.c
1711
ptp->pending_tx_timestamps++;
drivers/net/ethernet/microchip/lan743x_ptp.c
1714
spin_unlock(&ptp->tx_ts_lock);
drivers/net/ethernet/microchip/lan743x_ptp.c
1720
struct lan743x_ptp *ptp = &adapter->ptp;
drivers/net/ethernet/microchip/lan743x_ptp.c
1722
spin_lock_bh(&ptp->tx_ts_lock);
drivers/net/ethernet/microchip/lan743x_ptp.c
1723
if (ptp->pending_tx_timestamps > 0)
drivers/net/ethernet/microchip/lan743x_ptp.c
1724
ptp->pending_tx_timestamps--;
drivers/net/ethernet/microchip/lan743x_ptp.c
1728
spin_unlock_bh(&ptp->tx_ts_lock);
drivers/net/ethernet/microchip/lan743x_ptp.c
178
struct lan743x_ptp *ptp = &adapter->ptp;
drivers/net/ethernet/microchip/lan743x_ptp.c
180
mutex_lock(&ptp->command_lock);
drivers/net/ethernet/microchip/lan743x_ptp.c
181
if (test_bit(event_channel, &ptp->used_event_ch)) {
drivers/net/ethernet/microchip/lan743x_ptp.c
182
ptp->used_event_ch &= ~BIT(event_channel);
drivers/net/ethernet/microchip/lan743x_ptp.c
188
mutex_unlock(&ptp->command_lock);
drivers/net/ethernet/microchip/lan743x_ptp.c
202
struct lan743x_ptp *ptp = &adapter->ptp;
drivers/net/ethernet/microchip/lan743x_ptp.c
204
if (ptp->leds_multiplexed &&
drivers/net/ethernet/microchip/lan743x_ptp.c
205
ptp->led_enabled[pin]) {
drivers/net/ethernet/microchip/lan743x_ptp.c
219
struct lan743x_ptp *ptp = &adapter->ptp;
drivers/net/ethernet/microchip/lan743x_ptp.c
229
ptp->led_enabled[i] = led_enabled;
drivers/net/ethernet/microchip/lan743x_ptp.c
231
ptp->leds_multiplexed = true;
drivers/net/ethernet/microchip/lan743x_ptp.c
233
ptp->leds_multiplexed = false;
drivers/net/ethernet/microchip/lan743x_ptp.c
337
struct lan743x_ptp *ptp =
drivers/net/ethernet/microchip/lan743x_ptp.c
340
container_of(ptp, struct lan743x_adapter, ptp);
drivers/net/ethernet/microchip/lan743x_ptp.c
363
struct lan743x_ptp *ptp =
drivers/net/ethernet/microchip/lan743x_ptp.c
366
container_of(ptp, struct lan743x_adapter, ptp);
drivers/net/ethernet/microchip/lan743x_ptp.c
376
struct lan743x_ptp *ptp =
drivers/net/ethernet/microchip/lan743x_ptp.c
379
container_of(ptp, struct lan743x_adapter, ptp);
drivers/net/ethernet/microchip/lan743x_ptp.c
397
struct lan743x_ptp *ptp =
drivers/net/ethernet/microchip/lan743x_ptp.c
400
container_of(ptp, struct lan743x_adapter, ptp);
drivers/net/ethernet/microchip/lan743x_ptp.c
426
struct lan743x_ptp *ptp = &adapter->ptp;
drivers/net/ethernet/microchip/lan743x_ptp.c
428
struct lan743x_ptp_perout *perout = &ptp->perout[index];
drivers/net/ethernet/microchip/lan743x_ptp.c
456
struct lan743x_ptp *ptp = &adapter->ptp;
drivers/net/ethernet/microchip/lan743x_ptp.c
463
struct lan743x_ptp_perout *perout = &ptp->perout[index];
drivers/net/ethernet/microchip/lan743x_ptp.c
467
perout_pin = ptp_find_pin(ptp->ptp_clock, PTP_PF_PEROUT,
drivers/net/ethernet/microchip/lan743x_ptp.c
643
struct lan743x_ptp *ptp = &adapter->ptp;
drivers/net/ethernet/microchip/lan743x_ptp.c
649
event_ch = ptp->ptp_io_perout[index];
drivers/net/ethernet/microchip/lan743x_ptp.c
672
ptp->ptp_io_perout[index] = -1;
drivers/net/ethernet/microchip/lan743x_ptp.c
675
perout_pin = ptp_find_pin(ptp->ptp_clock, PTP_PF_PEROUT, index);
drivers/net/ethernet/microchip/lan743x_ptp.c
695
struct lan743x_ptp *ptp = &adapter->ptp;
drivers/net/ethernet/microchip/lan743x_ptp.c
707
event_ch = ptp->ptp_io_perout[index];
drivers/net/ethernet/microchip/lan743x_ptp.c
710
perout_pin = ptp_find_pin(ptp->ptp_clock, PTP_PF_PEROUT, index);
drivers/net/ethernet/microchip/lan743x_ptp.c
730
ptp->ptp_io_perout[index] = event_ch;
drivers/net/ethernet/microchip/lan743x_ptp.c
81
struct lan743x_ptp *ptp = &adapter->ptp;
drivers/net/ethernet/microchip/lan743x_ptp.c
83
spin_lock_bh(&ptp->tx_ts_lock);
drivers/net/ethernet/microchip/lan743x_ptp.c
84
if (ptp->tx_ts_queue_size < LAN743X_PTP_NUMBER_OF_TX_TIMESTAMPS) {
drivers/net/ethernet/microchip/lan743x_ptp.c
85
ptp->tx_ts_seconds_queue[ptp->tx_ts_queue_size] = seconds;
drivers/net/ethernet/microchip/lan743x_ptp.c
852
struct lan743x_ptp *ptp = &adapter->ptp;
drivers/net/ethernet/microchip/lan743x_ptp.c
856
extts = &ptp->extts[index];
drivers/net/ethernet/microchip/lan743x_ptp.c
86
ptp->tx_ts_nseconds_queue[ptp->tx_ts_queue_size] = nano_seconds;
drivers/net/ethernet/microchip/lan743x_ptp.c
87
ptp->tx_ts_header_queue[ptp->tx_ts_queue_size] = header;
drivers/net/ethernet/microchip/lan743x_ptp.c
88
ptp->tx_ts_queue_size++;
drivers/net/ethernet/microchip/lan743x_ptp.c
888
struct lan743x_ptp *ptp = &adapter->ptp;
drivers/net/ethernet/microchip/lan743x_ptp.c
894
mutex_lock(&ptp->command_lock);
drivers/net/ethernet/microchip/lan743x_ptp.c
924
mutex_unlock(&ptp->command_lock);
drivers/net/ethernet/microchip/lan743x_ptp.c
93
spin_unlock_bh(&ptp->tx_ts_lock);
drivers/net/ethernet/microchip/lan743x_ptp.c
932
struct lan743x_ptp *ptp = &adapter->ptp;
drivers/net/ethernet/microchip/lan743x_ptp.c
939
extts = &ptp->extts[index];
drivers/net/ethernet/microchip/lan743x_ptp.c
942
extts_pin = ptp_find_pin(ptp->ptp_clock, PTP_PF_EXTTS, index);
drivers/net/ethernet/microchip/lan743x_ptp.c
959
struct lan743x_ptp *ptp =
drivers/net/ethernet/microchip/lan743x_ptp.c
962
container_of(ptp, struct lan743x_adapter, ptp);
drivers/net/ethernet/microchip/lan743x_ptp.c
98
struct lan743x_ptp *ptp = &adapter->ptp;
drivers/net/ethernet/microchip/lan743x_ptp.c
995
static int lan743x_ptpci_verify_pin_config(struct ptp_clock_info *ptp,
drivers/net/ethernet/microchip/lan966x/lan966x_ethtool.c
547
if (!lan966x->ptp)
drivers/net/ethernet/microchip/lan966x/lan966x_fdma.c
363
if (!dcb_buf->ptp)
drivers/net/ethernet/microchip/lan966x/lan966x_fdma.c
672
next_dcb_buf->ptp = false;
drivers/net/ethernet/microchip/lan966x/lan966x_fdma.c
753
next_dcb_buf->ptp = false;
drivers/net/ethernet/microchip/lan966x/lan966x_fdma.c
767
next_dcb_buf->ptp = true;
drivers/net/ethernet/microchip/lan966x/lan966x_main.c
1153
lan966x->ptp = 1;
drivers/net/ethernet/microchip/lan966x/lan966x_main.c
1167
if (lan966x->ptp) {
drivers/net/ethernet/microchip/lan966x/lan966x_main.c
382
if (port->lan966x->ptp && skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) {
drivers/net/ethernet/microchip/lan966x/lan966x_main.c
464
if (!port->lan966x->ptp)
drivers/net/ethernet/microchip/lan966x/lan966x_main.c
483
if (cfg->source == HWTSTAMP_SOURCE_NETDEV && !port->lan966x->ptp)
drivers/net/ethernet/microchip/lan966x/lan966x_main.h
229
u32 ptp : 1;
drivers/net/ethernet/microchip/lan966x/lan966x_main.h
320
bool ptp;
drivers/net/ethernet/microchip/lan966x/lan966x_main.h
550
int lan966x_ptp_gettime64(struct ptp_clock_info *ptp, struct timespec64 *ts);
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
1037
if (!lan966x->ptp)
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
1088
if (!lan966x->ptp)
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
1111
if (!lan966x->ptp ||
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
622
static int lan966x_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
624
struct lan966x_phc *phc = container_of(ptp, struct lan966x_phc, info);
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
669
static int lan966x_ptp_settime64(struct ptp_clock_info *ptp,
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
672
struct lan966x_phc *phc = container_of(ptp, struct lan966x_phc, info);
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
708
int lan966x_ptp_gettime64(struct ptp_clock_info *ptp, struct timespec64 *ts)
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
710
struct lan966x_phc *phc = container_of(ptp, struct lan966x_phc, info);
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
745
static int lan966x_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
747
struct lan966x_phc *phc = container_of(ptp, struct lan966x_phc, info);
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
782
lan966x_ptp_gettime64(ptp, &ts);
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
787
lan966x_ptp_settime64(ptp, &ts);
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
793
static int lan966x_ptp_verify(struct ptp_clock_info *ptp, unsigned int pin,
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
796
struct lan966x_phc *phc = container_of(ptp, struct lan966x_phc, info);
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
822
if (ptp == info)
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
833
static int lan966x_ptp_perout(struct ptp_clock_info *ptp,
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
836
struct lan966x_phc *phc = container_of(ptp, struct lan966x_phc, info);
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
930
static int lan966x_ptp_extts(struct ptp_clock_info *ptp,
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
933
struct lan966x_phc *phc = container_of(ptp, struct lan966x_phc, info);
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
969
static int lan966x_ptp_enable(struct ptp_clock_info *ptp,
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
974
return lan966x_ptp_perout(ptp, rq, on);
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
976
return lan966x_ptp_extts(ptp, rq, on);
drivers/net/ethernet/microchip/sparx5/lan969x/lan969x_fdma.c
334
db_buf->ptp = false;
drivers/net/ethernet/microchip/sparx5/lan969x/lan969x_fdma.c
339
db_buf->ptp = true;
drivers/net/ethernet/microchip/sparx5/lan969x/lan969x_fdma.c
80
if (!db->ptp)
drivers/net/ethernet/microchip/sparx5/sparx5_ethtool.c
1192
if (!sparx5->ptp && is_sparx5(sparx5))
drivers/net/ethernet/microchip/sparx5/sparx5_main.c
832
sparx5->ptp = 1;
drivers/net/ethernet/microchip/sparx5/sparx5_main.h
180
bool ptp;
drivers/net/ethernet/microchip/sparx5/sparx5_main.h
422
bool ptp;
drivers/net/ethernet/microchip/sparx5/sparx5_main.h
559
int sparx5_ptp_gettime64(struct ptp_clock_info *ptp, struct timespec64 *ts);
drivers/net/ethernet/microchip/sparx5/sparx5_netdev.c
227
if (!sparx5->ptp)
drivers/net/ethernet/microchip/sparx5/sparx5_netdev.c
242
if (!sparx5->ptp)
drivers/net/ethernet/microchip/sparx5/sparx5_packet.c
244
if (sparx5->ptp && skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) {
drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c
396
static int sparx5_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c
398
struct sparx5_phc *phc = container_of(ptp, struct sparx5_phc, info);
drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c
443
static int sparx5_ptp_settime64(struct ptp_clock_info *ptp,
drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c
446
struct sparx5_phc *phc = container_of(ptp, struct sparx5_phc, info);
drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c
485
int sparx5_ptp_gettime64(struct ptp_clock_info *ptp, struct timespec64 *ts)
drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c
487
struct sparx5_phc *phc = container_of(ptp, struct sparx5_phc, info);
drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c
525
static int sparx5_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c
527
struct sparx5_phc *phc = container_of(ptp, struct sparx5_phc, info);
drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c
565
sparx5_ptp_gettime64(ptp, &ts);
drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c
570
sparx5_ptp_settime64(ptp, &ts);
drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c
612
if (!sparx5->ptp)
drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c
683
if (!sparx5->ptp)
drivers/net/ethernet/mscc/ocelot.c
1378
if (ocelot->ptp)
drivers/net/ethernet/mscc/ocelot_fdma.c
378
if (ocelot->ptp) {
drivers/net/ethernet/mscc/ocelot_net.c
1036
if (!ocelot->ptp)
drivers/net/ethernet/mscc/ocelot_net.c
557
if (ocelot->ptp && (skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP)) {
drivers/net/ethernet/mscc/ocelot_ptp.c
126
ocelot_ptp_gettime64(ptp, &ts);
drivers/net/ethernet/mscc/ocelot_ptp.c
131
ocelot_ptp_settime64(ptp, &ts);
drivers/net/ethernet/mscc/ocelot_ptp.c
138
int ocelot_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/net/ethernet/mscc/ocelot_ptp.c
140
struct ocelot *ocelot = container_of(ptp, struct ocelot, ptp_info);
drivers/net/ethernet/mscc/ocelot_ptp.c
184
int ocelot_ptp_verify(struct ptp_clock_info *ptp, unsigned int pin,
drivers/net/ethernet/mscc/ocelot_ptp.c
19
int ocelot_ptp_gettime64(struct ptp_clock_info *ptp, struct timespec64 *ts)
drivers/net/ethernet/mscc/ocelot_ptp.c
199
int ocelot_ptp_enable(struct ptp_clock_info *ptp,
drivers/net/ethernet/mscc/ocelot_ptp.c
202
struct ocelot *ocelot = container_of(ptp, struct ocelot, ptp_info);
drivers/net/ethernet/mscc/ocelot_ptp.c
21
struct ocelot *ocelot = container_of(ptp, struct ocelot, ptp_info);
drivers/net/ethernet/mscc/ocelot_ptp.c
53
int ocelot_ptp_settime64(struct ptp_clock_info *ptp,
drivers/net/ethernet/mscc/ocelot_ptp.c
56
struct ocelot *ocelot = container_of(ptp, struct ocelot, ptp_info);
drivers/net/ethernet/mscc/ocelot_ptp.c
89
int ocelot_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/net/ethernet/mscc/ocelot_ptp.c
92
struct ocelot *ocelot = container_of(ptp, struct ocelot,
drivers/net/ethernet/mscc/ocelot_stats.c
831
if (!ocelot->ptp)
drivers/net/ethernet/mscc/ocelot_stats.c
983
if (ocelot->ptp) {
drivers/net/ethernet/mscc/ocelot_vsc7514.c
334
ocelot->ptp = 1;
drivers/net/ethernet/mscc/ocelot_vsc7514.c
369
if (ocelot->ptp) {
drivers/net/ethernet/mscc/ocelot_vsc7514.c
374
ocelot->ptp = 0;
drivers/net/ethernet/pensando/ionic/ionic_ethtool.c
1013
if (!lif->phc || !lif->phc->ptp)
drivers/net/ethernet/pensando/ionic/ionic_ethtool.c
1016
info->phc_index = ptp_clock_index(lif->phc->ptp);
drivers/net/ethernet/pensando/ionic/ionic_lif.h
265
struct ptp_clock *ptp;
drivers/net/ethernet/pensando/ionic/ionic_phc.c
213
if (!lif->phc || !lif->phc->ptp)
drivers/net/ethernet/pensando/ionic/ionic_phc.c
231
if (!lif->phc || !lif->phc->ptp)
drivers/net/ethernet/pensando/ionic/ionic_phc.c
245
if (!lif->phc || !lif->phc->ptp)
drivers/net/ethernet/pensando/ionic/ionic_phc.c
270
if (!lif->phc || !lif->phc->ptp)
drivers/net/ethernet/pensando/ionic/ionic_phc.c
512
lif->phc->ptp = ptp_clock_register(&lif->phc->ptp_info, lif->ionic->dev);
drivers/net/ethernet/pensando/ionic/ionic_phc.c
514
if (IS_ERR(lif->phc->ptp)) {
drivers/net/ethernet/pensando/ionic/ionic_phc.c
516
PTR_ERR(lif->phc->ptp));
drivers/net/ethernet/pensando/ionic/ionic_phc.c
518
lif->phc->ptp = NULL;
drivers/net/ethernet/pensando/ionic/ionic_phc.c
521
if (lif->phc->ptp)
drivers/net/ethernet/pensando/ionic/ionic_phc.c
522
ptp_schedule_worker(lif->phc->ptp, lif->phc->aux_work_delay);
drivers/net/ethernet/pensando/ionic/ionic_phc.c
527
if (!lif->phc || !lif->phc->ptp)
drivers/net/ethernet/pensando/ionic/ionic_phc.c
530
ptp_clock_unregister(lif->phc->ptp);
drivers/net/ethernet/pensando/ionic/ionic_phc.c
532
lif->phc->ptp = NULL;
drivers/net/ethernet/pensando/ionic/ionic_phc.c
80
if (!lif->phc || !lif->phc->ptp)
drivers/net/ethernet/qlogic/qed/qed_l2.c
2886
.ptp = &qed_ptp_ops_pass,
drivers/net/ethernet/qlogic/qede/qede.h
180
struct qede_ptp *ptp;
drivers/net/ethernet/qlogic/qede/qede_main.c
2239
start.handle_ptp_pkts = !!(edev->ptp);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
103
struct qede_ptp *ptp;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
106
ptp = container_of(info, struct qede_ptp, clock_info);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
107
edev = ptp->edev;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
114
spin_lock_bh(&ptp->lock);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
115
timecounter_init(&ptp->tc, &ptp->cc, ns);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
116
spin_unlock_bh(&ptp->lock);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
127
struct qede_ptp *ptp;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
129
ptp = container_of(info, struct qede_ptp, clock_info);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
130
edev = ptp->edev;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
141
struct qede_ptp *ptp;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
146
ptp = container_of(work, struct qede_ptp, work);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
147
edev = ptp->edev;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
148
timedout = time_is_before_jiffies(ptp->ptp_tx_start +
drivers/net/ethernet/qlogic/qede/qede_ptp.c
152
spin_lock_bh(&ptp->lock);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
153
rc = ptp->ops->read_tx_ts(edev->cdev, &timestamp);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
154
spin_unlock_bh(&ptp->lock);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
158
dev_kfree_skb_any(ptp->tx_skb);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
159
ptp->tx_skb = NULL;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
165
schedule_work(&ptp->work);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
170
ns = timecounter_cyc2time(&ptp->tc, timestamp);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
173
skb_tstamp_tx(ptp->tx_skb, &shhwtstamps);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
174
dev_kfree_skb_any(ptp->tx_skb);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
175
ptp->tx_skb = NULL;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
187
struct qede_ptp *ptp;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
191
ptp = container_of(cc, struct qede_ptp, cc);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
192
edev = ptp->edev;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
193
rc = ptp->ops->read_cc(edev->cdev, &phc_cycles);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
206
struct qede_ptp *ptp = edev->ptp;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
208
if (!ptp->hw_ts_ioctl_called) {
drivers/net/ethernet/qlogic/qede/qede_ptp.c
213
switch (ptp->tx_type) {
drivers/net/ethernet/qlogic/qede/qede_ptp.c
225
spin_lock_bh(&ptp->lock);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
226
switch (ptp->rx_filter) {
drivers/net/ethernet/qlogic/qede/qede_ptp.c
233
ptp->rx_filter = HWTSTAMP_FILTER_NONE;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
237
ptp->rx_filter = HWTSTAMP_FILTER_PTP_V1_L4_EVENT;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
242
ptp->rx_filter = HWTSTAMP_FILTER_PTP_V1_L4_EVENT;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
247
ptp->rx_filter = HWTSTAMP_FILTER_PTP_V2_L4_EVENT;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
252
ptp->rx_filter = HWTSTAMP_FILTER_PTP_V2_L4_EVENT;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
257
ptp->rx_filter = HWTSTAMP_FILTER_PTP_V2_L2_EVENT;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
262
ptp->rx_filter = HWTSTAMP_FILTER_PTP_V2_L2_EVENT;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
267
ptp->rx_filter = HWTSTAMP_FILTER_PTP_V2_EVENT;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
272
ptp->rx_filter = HWTSTAMP_FILTER_PTP_V2_EVENT;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
278
ptp->ops->cfg_filters(edev->cdev, rx_filter, tx_type);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
280
spin_unlock_bh(&ptp->lock);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
288
struct qede_ptp *ptp;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
295
ptp = edev->ptp;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
296
if (!ptp) {
drivers/net/ethernet/qlogic/qede/qede_ptp.c
315
ptp->hw_ts_ioctl_called = 1;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
316
ptp->tx_type = config->tx_type;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
317
ptp->rx_filter = config->rx_filter;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
321
config->rx_filter = ptp->rx_filter;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
330
struct qede_ptp *ptp;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
332
ptp = edev->ptp;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
333
if (!ptp)
drivers/net/ethernet/qlogic/qede/qede_ptp.c
336
config->tx_type = ptp->tx_type;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
337
config->rx_filter = ptp->rx_filter;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
344
struct qede_ptp *ptp = edev->ptp;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
346
if (!ptp) {
drivers/net/ethernet/qlogic/qede/qede_ptp.c
357
if (ptp->clock)
drivers/net/ethernet/qlogic/qede/qede_ptp.c
358
info->phc_index = ptp_clock_index(ptp->clock);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
381
struct qede_ptp *ptp;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
383
ptp = edev->ptp;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
384
if (!ptp)
drivers/net/ethernet/qlogic/qede/qede_ptp.c
387
if (ptp->clock) {
drivers/net/ethernet/qlogic/qede/qede_ptp.c
388
ptp_clock_unregister(ptp->clock);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
389
ptp->clock = NULL;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
395
cancel_work_sync(&ptp->work);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
396
if (ptp->tx_skb) {
drivers/net/ethernet/qlogic/qede/qede_ptp.c
397
dev_kfree_skb_any(ptp->tx_skb);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
398
ptp->tx_skb = NULL;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
403
spin_lock_bh(&ptp->lock);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
404
ptp->ops->disable(edev->cdev);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
405
spin_unlock_bh(&ptp->lock);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
407
kfree(ptp);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
408
edev->ptp = NULL;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
413
struct qede_ptp *ptp;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
416
ptp = edev->ptp;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
417
if (!ptp)
drivers/net/ethernet/qlogic/qede/qede_ptp.c
42
struct qede_ptp *ptp = container_of(info, struct qede_ptp, clock_info);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
420
spin_lock_init(&ptp->lock);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
423
rc = ptp->ops->enable(edev->cdev);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
430
INIT_WORK(&ptp->work, qede_ptp_task);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
433
memset(&ptp->cc, 0, sizeof(ptp->cc));
drivers/net/ethernet/qlogic/qede/qede_ptp.c
434
ptp->cc.read = qede_ptp_read_cc;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
435
ptp->cc.mask = CYCLECOUNTER_MASK(64);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
436
ptp->cc.shift = 0;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
437
ptp->cc.mult = 1;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
439
timecounter_init(&ptp->tc, &ptp->cc, ktime_to_ns(ktime_get_real()));
drivers/net/ethernet/qlogic/qede/qede_ptp.c
44
struct qede_dev *edev = ptp->edev;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
446
struct qede_ptp *ptp;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
449
ptp = kzalloc_obj(*ptp);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
450
if (!ptp) {
drivers/net/ethernet/qlogic/qede/qede_ptp.c
455
ptp->edev = edev;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
456
ptp->ops = edev->ops->ptp;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
457
if (!ptp->ops) {
drivers/net/ethernet/qlogic/qede/qede_ptp.c
463
edev->ptp = ptp;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
472
ptp->clock_info.owner = THIS_MODULE;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
473
snprintf(ptp->clock_info.name, 16, "%s", edev->ndev->name);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
474
ptp->clock_info.max_adj = QED_MAX_PHC_DRIFT_PPB;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
475
ptp->clock_info.n_alarm = 0;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
476
ptp->clock_info.n_ext_ts = 0;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
477
ptp->clock_info.n_per_out = 0;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
478
ptp->clock_info.pps = 0;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
479
ptp->clock_info.adjfine = qede_ptp_adjfine;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
480
ptp->clock_info.adjtime = qede_ptp_adjtime;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
481
ptp->clock_info.gettime64 = qede_ptp_gettime;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
482
ptp->clock_info.settime64 = qede_ptp_settime;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
483
ptp->clock_info.enable = qede_ptp_ancillary_feature_enable;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
485
ptp->clock = ptp_clock_register(&ptp->clock_info, &edev->pdev->dev);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
486
if (IS_ERR(ptp->clock)) {
drivers/net/ethernet/qlogic/qede/qede_ptp.c
49
spin_lock_bh(&ptp->lock);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
496
kfree(ptp);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
498
edev->ptp = NULL;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
50
rc = ptp->ops->adjfreq(edev->cdev, ppb);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
505
struct qede_ptp *ptp;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
507
ptp = edev->ptp;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
508
if (!ptp)
drivers/net/ethernet/qlogic/qede/qede_ptp.c
51
spin_unlock_bh(&ptp->lock);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
523
} else if (unlikely(ptp->tx_skb)) {
drivers/net/ethernet/qlogic/qede/qede_ptp.c
531
ptp->tx_skb = skb_get(skb);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
532
ptp->ptp_tx_start = jiffies;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
533
schedule_work(&ptp->work);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
539
struct qede_ptp *ptp;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
543
ptp = edev->ptp;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
544
if (!ptp)
drivers/net/ethernet/qlogic/qede/qede_ptp.c
547
spin_lock_bh(&ptp->lock);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
548
rc = ptp->ops->read_rx_ts(edev->cdev, &timestamp);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
550
spin_unlock_bh(&ptp->lock);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
555
ns = timecounter_cyc2time(&ptp->tc, timestamp);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
556
spin_unlock_bh(&ptp->lock);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
64
struct qede_ptp *ptp;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
66
ptp = container_of(info, struct qede_ptp, clock_info);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
67
edev = ptp->edev;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
72
spin_lock_bh(&ptp->lock);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
73
timecounter_adjtime(&ptp->tc, delta);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
74
spin_unlock_bh(&ptp->lock);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
82
struct qede_ptp *ptp;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
85
ptp = container_of(info, struct qede_ptp, clock_info);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
86
edev = ptp->edev;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
88
spin_lock_bh(&ptp->lock);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
89
ns = timecounter_read(&ptp->tc);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
90
spin_unlock_bh(&ptp->lock);
drivers/net/ethernet/renesas/ravb.h
1111
struct ravb_ptp ptp;
drivers/net/ethernet/renesas/ravb_main.c
1770
info->phc_index = ptp_clock_index(priv->ptp.clock);
drivers/net/ethernet/renesas/ravb_ptp.c
100
addend = (u32)adjust_by_scaled_ppm(priv->ptp.default_addend,
drivers/net/ethernet/renesas/ravb_ptp.c
105
priv->ptp.current_addend = addend;
drivers/net/ethernet/renesas/ravb_ptp.c
120
static int ravb_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/net/ethernet/renesas/ravb_ptp.c
122
struct ravb_private *priv = container_of(ptp, struct ravb_private,
drivers/net/ethernet/renesas/ravb_ptp.c
123
ptp.info);
drivers/net/ethernet/renesas/ravb_ptp.c
141
static int ravb_ptp_gettime64(struct ptp_clock_info *ptp, struct timespec64 *ts)
drivers/net/ethernet/renesas/ravb_ptp.c
143
struct ravb_private *priv = container_of(ptp, struct ravb_private,
drivers/net/ethernet/renesas/ravb_ptp.c
144
ptp.info);
drivers/net/ethernet/renesas/ravb_ptp.c
155
static int ravb_ptp_settime64(struct ptp_clock_info *ptp,
drivers/net/ethernet/renesas/ravb_ptp.c
158
struct ravb_private *priv = container_of(ptp, struct ravb_private,
drivers/net/ethernet/renesas/ravb_ptp.c
159
ptp.info);
drivers/net/ethernet/renesas/ravb_ptp.c
170
static int ravb_ptp_extts(struct ptp_clock_info *ptp,
drivers/net/ethernet/renesas/ravb_ptp.c
173
struct ravb_private *priv = container_of(ptp, struct ravb_private,
drivers/net/ethernet/renesas/ravb_ptp.c
174
ptp.info);
drivers/net/ethernet/renesas/ravb_ptp.c
182
if (priv->ptp.extts[req->index] == on)
drivers/net/ethernet/renesas/ravb_ptp.c
184
priv->ptp.extts[req->index] = on;
drivers/net/ethernet/renesas/ravb_ptp.c
198
static int ravb_ptp_perout(struct ptp_clock_info *ptp,
drivers/net/ethernet/renesas/ravb_ptp.c
201
struct ravb_private *priv = container_of(ptp, struct ravb_private,
drivers/net/ethernet/renesas/ravb_ptp.c
202
ptp.info);
drivers/net/ethernet/renesas/ravb_ptp.c
233
perout = &priv->ptp.perout[req->index];
drivers/net/ethernet/renesas/ravb_ptp.c
247
perout = &priv->ptp.perout[req->index];
drivers/net/ethernet/renesas/ravb_ptp.c
261
static int ravb_ptp_enable(struct ptp_clock_info *ptp,
drivers/net/ethernet/renesas/ravb_ptp.c
266
return ravb_ptp_extts(ptp, &req->extts, on);
drivers/net/ethernet/renesas/ravb_ptp.c
268
return ravb_ptp_perout(ptp, &req->perout, on);
drivers/net/ethernet/renesas/ravb_ptp.c
301
ptp_clock_event(priv->ptp.clock, &event);
drivers/net/ethernet/renesas/ravb_ptp.c
304
struct ravb_ptp_perout *perout = priv->ptp.perout;
drivers/net/ethernet/renesas/ravb_ptp.c
320
priv->ptp.info = ravb_ptp_info;
drivers/net/ethernet/renesas/ravb_ptp.c
322
priv->ptp.default_addend = ravb_read(ndev, GTI);
drivers/net/ethernet/renesas/ravb_ptp.c
323
priv->ptp.current_addend = priv->ptp.default_addend;
drivers/net/ethernet/renesas/ravb_ptp.c
330
priv->ptp.clock = ptp_clock_register(&priv->ptp.info, &pdev->dev);
drivers/net/ethernet/renesas/ravb_ptp.c
340
ptp_clock_unregister(priv->ptp.clock);
drivers/net/ethernet/renesas/ravb_ptp.c
73
u32 gti_ns_plus_1 = (priv->ptp.current_addend >> 20) + 1;
drivers/net/ethernet/renesas/ravb_ptp.c
91
static int ravb_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/net/ethernet/renesas/ravb_ptp.c
93
struct ravb_private *priv = container_of(ptp, struct ravb_private,
drivers/net/ethernet/renesas/ravb_ptp.c
94
ptp.info);
drivers/net/ethernet/renesas/rcar_gen4_ptp.c
103
_rcar_gen4_ptp_settime(ptp, ts);
drivers/net/ethernet/renesas/rcar_gen4_ptp.c
109
static int rcar_gen4_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/net/ethernet/renesas/rcar_gen4_ptp.c
111
struct rcar_gen4_ptp_private *ptp_priv = ptp_to_priv(ptp);
drivers/net/ethernet/renesas/rcar_gen4_ptp.c
117
_rcar_gen4_ptp_gettime(ptp, &ts);
drivers/net/ethernet/renesas/rcar_gen4_ptp.c
120
_rcar_gen4_ptp_settime(ptp, &ts);
drivers/net/ethernet/renesas/rcar_gen4_ptp.c
126
static int rcar_gen4_ptp_enable(struct ptp_clock_info *ptp,
drivers/net/ethernet/renesas/rcar_gen4_ptp.c
184
struct rcar_gen4_ptp_private *ptp;
drivers/net/ethernet/renesas/rcar_gen4_ptp.c
186
ptp = devm_kzalloc(&pdev->dev, sizeof(*ptp), GFP_KERNEL);
drivers/net/ethernet/renesas/rcar_gen4_ptp.c
187
if (!ptp)
drivers/net/ethernet/renesas/rcar_gen4_ptp.c
190
ptp->info = rcar_gen4_ptp_info;
drivers/net/ethernet/renesas/rcar_gen4_ptp.c
192
ptp->addr = addr;
drivers/net/ethernet/renesas/rcar_gen4_ptp.c
194
return ptp;
drivers/net/ethernet/renesas/rcar_gen4_ptp.c
36
#define ptp_to_priv(ptp) container_of(ptp, struct rcar_gen4_ptp_private, info)
drivers/net/ethernet/renesas/rcar_gen4_ptp.c
38
static int rcar_gen4_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/net/ethernet/renesas/rcar_gen4_ptp.c
40
struct rcar_gen4_ptp_private *ptp_priv = ptp_to_priv(ptp);
drivers/net/ethernet/renesas/rcar_gen4_ptp.c
55
static void _rcar_gen4_ptp_gettime(struct ptp_clock_info *ptp,
drivers/net/ethernet/renesas/rcar_gen4_ptp.c
58
struct rcar_gen4_ptp_private *ptp_priv = ptp_to_priv(ptp);
drivers/net/ethernet/renesas/rcar_gen4_ptp.c
67
static int rcar_gen4_ptp_gettime(struct ptp_clock_info *ptp,
drivers/net/ethernet/renesas/rcar_gen4_ptp.c
70
struct rcar_gen4_ptp_private *ptp_priv = ptp_to_priv(ptp);
drivers/net/ethernet/renesas/rcar_gen4_ptp.c
74
_rcar_gen4_ptp_gettime(ptp, ts);
drivers/net/ethernet/renesas/rcar_gen4_ptp.c
81
static void _rcar_gen4_ptp_settime(struct ptp_clock_info *ptp,
drivers/net/ethernet/renesas/rcar_gen4_ptp.c
84
struct rcar_gen4_ptp_private *ptp_priv = ptp_to_priv(ptp);
drivers/net/ethernet/renesas/rcar_gen4_ptp.c
96
static int rcar_gen4_ptp_settime(struct ptp_clock_info *ptp,
drivers/net/ethernet/renesas/rcar_gen4_ptp.c
99
struct rcar_gen4_ptp_private *ptp_priv = ptp_to_priv(ptp);
drivers/net/ethernet/sfc/ptp.c
1005
ptp->host_time_pps = *last_time;
drivers/net/ethernet/sfc/ptp.c
1006
pps_sub_ts(&ptp->host_time_pps, delta);
drivers/net/ethernet/sfc/ptp.c
1014
struct efx_ptp_data *ptp = efx->ptp_data;
drivers/net/ethernet/sfc/ptp.c
1021
int *start = ptp->start.addr;
drivers/net/ethernet/sfc/ptp.c
1028
ptp->start.dma_addr);
drivers/net/ethernet/sfc/ptp.c
1044
++ptp->fast_syncs;
drivers/net/ethernet/sfc/ptp.c
1046
++ptp->sync_timeouts;
drivers/net/ethernet/sfc/ptp.c
1060
++ptp->good_syncs;
drivers/net/ethernet/sfc/ptp.c
1062
++ptp->no_time_syncs;
drivers/net/ethernet/sfc/ptp.c
1069
++ptp->bad_syncs;
drivers/net/ethernet/sfc/ptp.c
1179
struct efx_ptp_data *ptp = efx->ptp_data;
drivers/net/ethernet/sfc/ptp.c
1182
while ((skb = skb_dequeue(&ptp->rxq))) {
drivers/net/ethernet/sfc/ptp.c
1190
++ptp->rx_no_timestamp;
drivers/net/ethernet/sfc/ptp.c
1194
skb_queue_head(&ptp->rxq, skb);
drivers/net/ethernet/sfc/ptp.c
1256
struct efx_ptp_data *ptp = efx->ptp_data;
drivers/net/ethernet/sfc/ptp.c
1281
queue_delayed_work(ptp->workwq, &ptp->cleanup_work,
drivers/net/ethernet/sfc/ptp.c
1317
struct efx_ptp_data *ptp = efx->ptp_data;
drivers/net/ethernet/sfc/ptp.c
1324
return efx_ptp_insert_filter(efx, &ptp->rxfilters_mcast, &spec, 0);
drivers/net/ethernet/sfc/ptp.c
1329
struct efx_ptp_data *ptp = efx->ptp_data;
drivers/net/ethernet/sfc/ptp.c
1332
if (!ptp->channel || !list_empty(&ptp->rxfilters_mcast))
drivers/net/ethernet/sfc/ptp.c
1338
rc = efx_ptp_insert_ipv4_filter(efx, &ptp->rxfilters_mcast,
drivers/net/ethernet/sfc/ptp.c
1344
rc = efx_ptp_insert_ipv4_filter(efx, &ptp->rxfilters_mcast,
drivers/net/ethernet/sfc/ptp.c
1354
rc = efx_ptp_insert_ipv6_filter(efx, &ptp->rxfilters_mcast,
drivers/net/ethernet/sfc/ptp.c
1359
rc = efx_ptp_insert_ipv6_filter(efx, &ptp->rxfilters_mcast,
drivers/net/ethernet/sfc/ptp.c
1374
efx_ptp_remove_filters(efx, &ptp->rxfilters_mcast);
drivers/net/ethernet/sfc/ptp.c
1395
struct efx_ptp_data *ptp = efx->ptp_data;
drivers/net/ethernet/sfc/ptp.c
1407
rc = efx_ptp_insert_ipv4_filter(efx, &ptp->rxfilters_ucast,
drivers/net/ethernet/sfc/ptp.c
1412
rc = efx_ptp_insert_ipv4_filter(efx, &ptp->rxfilters_ucast,
drivers/net/ethernet/sfc/ptp.c
1418
rc = efx_ptp_insert_ipv6_filter(efx, &ptp->rxfilters_ucast,
drivers/net/ethernet/sfc/ptp.c
1423
rc = efx_ptp_insert_ipv6_filter(efx, &ptp->rxfilters_ucast,
drivers/net/ethernet/sfc/ptp.c
1435
struct efx_ptp_data *ptp = efx->ptp_data;
drivers/net/ethernet/sfc/ptp.c
1438
ptp->reset_required = false;
drivers/net/ethernet/sfc/ptp.c
1448
ptp->evt_frag_idx = 0;
drivers/net/ethernet/sfc/ptp.c
1449
ptp->current_adjfreq = 0;
drivers/net/ethernet/sfc/ptp.c
1454
efx_ptp_remove_filters(efx, &ptp->rxfilters_mcast);
drivers/net/ethernet/sfc/ptp.c
1460
struct efx_ptp_data *ptp = efx->ptp_data;
drivers/net/ethernet/sfc/ptp.c
1463
if (ptp == NULL)
drivers/net/ethernet/sfc/ptp.c
1468
efx_ptp_remove_filters(efx, &ptp->rxfilters_mcast);
drivers/net/ethernet/sfc/ptp.c
1469
efx_ptp_remove_filters(efx, &ptp->rxfilters_ucast);
drivers/net/ethernet/sfc/ptp.c
1487
struct efx_ptp_data *ptp =
drivers/net/ethernet/sfc/ptp.c
1489
struct efx_nic *efx = ptp->efx;
drivers/net/ethernet/sfc/ptp.c
1496
ptp_evt.pps_times = ptp->host_time_pps;
drivers/net/ethernet/sfc/ptp.c
1497
ptp_clock_event(ptp->phc_clock, &ptp_evt);
drivers/net/ethernet/sfc/ptp.c
1526
struct efx_ptp_data *ptp =
drivers/net/ethernet/sfc/ptp.c
1530
list_for_each_entry_safe(rxfilter, tmp, &ptp->rxfilters_ucast, list) {
drivers/net/ethernet/sfc/ptp.c
1532
efx_ptp_remove_one_filter(ptp->efx, rxfilter);
drivers/net/ethernet/sfc/ptp.c
1535
if (!list_empty(&ptp->rxfilters_ucast)) {
drivers/net/ethernet/sfc/ptp.c
1536
queue_delayed_work(ptp->workwq, &ptp->cleanup_work,
drivers/net/ethernet/sfc/ptp.c
1560
struct efx_ptp_data *ptp;
drivers/net/ethernet/sfc/ptp.c
1568
ptp = kzalloc_obj(struct efx_ptp_data);
drivers/net/ethernet/sfc/ptp.c
1569
efx->ptp_data = ptp;
drivers/net/ethernet/sfc/ptp.c
1573
ptp->efx = efx;
drivers/net/ethernet/sfc/ptp.c
1574
ptp->channel = channel;
drivers/net/ethernet/sfc/ptp.c
1576
rc = efx_nic_alloc_buffer(efx, &ptp->start, sizeof(int), GFP_KERNEL);
drivers/net/ethernet/sfc/ptp.c
1580
skb_queue_head_init(&ptp->rxq);
drivers/net/ethernet/sfc/ptp.c
1581
skb_queue_head_init(&ptp->txq);
drivers/net/ethernet/sfc/ptp.c
1582
ptp->workwq = create_singlethread_workqueue("sfc_ptp");
drivers/net/ethernet/sfc/ptp.c
1583
if (!ptp->workwq) {
drivers/net/ethernet/sfc/ptp.c
1589
ptp->xmit_skb = efx_ptp_xmit_skb_queue;
drivers/net/ethernet/sfc/ptp.c
1593
ptp->xmit_skb = efx_ptp_xmit_skb_mc;
drivers/net/ethernet/sfc/ptp.c
1596
INIT_WORK(&ptp->work, efx_ptp_worker);
drivers/net/ethernet/sfc/ptp.c
1597
INIT_DELAYED_WORK(&ptp->cleanup_work, efx_ptp_cleanup_worker);
drivers/net/ethernet/sfc/ptp.c
1598
ptp->config.flags = 0;
drivers/net/ethernet/sfc/ptp.c
1599
ptp->config.tx_type = HWTSTAMP_TX_OFF;
drivers/net/ethernet/sfc/ptp.c
1600
ptp->config.rx_filter = HWTSTAMP_FILTER_NONE;
drivers/net/ethernet/sfc/ptp.c
1601
INIT_LIST_HEAD(&ptp->rxfilters_mcast);
drivers/net/ethernet/sfc/ptp.c
1602
INIT_LIST_HEAD(&ptp->rxfilters_ucast);
drivers/net/ethernet/sfc/ptp.c
1616
ptp->phc_clock_info = efx_phc_clock_info;
drivers/net/ethernet/sfc/ptp.c
1617
ptp->phc_clock = ptp_clock_register(&ptp->phc_clock_info,
drivers/net/ethernet/sfc/ptp.c
1619
if (IS_ERR(ptp->phc_clock)) {
drivers/net/ethernet/sfc/ptp.c
1620
rc = PTR_ERR(ptp->phc_clock);
drivers/net/ethernet/sfc/ptp.c
1622
} else if (ptp->phc_clock) {
drivers/net/ethernet/sfc/ptp.c
1623
INIT_WORK(&ptp->pps_work, efx_ptp_pps_worker);
drivers/net/ethernet/sfc/ptp.c
1624
ptp->pps_workwq = create_singlethread_workqueue("sfc_pps");
drivers/net/ethernet/sfc/ptp.c
1625
if (!ptp->pps_workwq) {
drivers/net/ethernet/sfc/ptp.c
1631
ptp->nic_ts_enabled = false;
drivers/net/ethernet/sfc/ptp.c
1641
efx_nic_free_buffer(efx, &ptp->start);
drivers/net/ethernet/sfc/ptp.c
1738
struct efx_ptp_data *ptp = efx->ptp_data;
drivers/net/ethernet/sfc/ptp.c
1746
if (ptp->mode == MC_CMD_PTP_MODE_V1) {
drivers/net/ethernet/sfc/ptp.c
1779
skb_queue_tail(&ptp->rxq, skb);
drivers/net/ethernet/sfc/ptp.c
1780
queue_work(ptp->workwq, &ptp->work);
drivers/net/ethernet/sfc/ptp.c
1791
struct efx_ptp_data *ptp = efx->ptp_data;
drivers/net/ethernet/sfc/ptp.c
1793
skb_queue_tail(&ptp->txq, skb);
drivers/net/ethernet/sfc/ptp.c
1798
queue_work(ptp->workwq, &ptp->work);
drivers/net/ethernet/sfc/ptp.c
1864
struct efx_ptp_data *ptp = efx->ptp_data;
drivers/net/ethernet/sfc/ptp.c
1869
if (!ptp)
drivers/net/ethernet/sfc/ptp.c
1890
ts_info->rx_filters = ptp->efx->type->hwtstamp_filters;
drivers/net/ethernet/sfc/ptp.c
1916
struct efx_ptp_data *ptp = efx->ptp_data;
drivers/net/ethernet/sfc/ptp.c
1920
ptp->evt_frag_idx, expected_frag_len);
drivers/net/ethernet/sfc/ptp.c
1921
ptp->reset_required = true;
drivers/net/ethernet/sfc/ptp.c
1922
queue_work(ptp->workwq, &ptp->work);
drivers/net/ethernet/sfc/ptp.c
1925
static void ptp_event_fault(struct efx_nic *efx, struct efx_ptp_data *ptp)
drivers/net/ethernet/sfc/ptp.c
1927
int code = EFX_QWORD_FIELD(ptp->evt_frags[0], MCDI_EVENT_DATA);
drivers/net/ethernet/sfc/ptp.c
1928
if (ptp->evt_frag_idx != 1) {
drivers/net/ethernet/sfc/ptp.c
1936
static void ptp_event_pps(struct efx_nic *efx, struct efx_ptp_data *ptp)
drivers/net/ethernet/sfc/ptp.c
1938
if (ptp->nic_ts_enabled)
drivers/net/ethernet/sfc/ptp.c
1939
queue_work(ptp->pps_workwq, &ptp->pps_work);
drivers/net/ethernet/sfc/ptp.c
1944
struct efx_ptp_data *ptp = efx->ptp_data;
drivers/net/ethernet/sfc/ptp.c
1947
if (!ptp) {
drivers/net/ethernet/sfc/ptp.c
1956
if (!ptp->enabled)
drivers/net/ethernet/sfc/ptp.c
1959
if (ptp->evt_frag_idx == 0) {
drivers/net/ethernet/sfc/ptp.c
1960
ptp->evt_code = code;
drivers/net/ethernet/sfc/ptp.c
1961
} else if (ptp->evt_code != code) {
drivers/net/ethernet/sfc/ptp.c
1964
ptp->evt_frag_idx = 0;
drivers/net/ethernet/sfc/ptp.c
1967
ptp->evt_frags[ptp->evt_frag_idx++] = *ev;
drivers/net/ethernet/sfc/ptp.c
1972
ptp_event_fault(efx, ptp);
drivers/net/ethernet/sfc/ptp.c
1975
ptp_event_pps(efx, ptp);
drivers/net/ethernet/sfc/ptp.c
1982
ptp->evt_frag_idx = 0;
drivers/net/ethernet/sfc/ptp.c
1983
} else if (MAX_EVENT_FRAGS == ptp->evt_frag_idx) {
drivers/net/ethernet/sfc/ptp.c
1986
ptp->evt_frag_idx = 0;
drivers/net/ethernet/sfc/ptp.c
1993
struct efx_ptp_data *ptp = efx->ptp_data;
drivers/net/ethernet/sfc/ptp.c
2004
<< ptp->nic_time.sync_event_minor_shift;
drivers/net/ethernet/sfc/ptp.c
2030
struct efx_ptp_data *ptp = efx->ptp_data;
drivers/net/ethernet/sfc/ptp.c
2045
diff += ptp->nic_time.minor_max;
drivers/net/ethernet/sfc/ptp.c
2048
carry = (channel->sync_timestamp_minor >= ptp->nic_time.minor_max - diff) ?
drivers/net/ethernet/sfc/ptp.c
2051
if (diff <= ptp->nic_time.sync_event_diff_max) {
drivers/net/ethernet/sfc/ptp.c
2056
} else if (diff >= ptp->nic_time.sync_event_diff_min) {
drivers/net/ethernet/sfc/ptp.c
2078
ptp->nic_to_kernel_time(pkt_timestamp_major,
drivers/net/ethernet/sfc/ptp.c
2080
ptp->ts_corrections.general_rx);
drivers/net/ethernet/sfc/ptp.c
2083
static int efx_phc_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/net/ethernet/sfc/ptp.c
2085
struct efx_ptp_data *ptp_data = container_of(ptp,
drivers/net/ethernet/sfc/ptp.c
2118
static int efx_phc_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/net/ethernet/sfc/ptp.c
2121
struct efx_ptp_data *ptp_data = container_of(ptp,
drivers/net/ethernet/sfc/ptp.c
2138
static int efx_phc_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts)
drivers/net/ethernet/sfc/ptp.c
2140
struct efx_ptp_data *ptp_data = container_of(ptp,
drivers/net/ethernet/sfc/ptp.c
2164
static int efx_phc_settime(struct ptp_clock_info *ptp,
drivers/net/ethernet/sfc/ptp.c
2175
rc = efx_phc_gettime(ptp, &time_now);
drivers/net/ethernet/sfc/ptp.c
2181
rc = efx_phc_adjtime(ptp, timespec64_to_ns(&delta));
drivers/net/ethernet/sfc/ptp.c
2188
static int efx_phc_enable(struct ptp_clock_info *ptp,
drivers/net/ethernet/sfc/ptp.c
2192
struct efx_ptp_data *ptp_data = container_of(ptp,
drivers/net/ethernet/sfc/ptp.c
354
static int efx_phc_adjfine(struct ptp_clock_info *ptp, long scaled_ppm);
drivers/net/ethernet/sfc/ptp.c
355
static int efx_phc_adjtime(struct ptp_clock_info *ptp, s64 delta);
drivers/net/ethernet/sfc/ptp.c
356
static int efx_phc_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts);
drivers/net/ethernet/sfc/ptp.c
357
static int efx_phc_settime(struct ptp_clock_info *ptp,
drivers/net/ethernet/sfc/ptp.c
359
static int efx_phc_enable(struct ptp_clock_info *ptp,
drivers/net/ethernet/sfc/ptp.c
552
struct efx_ptp_data *ptp,
drivers/net/ethernet/sfc/ptp.c
596
kt = ptp->nic_to_kernel_time(nic_major, nic_minor,
drivers/net/ethernet/sfc/ptp.c
605
struct efx_ptp_data *ptp = efx->ptp_data;
drivers/net/ethernet/sfc/ptp.c
609
kt = efx_ptp_mac_nic_to_ktime_correction(efx, ptp,
drivers/net/ethernet/sfc/ptp.c
612
ptp->ts_corrections.general_tx);
drivers/net/ethernet/sfc/ptp.c
614
kt = ptp->nic_to_kernel_time(
drivers/net/ethernet/sfc/ptp.c
617
ptp->ts_corrections.general_tx);
drivers/net/ethernet/sfc/ptp.c
626
struct efx_ptp_data *ptp = efx->ptp_data;
drivers/net/ethernet/sfc/ptp.c
654
ptp->ns_to_nic_time = efx_ptp_ns_to_s27;
drivers/net/ethernet/sfc/ptp.c
655
ptp->nic_to_kernel_time = efx_ptp_s27_to_ktime_correction;
drivers/net/ethernet/sfc/ptp.c
656
ptp->nic_time.minor_max = 1 << 27;
drivers/net/ethernet/sfc/ptp.c
657
ptp->nic_time.sync_event_minor_shift = 19;
drivers/net/ethernet/sfc/ptp.c
660
ptp->ns_to_nic_time = efx_ptp_ns_to_s_qns;
drivers/net/ethernet/sfc/ptp.c
661
ptp->nic_to_kernel_time = efx_ptp_s_qns_to_ktime_correction;
drivers/net/ethernet/sfc/ptp.c
662
ptp->nic_time.minor_max = 4000000000UL;
drivers/net/ethernet/sfc/ptp.c
663
ptp->nic_time.sync_event_minor_shift = 24;
drivers/net/ethernet/sfc/ptp.c
675
ptp->nic_time.sync_event_diff_min = ptp->nic_time.minor_max
drivers/net/ethernet/sfc/ptp.c
676
- (ptp->nic_time.minor_max / 10);
drivers/net/ethernet/sfc/ptp.c
677
ptp->nic_time.sync_event_diff_max = (ptp->nic_time.minor_max / 4)
drivers/net/ethernet/sfc/ptp.c
678
+ (ptp->nic_time.minor_max / 10);
drivers/net/ethernet/sfc/ptp.c
689
ptp->min_synchronisation_ns =
drivers/net/ethernet/sfc/ptp.c
693
ptp->min_synchronisation_ns = DEFAULT_MIN_SYNCHRONISATION_NS;
drivers/net/ethernet/sfc/ptp.c
697
ptp->capabilities = MCDI_DWORD(outbuf,
drivers/net/ethernet/sfc/ptp.c
700
ptp->capabilities = 0;
drivers/net/ethernet/sfc/ptp.c
706
if (ptp->capabilities & (1 << MC_CMD_PTP_OUT_GET_ATTRIBUTES_FP44_FREQ_ADJ_LBN))
drivers/net/ethernet/sfc/ptp.c
707
ptp->adjfreq_ppb_shift = PPB_SHIFT_FP44;
drivers/net/ethernet/sfc/ptp.c
709
ptp->adjfreq_ppb_shift = PPB_SHIFT_FP40;
drivers/net/ethernet/sfc/ptp.c
848
struct efx_ptp_data *ptp = efx->ptp_data;
drivers/net/ethernet/sfc/ptp.c
849
int *mc_running = ptp->start.addr;
drivers/net/ethernet/sfc/ptp.c
919
struct efx_ptp_data *ptp = efx->ptp_data;
drivers/net/ethernet/sfc/ptp.c
941
&ptp->timeset[i]);
drivers/net/ethernet/sfc/ptp.c
944
ptp->nic_to_kernel_time(0, ptp->timeset[i].wait, 0));
drivers/net/ethernet/sfc/ptp.c
945
window = ptp->timeset[i].window;
drivers/net/ethernet/sfc/ptp.c
958
++ptp->invalid_sync_windows;
drivers/net/ethernet/sfc/ptp.c
960
++ptp->oversize_sync_windows;
drivers/net/ethernet/sfc/ptp.c
961
} else if (corrected < ptp->min_synchronisation_ns) {
drivers/net/ethernet/sfc/ptp.c
962
++ptp->undersize_sync_windows;
drivers/net/ethernet/sfc/ptp.c
981
start_sec = ptp->timeset[last_good].host_start >> MC_NANOSECOND_BITS;
drivers/net/ethernet/sfc/ptp.c
992
(ptp->timeset[last_good].host_start & MC_NANOSECOND_MASK);
drivers/net/ethernet/sfc/ptp.c
998
mc_time = ptp->nic_to_kernel_time(ptp->timeset[last_good].major,
drivers/net/ethernet/sfc/ptp.c
999
ptp->timeset[last_good].minor, 0);
drivers/net/ethernet/sfc/siena/ptp.c
1005
(ptp->timeset[last_good].host_start & MC_NANOSECOND_MASK);
drivers/net/ethernet/sfc/siena/ptp.c
1011
mc_time = ptp->nic_to_kernel_time(ptp->timeset[last_good].major,
drivers/net/ethernet/sfc/siena/ptp.c
1012
ptp->timeset[last_good].minor, 0);
drivers/net/ethernet/sfc/siena/ptp.c
1018
ptp->host_time_pps = *last_time;
drivers/net/ethernet/sfc/siena/ptp.c
1019
pps_sub_ts(&ptp->host_time_pps, delta);
drivers/net/ethernet/sfc/siena/ptp.c
1027
struct efx_ptp_data *ptp = efx->ptp_data;
drivers/net/ethernet/sfc/siena/ptp.c
1034
int *start = ptp->start.addr;
drivers/net/ethernet/sfc/siena/ptp.c
1041
ptp->start.dma_addr);
drivers/net/ethernet/sfc/siena/ptp.c
1057
++ptp->fast_syncs;
drivers/net/ethernet/sfc/siena/ptp.c
1059
++ptp->sync_timeouts;
drivers/net/ethernet/sfc/siena/ptp.c
1073
++ptp->good_syncs;
drivers/net/ethernet/sfc/siena/ptp.c
1075
++ptp->no_time_syncs;
drivers/net/ethernet/sfc/siena/ptp.c
1082
++ptp->bad_syncs;
drivers/net/ethernet/sfc/siena/ptp.c
1154
struct efx_ptp_data *ptp = efx->ptp_data;
drivers/net/ethernet/sfc/siena/ptp.c
1158
if (ptp->rx_ts_inline)
drivers/net/ethernet/sfc/siena/ptp.c
1162
spin_lock_bh(&ptp->evt_lock);
drivers/net/ethernet/sfc/siena/ptp.c
1163
list_for_each_safe(cursor, next, &ptp->evt_list) {
drivers/net/ethernet/sfc/siena/ptp.c
1169
list_move(&evt->link, &ptp->evt_free_list);
drivers/net/ethernet/sfc/siena/ptp.c
1174
spin_unlock_bh(&ptp->evt_lock);
drivers/net/ethernet/sfc/siena/ptp.c
1180
struct efx_ptp_data *ptp = efx->ptp_data;
drivers/net/ethernet/sfc/siena/ptp.c
1187
WARN_ON_ONCE(ptp->rx_ts_inline);
drivers/net/ethernet/sfc/siena/ptp.c
1189
spin_lock_bh(&ptp->evt_lock);
drivers/net/ethernet/sfc/siena/ptp.c
1190
evts_waiting = !list_empty(&ptp->evt_list);
drivers/net/ethernet/sfc/siena/ptp.c
1191
spin_unlock_bh(&ptp->evt_lock);
drivers/net/ethernet/sfc/siena/ptp.c
1198
spin_lock_bh(&ptp->evt_lock);
drivers/net/ethernet/sfc/siena/ptp.c
1199
list_for_each_safe(cursor, next, &ptp->evt_list) {
drivers/net/ethernet/sfc/siena/ptp.c
1213
list_move(&evt->link, &ptp->evt_free_list);
drivers/net/ethernet/sfc/siena/ptp.c
1217
spin_unlock_bh(&ptp->evt_lock);
drivers/net/ethernet/sfc/siena/ptp.c
1228
struct efx_ptp_data *ptp = efx->ptp_data;
drivers/net/ethernet/sfc/siena/ptp.c
1231
while ((skb = skb_dequeue(&ptp->rxq))) {
drivers/net/ethernet/sfc/siena/ptp.c
1242
++ptp->rx_no_timestamp;
drivers/net/ethernet/sfc/siena/ptp.c
1246
skb_queue_head(&ptp->rxq, skb);
drivers/net/ethernet/sfc/siena/ptp.c
1262
struct efx_ptp_data *ptp = efx->ptp_data;
drivers/net/ethernet/sfc/siena/ptp.c
1264
if (ptp->rxfilter_installed) {
drivers/net/ethernet/sfc/siena/ptp.c
1266
ptp->rxfilter_general);
drivers/net/ethernet/sfc/siena/ptp.c
1268
ptp->rxfilter_event);
drivers/net/ethernet/sfc/siena/ptp.c
1269
ptp->rxfilter_installed = false;
drivers/net/ethernet/sfc/siena/ptp.c
1275
struct efx_ptp_data *ptp = efx->ptp_data;
drivers/net/ethernet/sfc/siena/ptp.c
1279
if (!ptp->channel || ptp->rxfilter_installed)
drivers/net/ethernet/sfc/siena/ptp.c
1287
efx_channel_get_rx_queue(ptp->channel)));
drivers/net/ethernet/sfc/siena/ptp.c
1297
ptp->rxfilter_event = rc;
drivers/net/ethernet/sfc/siena/ptp.c
1301
efx_channel_get_rx_queue(ptp->channel)));
drivers/net/ethernet/sfc/siena/ptp.c
1311
ptp->rxfilter_general = rc;
drivers/net/ethernet/sfc/siena/ptp.c
1313
ptp->rxfilter_installed = true;
drivers/net/ethernet/sfc/siena/ptp.c
1318
ptp->rxfilter_event);
drivers/net/ethernet/sfc/siena/ptp.c
1324
struct efx_ptp_data *ptp = efx->ptp_data;
drivers/net/ethernet/sfc/siena/ptp.c
1327
ptp->reset_required = false;
drivers/net/ethernet/sfc/siena/ptp.c
1337
ptp->evt_frag_idx = 0;
drivers/net/ethernet/sfc/siena/ptp.c
1338
ptp->current_adjfreq = 0;
drivers/net/ethernet/sfc/siena/ptp.c
1349
struct efx_ptp_data *ptp = efx->ptp_data;
drivers/net/ethernet/sfc/siena/ptp.c
1354
if (ptp == NULL)
drivers/net/ethernet/sfc/siena/ptp.c
1384
struct efx_ptp_data *ptp =
drivers/net/ethernet/sfc/siena/ptp.c
1386
struct efx_nic *efx = ptp->efx;
drivers/net/ethernet/sfc/siena/ptp.c
1393
ptp_evt.pps_times = ptp->host_time_pps;
drivers/net/ethernet/sfc/siena/ptp.c
1394
ptp_clock_event(ptp->phc_clock, &ptp_evt);
drivers/net/ethernet/sfc/siena/ptp.c
1442
struct efx_ptp_data *ptp;
drivers/net/ethernet/sfc/siena/ptp.c
1446
ptp = kzalloc_obj(struct efx_ptp_data);
drivers/net/ethernet/sfc/siena/ptp.c
1447
efx->ptp_data = ptp;
drivers/net/ethernet/sfc/siena/ptp.c
1451
ptp->efx = efx;
drivers/net/ethernet/sfc/siena/ptp.c
1452
ptp->channel = channel;
drivers/net/ethernet/sfc/siena/ptp.c
1453
ptp->rx_ts_inline = efx_nic_rev(efx) >= EFX_REV_HUNT_A0;
drivers/net/ethernet/sfc/siena/ptp.c
1455
rc = efx_siena_alloc_buffer(efx, &ptp->start, sizeof(int), GFP_KERNEL);
drivers/net/ethernet/sfc/siena/ptp.c
1459
skb_queue_head_init(&ptp->rxq);
drivers/net/ethernet/sfc/siena/ptp.c
1460
skb_queue_head_init(&ptp->txq);
drivers/net/ethernet/sfc/siena/ptp.c
1461
ptp->workwq = create_singlethread_workqueue("sfc_siena_ptp");
drivers/net/ethernet/sfc/siena/ptp.c
1462
if (!ptp->workwq) {
drivers/net/ethernet/sfc/siena/ptp.c
1468
ptp->xmit_skb = efx_ptp_xmit_skb_queue;
drivers/net/ethernet/sfc/siena/ptp.c
1472
ptp->xmit_skb = efx_ptp_xmit_skb_mc;
drivers/net/ethernet/sfc/siena/ptp.c
1475
INIT_WORK(&ptp->work, efx_ptp_worker);
drivers/net/ethernet/sfc/siena/ptp.c
1476
ptp->config.flags = 0;
drivers/net/ethernet/sfc/siena/ptp.c
1477
ptp->config.tx_type = HWTSTAMP_TX_OFF;
drivers/net/ethernet/sfc/siena/ptp.c
1478
ptp->config.rx_filter = HWTSTAMP_FILTER_NONE;
drivers/net/ethernet/sfc/siena/ptp.c
1479
INIT_LIST_HEAD(&ptp->evt_list);
drivers/net/ethernet/sfc/siena/ptp.c
1480
INIT_LIST_HEAD(&ptp->evt_free_list);
drivers/net/ethernet/sfc/siena/ptp.c
1481
spin_lock_init(&ptp->evt_lock);
drivers/net/ethernet/sfc/siena/ptp.c
1483
list_add(&ptp->rx_evts[pos].link, &ptp->evt_free_list);
drivers/net/ethernet/sfc/siena/ptp.c
1497
ptp->phc_clock_info = efx_phc_clock_info;
drivers/net/ethernet/sfc/siena/ptp.c
1498
ptp->phc_clock = ptp_clock_register(&ptp->phc_clock_info,
drivers/net/ethernet/sfc/siena/ptp.c
1500
if (IS_ERR(ptp->phc_clock)) {
drivers/net/ethernet/sfc/siena/ptp.c
1501
rc = PTR_ERR(ptp->phc_clock);
drivers/net/ethernet/sfc/siena/ptp.c
1503
} else if (ptp->phc_clock) {
drivers/net/ethernet/sfc/siena/ptp.c
1504
INIT_WORK(&ptp->pps_work, efx_ptp_pps_worker);
drivers/net/ethernet/sfc/siena/ptp.c
1505
ptp->pps_workwq =
drivers/net/ethernet/sfc/siena/ptp.c
1507
if (!ptp->pps_workwq) {
drivers/net/ethernet/sfc/siena/ptp.c
1513
ptp->nic_ts_enabled = false;
drivers/net/ethernet/sfc/siena/ptp.c
1523
efx_siena_free_buffer(efx, &ptp->start);
drivers/net/ethernet/sfc/siena/ptp.c
1619
struct efx_ptp_data *ptp = efx->ptp_data;
drivers/net/ethernet/sfc/siena/ptp.c
1628
if (ptp->mode == MC_CMD_PTP_MODE_V1) {
drivers/net/ethernet/sfc/siena/ptp.c
1661
if (ptp->mode == MC_CMD_PTP_MODE_V2) {
drivers/net/ethernet/sfc/siena/ptp.c
1665
BUG_ON(ptp->mode != MC_CMD_PTP_MODE_V2_ENHANCED);
drivers/net/ethernet/sfc/siena/ptp.c
1693
skb_queue_tail(&ptp->rxq, skb);
drivers/net/ethernet/sfc/siena/ptp.c
1694
queue_work(ptp->workwq, &ptp->work);
drivers/net/ethernet/sfc/siena/ptp.c
1705
struct efx_ptp_data *ptp = efx->ptp_data;
drivers/net/ethernet/sfc/siena/ptp.c
1707
skb_queue_tail(&ptp->txq, skb);
drivers/net/ethernet/sfc/siena/ptp.c
1712
queue_work(ptp->workwq, &ptp->work);
drivers/net/ethernet/sfc/siena/ptp.c
1785
struct efx_ptp_data *ptp = efx->ptp_data;
drivers/net/ethernet/sfc/siena/ptp.c
1790
if (!ptp)
drivers/net/ethernet/sfc/siena/ptp.c
1800
ts_info->rx_filters = ptp->efx->type->hwtstamp_filters;
drivers/net/ethernet/sfc/siena/ptp.c
1827
struct efx_ptp_data *ptp = efx->ptp_data;
drivers/net/ethernet/sfc/siena/ptp.c
1831
ptp->evt_frag_idx, expected_frag_len);
drivers/net/ethernet/sfc/siena/ptp.c
1832
ptp->reset_required = true;
drivers/net/ethernet/sfc/siena/ptp.c
1833
queue_work(ptp->workwq, &ptp->work);
drivers/net/ethernet/sfc/siena/ptp.c
1840
static void ptp_event_rx(struct efx_nic *efx, struct efx_ptp_data *ptp)
drivers/net/ethernet/sfc/siena/ptp.c
1844
if (WARN_ON_ONCE(ptp->rx_ts_inline))
drivers/net/ethernet/sfc/siena/ptp.c
1847
if (ptp->evt_frag_idx != 3) {
drivers/net/ethernet/sfc/siena/ptp.c
1852
spin_lock_bh(&ptp->evt_lock);
drivers/net/ethernet/sfc/siena/ptp.c
1853
if (!list_empty(&ptp->evt_free_list)) {
drivers/net/ethernet/sfc/siena/ptp.c
1854
evt = list_first_entry(&ptp->evt_free_list,
drivers/net/ethernet/sfc/siena/ptp.c
1858
evt->seq0 = EFX_QWORD_FIELD(ptp->evt_frags[2], MCDI_EVENT_DATA);
drivers/net/ethernet/sfc/siena/ptp.c
1859
evt->seq1 = (EFX_QWORD_FIELD(ptp->evt_frags[2],
drivers/net/ethernet/sfc/siena/ptp.c
1861
(EFX_QWORD_FIELD(ptp->evt_frags[1],
drivers/net/ethernet/sfc/siena/ptp.c
1863
(EFX_QWORD_FIELD(ptp->evt_frags[0],
drivers/net/ethernet/sfc/siena/ptp.c
1866
EFX_QWORD_FIELD(ptp->evt_frags[0], MCDI_EVENT_DATA),
drivers/net/ethernet/sfc/siena/ptp.c
1867
EFX_QWORD_FIELD(ptp->evt_frags[1], MCDI_EVENT_DATA),
drivers/net/ethernet/sfc/siena/ptp.c
1868
ptp->ts_corrections.ptp_rx);
drivers/net/ethernet/sfc/siena/ptp.c
1870
list_add_tail(&evt->link, &ptp->evt_list);
drivers/net/ethernet/sfc/siena/ptp.c
1872
queue_work(ptp->workwq, &ptp->work);
drivers/net/ethernet/sfc/siena/ptp.c
1877
spin_unlock_bh(&ptp->evt_lock);
drivers/net/ethernet/sfc/siena/ptp.c
1880
static void ptp_event_fault(struct efx_nic *efx, struct efx_ptp_data *ptp)
drivers/net/ethernet/sfc/siena/ptp.c
1882
int code = EFX_QWORD_FIELD(ptp->evt_frags[0], MCDI_EVENT_DATA);
drivers/net/ethernet/sfc/siena/ptp.c
1883
if (ptp->evt_frag_idx != 1) {
drivers/net/ethernet/sfc/siena/ptp.c
1891
static void ptp_event_pps(struct efx_nic *efx, struct efx_ptp_data *ptp)
drivers/net/ethernet/sfc/siena/ptp.c
1893
if (ptp->nic_ts_enabled)
drivers/net/ethernet/sfc/siena/ptp.c
1894
queue_work(ptp->pps_workwq, &ptp->pps_work);
drivers/net/ethernet/sfc/siena/ptp.c
1899
struct efx_ptp_data *ptp = efx->ptp_data;
drivers/net/ethernet/sfc/siena/ptp.c
1902
if (!ptp) {
drivers/net/ethernet/sfc/siena/ptp.c
1911
if (!ptp->enabled)
drivers/net/ethernet/sfc/siena/ptp.c
1914
if (ptp->evt_frag_idx == 0) {
drivers/net/ethernet/sfc/siena/ptp.c
1915
ptp->evt_code = code;
drivers/net/ethernet/sfc/siena/ptp.c
1916
} else if (ptp->evt_code != code) {
drivers/net/ethernet/sfc/siena/ptp.c
1919
ptp->evt_frag_idx = 0;
drivers/net/ethernet/sfc/siena/ptp.c
1922
ptp->evt_frags[ptp->evt_frag_idx++] = *ev;
drivers/net/ethernet/sfc/siena/ptp.c
1927
ptp_event_rx(efx, ptp);
drivers/net/ethernet/sfc/siena/ptp.c
1930
ptp_event_fault(efx, ptp);
drivers/net/ethernet/sfc/siena/ptp.c
1933
ptp_event_pps(efx, ptp);
drivers/net/ethernet/sfc/siena/ptp.c
1940
ptp->evt_frag_idx = 0;
drivers/net/ethernet/sfc/siena/ptp.c
1941
} else if (MAX_EVENT_FRAGS == ptp->evt_frag_idx) {
drivers/net/ethernet/sfc/siena/ptp.c
1944
ptp->evt_frag_idx = 0;
drivers/net/ethernet/sfc/siena/ptp.c
1951
struct efx_ptp_data *ptp = efx->ptp_data;
drivers/net/ethernet/sfc/siena/ptp.c
1962
<< ptp->nic_time.sync_event_minor_shift;
drivers/net/ethernet/sfc/siena/ptp.c
1988
struct efx_ptp_data *ptp = efx->ptp_data;
drivers/net/ethernet/sfc/siena/ptp.c
2003
diff += ptp->nic_time.minor_max;
drivers/net/ethernet/sfc/siena/ptp.c
2006
carry = (channel->sync_timestamp_minor >= ptp->nic_time.minor_max - diff) ?
drivers/net/ethernet/sfc/siena/ptp.c
2009
if (diff <= ptp->nic_time.sync_event_diff_max) {
drivers/net/ethernet/sfc/siena/ptp.c
2014
} else if (diff >= ptp->nic_time.sync_event_diff_min) {
drivers/net/ethernet/sfc/siena/ptp.c
2036
ptp->nic_to_kernel_time(pkt_timestamp_major,
drivers/net/ethernet/sfc/siena/ptp.c
2038
ptp->ts_corrections.general_rx);
drivers/net/ethernet/sfc/siena/ptp.c
2041
static int efx_phc_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/net/ethernet/sfc/siena/ptp.c
2043
struct efx_ptp_data *ptp_data = container_of(ptp,
drivers/net/ethernet/sfc/siena/ptp.c
2076
static int efx_phc_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/net/ethernet/sfc/siena/ptp.c
2079
struct efx_ptp_data *ptp_data = container_of(ptp,
drivers/net/ethernet/sfc/siena/ptp.c
2096
static int efx_phc_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts)
drivers/net/ethernet/sfc/siena/ptp.c
2098
struct efx_ptp_data *ptp_data = container_of(ptp,
drivers/net/ethernet/sfc/siena/ptp.c
2122
static int efx_phc_settime(struct ptp_clock_info *ptp,
drivers/net/ethernet/sfc/siena/ptp.c
2133
rc = efx_phc_gettime(ptp, &time_now);
drivers/net/ethernet/sfc/siena/ptp.c
2139
rc = efx_phc_adjtime(ptp, timespec64_to_ns(&delta));
drivers/net/ethernet/sfc/siena/ptp.c
2146
static int efx_phc_enable(struct ptp_clock_info *ptp,
drivers/net/ethernet/sfc/siena/ptp.c
2150
struct efx_ptp_data *ptp_data = container_of(ptp,
drivers/net/ethernet/sfc/siena/ptp.c
350
static int efx_phc_adjfine(struct ptp_clock_info *ptp, long scaled_ppm);
drivers/net/ethernet/sfc/siena/ptp.c
351
static int efx_phc_adjtime(struct ptp_clock_info *ptp, s64 delta);
drivers/net/ethernet/sfc/siena/ptp.c
352
static int efx_phc_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts);
drivers/net/ethernet/sfc/siena/ptp.c
353
static int efx_phc_settime(struct ptp_clock_info *ptp,
drivers/net/ethernet/sfc/siena/ptp.c
355
static int efx_phc_enable(struct ptp_clock_info *ptp,
drivers/net/ethernet/sfc/siena/ptp.c
559
struct efx_ptp_data *ptp,
drivers/net/ethernet/sfc/siena/ptp.c
603
kt = ptp->nic_to_kernel_time(nic_major, nic_minor,
drivers/net/ethernet/sfc/siena/ptp.c
612
struct efx_ptp_data *ptp = efx->ptp_data;
drivers/net/ethernet/sfc/siena/ptp.c
616
kt = efx_ptp_mac_nic_to_ktime_correction(efx, ptp,
drivers/net/ethernet/sfc/siena/ptp.c
619
ptp->ts_corrections.general_tx);
drivers/net/ethernet/sfc/siena/ptp.c
621
kt = ptp->nic_to_kernel_time(
drivers/net/ethernet/sfc/siena/ptp.c
624
ptp->ts_corrections.general_tx);
drivers/net/ethernet/sfc/siena/ptp.c
633
struct efx_ptp_data *ptp = efx->ptp_data;
drivers/net/ethernet/sfc/siena/ptp.c
661
ptp->ns_to_nic_time = efx_ptp_ns_to_s27;
drivers/net/ethernet/sfc/siena/ptp.c
662
ptp->nic_to_kernel_time = efx_ptp_s27_to_ktime_correction;
drivers/net/ethernet/sfc/siena/ptp.c
663
ptp->nic_time.minor_max = 1 << 27;
drivers/net/ethernet/sfc/siena/ptp.c
664
ptp->nic_time.sync_event_minor_shift = 19;
drivers/net/ethernet/sfc/siena/ptp.c
667
ptp->ns_to_nic_time = efx_ptp_ns_to_s_ns;
drivers/net/ethernet/sfc/siena/ptp.c
668
ptp->nic_to_kernel_time = efx_ptp_s_ns_to_ktime_correction;
drivers/net/ethernet/sfc/siena/ptp.c
669
ptp->nic_time.minor_max = 1000000000;
drivers/net/ethernet/sfc/siena/ptp.c
670
ptp->nic_time.sync_event_minor_shift = 22;
drivers/net/ethernet/sfc/siena/ptp.c
673
ptp->ns_to_nic_time = efx_ptp_ns_to_s_qns;
drivers/net/ethernet/sfc/siena/ptp.c
674
ptp->nic_to_kernel_time = efx_ptp_s_qns_to_ktime_correction;
drivers/net/ethernet/sfc/siena/ptp.c
675
ptp->nic_time.minor_max = 4000000000UL;
drivers/net/ethernet/sfc/siena/ptp.c
676
ptp->nic_time.sync_event_minor_shift = 24;
drivers/net/ethernet/sfc/siena/ptp.c
688
ptp->nic_time.sync_event_diff_min = ptp->nic_time.minor_max
drivers/net/ethernet/sfc/siena/ptp.c
689
- (ptp->nic_time.minor_max / 10);
drivers/net/ethernet/sfc/siena/ptp.c
690
ptp->nic_time.sync_event_diff_max = (ptp->nic_time.minor_max / 4)
drivers/net/ethernet/sfc/siena/ptp.c
691
+ (ptp->nic_time.minor_max / 10);
drivers/net/ethernet/sfc/siena/ptp.c
702
ptp->min_synchronisation_ns =
drivers/net/ethernet/sfc/siena/ptp.c
706
ptp->min_synchronisation_ns = DEFAULT_MIN_SYNCHRONISATION_NS;
drivers/net/ethernet/sfc/siena/ptp.c
710
ptp->capabilities = MCDI_DWORD(outbuf,
drivers/net/ethernet/sfc/siena/ptp.c
713
ptp->capabilities = 0;
drivers/net/ethernet/sfc/siena/ptp.c
719
if (ptp->capabilities & (1 << MC_CMD_PTP_OUT_GET_ATTRIBUTES_FP44_FREQ_ADJ_LBN))
drivers/net/ethernet/sfc/siena/ptp.c
720
ptp->adjfreq_ppb_shift = PPB_SHIFT_FP44;
drivers/net/ethernet/sfc/siena/ptp.c
722
ptp->adjfreq_ppb_shift = PPB_SHIFT_FP40;
drivers/net/ethernet/sfc/siena/ptp.c
861
struct efx_ptp_data *ptp = efx->ptp_data;
drivers/net/ethernet/sfc/siena/ptp.c
862
int *mc_running = ptp->start.addr;
drivers/net/ethernet/sfc/siena/ptp.c
932
struct efx_ptp_data *ptp = efx->ptp_data;
drivers/net/ethernet/sfc/siena/ptp.c
954
&ptp->timeset[i]);
drivers/net/ethernet/sfc/siena/ptp.c
957
ptp->nic_to_kernel_time(0, ptp->timeset[i].wait, 0));
drivers/net/ethernet/sfc/siena/ptp.c
958
window = ptp->timeset[i].window;
drivers/net/ethernet/sfc/siena/ptp.c
971
++ptp->invalid_sync_windows;
drivers/net/ethernet/sfc/siena/ptp.c
973
++ptp->oversize_sync_windows;
drivers/net/ethernet/sfc/siena/ptp.c
974
} else if (corrected < ptp->min_synchronisation_ns) {
drivers/net/ethernet/sfc/siena/ptp.c
975
++ptp->undersize_sync_windows;
drivers/net/ethernet/sfc/siena/ptp.c
994
start_sec = ptp->timeset[last_good].host_start >> MC_NANOSECOND_BITS;
drivers/net/ethernet/stmicro/stmmac/common.h
623
const struct stmmac_hwtimestamp *ptp;
drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c
565
int dwmac1000_ptp_enable(struct ptp_clock_info *ptp,
drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c
569
container_of(ptp, struct stmmac_priv, ptp_clock_ops);
drivers/net/ethernet/stmicro/stmmac/hwif.c
126
const void *ptp;
drivers/net/ethernet/stmicro/stmmac/hwif.c
147
.ptp = &dwmac1000_ptp_clock_ops,
drivers/net/ethernet/stmicro/stmmac/hwif.c
164
.ptp = &dwmac1000_ptp_clock_ops,
drivers/net/ethernet/stmicro/stmmac/hwif.c
183
.ptp = &stmmac_ptp_clock_ops,
drivers/net/ethernet/stmicro/stmmac/hwif.c
204
.ptp = &stmmac_ptp_clock_ops,
drivers/net/ethernet/stmicro/stmmac/hwif.c
225
.ptp = &stmmac_ptp_clock_ops,
drivers/net/ethernet/stmicro/stmmac/hwif.c
246
.ptp = &stmmac_ptp_clock_ops,
drivers/net/ethernet/stmicro/stmmac/hwif.c
268
.ptp = &stmmac_ptp_clock_ops,
drivers/net/ethernet/stmicro/stmmac/hwif.c
290
.ptp = &stmmac_ptp_clock_ops,
drivers/net/ethernet/stmicro/stmmac/hwif.c
382
mac->ptp = mac->ptp ? : entry->hwtimestamp;
drivers/net/ethernet/stmicro/stmmac/hwif.c
393
memcpy(&priv->ptp_clock_ops, entry->ptp,
drivers/net/ethernet/stmicro/stmmac/hwif.h
522
stmmac_do_void_callback(__priv, ptp, config_hw_tstamping, __args)
drivers/net/ethernet/stmicro/stmmac/hwif.h
524
stmmac_do_void_callback(__priv, ptp, config_sub_second_increment, __args)
drivers/net/ethernet/stmicro/stmmac/hwif.h
526
stmmac_do_callback(__priv, ptp, init_systime, __args)
drivers/net/ethernet/stmicro/stmmac/hwif.h
528
stmmac_do_callback(__priv, ptp, config_addend, __args)
drivers/net/ethernet/stmicro/stmmac/hwif.h
530
stmmac_do_callback(__priv, ptp, adjust_systime, __args)
drivers/net/ethernet/stmicro/stmmac/hwif.h
532
stmmac_do_void_callback(__priv, ptp, get_systime, __args)
drivers/net/ethernet/stmicro/stmmac/hwif.h
534
stmmac_do_void_callback(__priv, ptp, get_ptptime, __args)
drivers/net/ethernet/stmicro/stmmac/hwif.h
536
stmmac_do_void_callback(__priv, ptp, timestamp_interrupt, __args)
drivers/net/ethernet/stmicro/stmmac/hwif.h
538
stmmac_do_void_callback(__priv, ptp, hwtstamp_correct_latency, __args)
drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
125
static int stmmac_get_time(struct ptp_clock_info *ptp, struct timespec64 *ts)
drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
128
container_of(ptp, struct stmmac_priv, ptp_clock_ops);
drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
150
static int stmmac_set_time(struct ptp_clock_info *ptp,
drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
154
container_of(ptp, struct stmmac_priv, ptp_clock_ops);
drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
164
static int stmmac_enable(struct ptp_clock_info *ptp,
drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
168
container_of(ptp, struct stmmac_priv, ptp_clock_ops);
drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
25
static int stmmac_adjust_freq(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
28
container_of(ptp, struct stmmac_priv, ptp_clock_ops);
drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
285
static int stmmac_getcrosststamp(struct ptp_clock_info *ptp,
drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
289
container_of(ptp, struct stmmac_priv, ptp_clock_ops);
drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
49
static int stmmac_adjust_time(struct ptp_clock_info *ptp, s64 delta)
drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
52
container_of(ptp, struct stmmac_priv, ptp_clock_ops);
drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.h
101
int dwmac1000_ptp_enable(struct ptp_clock_info *ptp,
drivers/net/ethernet/ti/am65-cpts.c
435
static int am65_cpts_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/net/ethernet/ti/am65-cpts.c
437
struct am65_cpts *cpts = container_of(ptp, struct am65_cpts, ptp_info);
drivers/net/ethernet/ti/am65-cpts.c
524
static int am65_cpts_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/net/ethernet/ti/am65-cpts.c
526
struct am65_cpts *cpts = container_of(ptp, struct am65_cpts, ptp_info);
drivers/net/ethernet/ti/am65-cpts.c
538
static int am65_cpts_ptp_gettimex(struct ptp_clock_info *ptp,
drivers/net/ethernet/ti/am65-cpts.c
542
struct am65_cpts *cpts = container_of(ptp, struct am65_cpts, ptp_info);
drivers/net/ethernet/ti/am65-cpts.c
566
static int am65_cpts_ptp_settime(struct ptp_clock_info *ptp,
drivers/net/ethernet/ti/am65-cpts.c
569
struct am65_cpts *cpts = container_of(ptp, struct am65_cpts, ptp_info);
drivers/net/ethernet/ti/am65-cpts.c
758
static int am65_cpts_ptp_enable(struct ptp_clock_info *ptp,
drivers/net/ethernet/ti/am65-cpts.c
761
struct am65_cpts *cpts = container_of(ptp, struct am65_cpts, ptp_info);
drivers/net/ethernet/ti/am65-cpts.c
777
static long am65_cpts_ts_work(struct ptp_clock_info *ptp);
drivers/net/ethernet/ti/am65-cpts.c
880
static long am65_cpts_ts_work(struct ptp_clock_info *ptp)
drivers/net/ethernet/ti/am65-cpts.c
882
struct am65_cpts *cpts = container_of(ptp, struct am65_cpts, ptp_info);
drivers/net/ethernet/ti/cpts.c
216
static int cpts_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/net/ethernet/ti/cpts.c
218
struct cpts *cpts = container_of(ptp, struct cpts, info);
drivers/net/ethernet/ti/cpts.c
230
static int cpts_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/net/ethernet/ti/cpts.c
232
struct cpts *cpts = container_of(ptp, struct cpts, info);
drivers/net/ethernet/ti/cpts.c
241
static int cpts_ptp_gettimeex(struct ptp_clock_info *ptp,
drivers/net/ethernet/ti/cpts.c
245
struct cpts *cpts = container_of(ptp, struct cpts, info);
drivers/net/ethernet/ti/cpts.c
260
static int cpts_ptp_settime(struct ptp_clock_info *ptp,
drivers/net/ethernet/ti/cpts.c
263
struct cpts *cpts = container_of(ptp, struct cpts, info);
drivers/net/ethernet/ti/cpts.c
299
static int cpts_ptp_enable(struct ptp_clock_info *ptp,
drivers/net/ethernet/ti/cpts.c
302
struct cpts *cpts = container_of(ptp, struct cpts, info);
drivers/net/ethernet/ti/cpts.c
392
static long cpts_overflow_check(struct ptp_clock_info *ptp)
drivers/net/ethernet/ti/cpts.c
394
struct cpts *cpts = container_of(ptp, struct cpts, info);
drivers/net/ethernet/ti/icssg/icss_iep.c
284
static int icss_iep_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/net/ethernet/ti/icssg/icss_iep.c
286
struct icss_iep *iep = container_of(ptp, struct icss_iep, ptp_info);
drivers/net/ethernet/ti/icssg/icss_iep.c
337
static int icss_iep_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/net/ethernet/ti/icssg/icss_iep.c
339
struct icss_iep *iep = container_of(ptp, struct icss_iep, ptp_info);
drivers/net/ethernet/ti/icssg/icss_iep.c
355
static int icss_iep_ptp_gettimeex(struct ptp_clock_info *ptp,
drivers/net/ethernet/ti/icssg/icss_iep.c
359
struct icss_iep *iep = container_of(ptp, struct icss_iep, ptp_info);
drivers/net/ethernet/ti/icssg/icss_iep.c
370
static int icss_iep_ptp_settime(struct ptp_clock_info *ptp,
drivers/net/ethernet/ti/icssg/icss_iep.c
373
struct icss_iep *iep = container_of(ptp, struct icss_iep, ptp_info);
drivers/net/ethernet/ti/icssg/icss_iep.c
654
static int icss_iep_ptp_enable(struct ptp_clock_info *ptp,
drivers/net/ethernet/ti/icssg/icss_iep.c
657
struct icss_iep *iep = container_of(ptp, struct icss_iep, ptp_info);
drivers/net/ethernet/wangxun/libwx/wx_ptp.c
103
struct wx *wx = container_of(ptp, struct wx, ptp_caps);
drivers/net/ethernet/wangxun/libwx/wx_ptp.c
113
static int wx_ptp_settime64(struct ptp_clock_info *ptp,
drivers/net/ethernet/wangxun/libwx/wx_ptp.c
116
struct wx *wx = container_of(ptp, struct wx, ptp_caps);
drivers/net/ethernet/wangxun/libwx/wx_ptp.c
319
static long wx_ptp_do_aux_work(struct ptp_clock_info *ptp)
drivers/net/ethernet/wangxun/libwx/wx_ptp.c
321
struct wx *wx = container_of(ptp, struct wx, ptp_caps);
drivers/net/ethernet/wangxun/libwx/wx_ptp.c
411
static int wx_ptp_feature_enable(struct ptp_clock_info *ptp,
drivers/net/ethernet/wangxun/libwx/wx_ptp.c
414
struct wx *wx = container_of(ptp, struct wx, ptp_caps);
drivers/net/ethernet/wangxun/libwx/wx_ptp.c
65
static int wx_ptp_adjfine(struct ptp_clock_info *ptp, long ppb)
drivers/net/ethernet/wangxun/libwx/wx_ptp.c
67
struct wx *wx = container_of(ptp, struct wx, ptp_caps);
drivers/net/ethernet/wangxun/libwx/wx_ptp.c
84
static int wx_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/net/ethernet/wangxun/libwx/wx_ptp.c
86
struct wx *wx = container_of(ptp, struct wx, ptp_caps);
drivers/net/ethernet/wangxun/libwx/wx_ptp.c
99
static int wx_ptp_gettimex64(struct ptp_clock_info *ptp,
drivers/net/ethernet/xscale/ptp_ixp46x.c
123
static int ptp_ixp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/net/ethernet/xscale/ptp_ixp46x.c
126
struct ixp_clock *ixp_clock = container_of(ptp, struct ixp_clock, caps);
drivers/net/ethernet/xscale/ptp_ixp46x.c
136
static int ptp_ixp_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/net/ethernet/xscale/ptp_ixp46x.c
140
struct ixp_clock *ixp_clock = container_of(ptp, struct ixp_clock, caps);
drivers/net/ethernet/xscale/ptp_ixp46x.c
154
static int ptp_ixp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts)
drivers/net/ethernet/xscale/ptp_ixp46x.c
158
struct ixp_clock *ixp_clock = container_of(ptp, struct ixp_clock, caps);
drivers/net/ethernet/xscale/ptp_ixp46x.c
171
static int ptp_ixp_settime(struct ptp_clock_info *ptp,
drivers/net/ethernet/xscale/ptp_ixp46x.c
176
struct ixp_clock *ixp_clock = container_of(ptp, struct ixp_clock, caps);
drivers/net/ethernet/xscale/ptp_ixp46x.c
190
static int ptp_ixp_enable(struct ptp_clock_info *ptp,
drivers/net/ethernet/xscale/ptp_ixp46x.c
193
struct ixp_clock *ixp_clock = container_of(ptp, struct ixp_clock, caps);
drivers/net/phy/broadcom.c
1185
priv->ptp = bcm_ptp_probe(phydev);
drivers/net/phy/broadcom.c
1186
if (IS_ERR(priv->ptp))
drivers/net/phy/broadcom.c
1187
return PTR_ERR(priv->ptp);
drivers/net/phy/broadcom.c
35
struct bcm_ptp_private *ptp;
drivers/net/phy/broadcom.c
361
if (priv->ptp)
drivers/net/phy/broadcom.c
362
bcm_ptp_stop(priv->ptp);
drivers/net/phy/broadcom.c
369
if (priv->ptp)
drivers/net/phy/dp83640.c
374
static int ptp_dp83640_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/net/phy/dp83640.c
377
container_of(ptp, struct dp83640_clock, caps);
drivers/net/phy/dp83640.c
407
static int ptp_dp83640_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/net/phy/dp83640.c
410
container_of(ptp, struct dp83640_clock, caps);
drivers/net/phy/dp83640.c
428
static int ptp_dp83640_gettime(struct ptp_clock_info *ptp,
drivers/net/phy/dp83640.c
432
container_of(ptp, struct dp83640_clock, caps);
drivers/net/phy/dp83640.c
453
static int ptp_dp83640_settime(struct ptp_clock_info *ptp,
drivers/net/phy/dp83640.c
457
container_of(ptp, struct dp83640_clock, caps);
drivers/net/phy/dp83640.c
470
static int ptp_dp83640_enable(struct ptp_clock_info *ptp,
drivers/net/phy/dp83640.c
474
container_of(ptp, struct dp83640_clock, caps);
drivers/net/phy/dp83640.c
520
static int ptp_dp83640_verify(struct ptp_clock_info *ptp, unsigned int pin,
drivers/net/phy/dp83640.c
524
container_of(ptp, struct dp83640_clock, caps);
drivers/net/phy/micrel.c
3964
static int lan8814_ptpci_verify(struct ptp_clock_info *ptp, unsigned int pin,
drivers/net/phy/micrel.c
5295
static int lan8841_ptp_settime64(struct ptp_clock_info *ptp,
drivers/net/phy/micrel.c
5298
struct kszphy_ptp_priv *ptp_priv = container_of(ptp, struct kszphy_ptp_priv,
drivers/net/phy/micrel.c
5332
static int lan8841_ptp_gettime64(struct ptp_clock_info *ptp,
drivers/net/phy/micrel.c
5335
struct kszphy_ptp_priv *ptp_priv = container_of(ptp, struct kszphy_ptp_priv,
drivers/net/phy/micrel.c
5362
static void lan8841_ptp_getseconds(struct ptp_clock_info *ptp,
drivers/net/phy/micrel.c
5365
struct kszphy_ptp_priv *ptp_priv = container_of(ptp, struct kszphy_ptp_priv,
drivers/net/phy/micrel.c
5392
static int lan8841_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/net/phy/micrel.c
5394
struct kszphy_ptp_priv *ptp_priv = container_of(ptp, struct kszphy_ptp_priv,
drivers/net/phy/micrel.c
5413
ptp->gettime64(ptp, &ts);
drivers/net/phy/micrel.c
5418
ptp->settime64(ptp, &ts);
drivers/net/phy/micrel.c
5466
ptp->gettime64(ptp, &ts);
drivers/net/phy/micrel.c
5478
static int lan8841_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/net/phy/micrel.c
5480
struct kszphy_ptp_priv *ptp_priv = container_of(ptp, struct kszphy_ptp_priv,
drivers/net/phy/micrel.c
5507
static int lan8841_ptp_verify(struct ptp_clock_info *ptp, unsigned int pin,
drivers/net/phy/micrel.c
5660
static int lan8841_ptp_perout(struct ptp_clock_info *ptp,
drivers/net/phy/micrel.c
5663
struct kszphy_ptp_priv *ptp_priv = container_of(ptp, struct kszphy_ptp_priv,
drivers/net/phy/micrel.c
5842
static int lan8841_ptp_extts(struct ptp_clock_info *ptp,
drivers/net/phy/micrel.c
5845
struct kszphy_ptp_priv *ptp_priv = container_of(ptp, struct kszphy_ptp_priv,
drivers/net/phy/micrel.c
5870
static int lan8841_ptp_enable(struct ptp_clock_info *ptp,
drivers/net/phy/micrel.c
5875
return lan8841_ptp_extts(ptp, rq, on);
drivers/net/phy/micrel.c
5877
return lan8841_ptp_perout(ptp, rq, on);
drivers/net/phy/micrel.c
5885
static long lan8841_ptp_do_aux_work(struct ptp_clock_info *ptp)
drivers/net/phy/micrel.c
5887
struct kszphy_ptp_priv *ptp_priv = container_of(ptp, struct kszphy_ptp_priv,
drivers/net/phy/mscc/mscc.h
410
struct vsc85xx_ptp *ptp;
drivers/net/phy/mscc/mscc_ptp.c
1003
vsc8531->ptp->rx_filter != HWTSTAMP_FILTER_NONE);
drivers/net/phy/mscc/mscc_ptp.c
1005
ptp_l4 && vsc8531->ptp->rx_filter != HWTSTAMP_FILTER_NONE);
drivers/net/phy/mscc/mscc_ptp.c
1007
vsc8531->ptp->rx_filter != HWTSTAMP_FILTER_NONE);
drivers/net/phy/mscc/mscc_ptp.c
1010
vsc8531->ptp->tx_type != HWTSTAMP_TX_OFF);
drivers/net/phy/mscc/mscc_ptp.c
1012
ptp_l4 && vsc8531->ptp->tx_type != HWTSTAMP_TX_OFF);
drivers/net/phy/mscc/mscc_ptp.c
1014
vsc8531->ptp->tx_type != HWTSTAMP_TX_OFF);
drivers/net/phy/mscc/mscc_ptp.c
1017
if (vsc8531->ptp->tx_type != HWTSTAMP_TX_OFF)
drivers/net/phy/mscc/mscc_ptp.c
1021
if (vsc8531->ptp->rx_filter != HWTSTAMP_FILTER_NONE)
drivers/net/phy/mscc/mscc_ptp.c
1060
cfg->tx_type = vsc8531->ptp->tx_type;
drivers/net/phy/mscc/mscc_ptp.c
1061
cfg->rx_filter = vsc8531->ptp->rx_filter;
drivers/net/phy/mscc/mscc_ptp.c
1072
struct phy_device *phydev = vsc8531->ptp->phydev;
drivers/net/phy/mscc/mscc_ptp.c
1083
skb_queue_purge(&vsc8531->ptp->tx_queue);
drivers/net/phy/mscc/mscc_ptp.c
1089
vsc8531->ptp->tx_type = cfg->tx_type;
drivers/net/phy/mscc/mscc_ptp.c
1104
vsc8531->ptp->rx_filter = cfg->rx_filter;
drivers/net/phy/mscc/mscc_ptp.c
1123
if (vsc8531->ptp->tx_type == HWTSTAMP_TX_OFF)
drivers/net/phy/mscc/mscc_ptp.c
1125
if (vsc8531->ptp->rx_filter == HWTSTAMP_FILTER_NONE)
drivers/net/phy/mscc/mscc_ptp.c
1146
vsc8531->ptp->configured = 1;
drivers/net/phy/mscc/mscc_ptp.c
1158
info->phc_index = ptp_clock_index(vsc8531->ptp->ptp_clock);
drivers/net/phy/mscc/mscc_ptp.c
1181
if (!vsc8531->ptp->configured)
drivers/net/phy/mscc/mscc_ptp.c
1184
if (vsc8531->ptp->tx_type == HWTSTAMP_TX_OFF)
drivers/net/phy/mscc/mscc_ptp.c
1187
if (vsc8531->ptp->tx_type == HWTSTAMP_TX_ONESTEP_SYNC)
drivers/net/phy/mscc/mscc_ptp.c
1193
skb_queue_tail(&vsc8531->ptp->tx_queue, skb);
drivers/net/phy/mscc/mscc_ptp.c
1208
if (!vsc8531->ptp->configured)
drivers/net/phy/mscc/mscc_ptp.c
1211
if (vsc8531->ptp->rx_filter == HWTSTAMP_FILTER_NONE ||
drivers/net/phy/mscc/mscc_ptp.c
1215
ptphdr = get_ptp_header_rx(skb, vsc8531->ptp->rx_filter);
drivers/net/phy/mscc/mscc_ptp.c
1224
ptp_schedule_worker(vsc8531->ptp->ptp_clock, 0);
drivers/net/phy/mscc/mscc_ptp.c
1231
struct vsc85xx_ptp *ptp = container_of(info, struct vsc85xx_ptp, caps);
drivers/net/phy/mscc/mscc_ptp.c
1233
struct phy_device *phydev = ptp->phydev;
drivers/net/phy/mscc/mscc_ptp.c
1556
if (vsc8531->ptp->ptp_clock) {
drivers/net/phy/mscc/mscc_ptp.c
1557
ptp_clock_unregister(vsc8531->ptp->ptp_clock);
drivers/net/phy/mscc/mscc_ptp.c
1559
skb_queue_purge(&vsc8531->ptp->tx_queue);
drivers/net/phy/mscc/mscc_ptp.c
1581
vsc85xx_get_tx_ts(priv->ptp);
drivers/net/phy/mscc/mscc_ptp.c
1583
skb_queue_purge(&priv->ptp->tx_queue);
drivers/net/phy/mscc/mscc_ptp.c
1595
vsc8531->ptp = devm_kzalloc(&phydev->mdio.dev, sizeof(*vsc8531->ptp),
drivers/net/phy/mscc/mscc_ptp.c
1597
if (!vsc8531->ptp)
drivers/net/phy/mscc/mscc_ptp.c
1603
skb_queue_head_init(&vsc8531->ptp->tx_queue);
drivers/net/phy/mscc/mscc_ptp.c
1622
vsc8531->ptp->phydev = phydev;
drivers/net/phy/mscc/mscc_ptp.c
1631
memcpy(&vsc8531->ptp->caps, &vsc85xx_clk_caps, sizeof(vsc85xx_clk_caps));
drivers/net/phy/mscc/mscc_ptp.c
1632
vsc8531->ptp->ptp_clock = ptp_clock_register(&vsc8531->ptp->caps,
drivers/net/phy/mscc/mscc_ptp.c
1634
return PTR_ERR_OR_ZERO(vsc8531->ptp->ptp_clock);
drivers/net/phy/mscc/mscc_ptp.c
429
static void vsc85xx_dequeue_skb(struct vsc85xx_ptp *ptp)
drivers/net/phy/mscc/mscc_ptp.c
441
reg = vsc85xx_ts_read_csr(ptp->phydev, PROCESSOR,
drivers/net/phy/mscc/mscc_ptp.c
451
reg = vsc85xx_ts_read_csr(ptp->phydev, PROCESSOR,
drivers/net/phy/mscc/mscc_ptp.c
459
len = skb_queue_len_lockless(&ptp->tx_queue);
drivers/net/phy/mscc/mscc_ptp.c
464
skb = skb_dequeue(&ptp->tx_queue);
drivers/net/phy/mscc/mscc_ptp.c
489
skb_queue_tail(&ptp->tx_queue, skb);
drivers/net/phy/mscc/mscc_ptp.c
493
static void vsc85xx_get_tx_ts(struct vsc85xx_ptp *ptp)
drivers/net/phy/mscc/mscc_ptp.c
498
vsc85xx_dequeue_skb(ptp);
drivers/net/phy/mscc/mscc_ptp.c
501
reg = vsc85xx_ts_read_csr(ptp->phydev, PROCESSOR,
drivers/net/phy/mscc/mscc_ptp.c
613
struct vsc85xx_ptp *ptp = container_of(info, struct vsc85xx_ptp, caps);
drivers/net/phy/mscc/mscc_ptp.c
614
struct phy_device *phydev = ptp->phydev;
drivers/net/phy/mscc/mscc_ptp.c
647
struct vsc85xx_ptp *ptp = container_of(info, struct vsc85xx_ptp, caps);
drivers/net/phy/mscc/mscc_ptp.c
648
struct phy_device *phydev = ptp->phydev;
drivers/net/phy/mscc/mscc_ptp.c
685
struct vsc85xx_ptp *ptp = container_of(info, struct vsc85xx_ptp, caps);
drivers/net/phy/mscc/mscc_ptp.c
686
struct phy_device *phydev = ptp->phydev;
drivers/net/phy/mscc/mscc_ptp.c
699
struct vsc85xx_ptp *ptp = container_of(info, struct vsc85xx_ptp, caps);
drivers/net/phy/mscc/mscc_ptp.c
700
struct phy_device *phydev = ptp->phydev;
drivers/net/phy/mscc/mscc_ptp.c
736
struct vsc85xx_ptp *ptp = container_of(info, struct vsc85xx_ptp, caps);
drivers/net/phy/mscc/mscc_ptp.c
737
struct phy_device *phydev = ptp->phydev;
drivers/net/phy/mscc/mscc_ptp.c
749
struct vsc85xx_ptp *ptp = container_of(info, struct vsc85xx_ptp, caps);
drivers/net/phy/mscc/mscc_ptp.c
750
struct phy_device *phydev = ptp->phydev;
drivers/net/phy/mscc/mscc_ptp.c
890
if (vsc8531->ptp->rx_filter == HWTSTAMP_FILTER_PTP_V2_L2_EVENT) {
drivers/net/phy/mscc/mscc_ptp.c
973
ptp_l4 = vsc8531->ptp->rx_filter == HWTSTAMP_FILTER_PTP_V2_L4_EVENT;
drivers/net/phy/mscc/mscc_ptp.c
983
if (vsc8531->ptp->rx_filter == HWTSTAMP_FILTER_PTP_V2_L2_EVENT) {
drivers/net/phy/nxp-c45-tja11xx.c
385
static int _nxp_c45_ptp_gettimex64(struct ptp_clock_info *ptp,
drivers/net/phy/nxp-c45-tja11xx.c
389
struct nxp_c45_phy *priv = container_of(ptp, struct nxp_c45_phy, caps);
drivers/net/phy/nxp-c45-tja11xx.c
405
static int nxp_c45_ptp_gettimex64(struct ptp_clock_info *ptp,
drivers/net/phy/nxp-c45-tja11xx.c
409
struct nxp_c45_phy *priv = container_of(ptp, struct nxp_c45_phy, caps);
drivers/net/phy/nxp-c45-tja11xx.c
412
_nxp_c45_ptp_gettimex64(ptp, ts, sts);
drivers/net/phy/nxp-c45-tja11xx.c
418
static int _nxp_c45_ptp_settime64(struct ptp_clock_info *ptp,
drivers/net/phy/nxp-c45-tja11xx.c
421
struct nxp_c45_phy *priv = container_of(ptp, struct nxp_c45_phy, caps);
drivers/net/phy/nxp-c45-tja11xx.c
437
static int nxp_c45_ptp_settime64(struct ptp_clock_info *ptp,
drivers/net/phy/nxp-c45-tja11xx.c
440
struct nxp_c45_phy *priv = container_of(ptp, struct nxp_c45_phy, caps);
drivers/net/phy/nxp-c45-tja11xx.c
443
_nxp_c45_ptp_settime64(ptp, ts);
drivers/net/phy/nxp-c45-tja11xx.c
449
static int nxp_c45_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/net/phy/nxp-c45-tja11xx.c
451
struct nxp_c45_phy *priv = container_of(ptp, struct nxp_c45_phy, caps);
drivers/net/phy/nxp-c45-tja11xx.c
480
static int nxp_c45_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/net/phy/nxp-c45-tja11xx.c
482
struct nxp_c45_phy *priv = container_of(ptp, struct nxp_c45_phy, caps);
drivers/net/phy/nxp-c45-tja11xx.c
487
_nxp_c45_ptp_gettimex64(ptp, &now, NULL);
drivers/net/phy/nxp-c45-tja11xx.c
489
_nxp_c45_ptp_settime64(ptp, &now);
drivers/net/phy/nxp-c45-tja11xx.c
697
static long nxp_c45_do_aux_work(struct ptp_clock_info *ptp)
drivers/net/phy/nxp-c45-tja11xx.c
699
struct nxp_c45_phy *priv = container_of(ptp, struct nxp_c45_phy, caps);
drivers/net/phy/nxp-c45-tja11xx.c
890
static int nxp_c45_ptp_enable(struct ptp_clock_info *ptp,
drivers/net/phy/nxp-c45-tja11xx.c
893
struct nxp_c45_phy *priv = container_of(ptp, struct nxp_c45_phy, caps);
drivers/net/phy/nxp-c45-tja11xx.c
920
static int nxp_c45_ptp_verify_pin(struct ptp_clock_info *ptp, unsigned int pin,
drivers/net/wireless/intel/iwlwifi/fw/api/datapath.h
321
struct iwl_time_msmt_ptp_ctx ptp;
drivers/net/wireless/intel/iwlwifi/mld/ptp.c
102
static int iwl_mld_ptp_gettime(struct ptp_clock_info *ptp,
drivers/net/wireless/intel/iwlwifi/mld/ptp.c
105
struct iwl_mld *mld = container_of(ptp, struct iwl_mld,
drivers/net/wireless/intel/iwlwifi/mld/ptp.c
124
static int iwl_mld_ptp_settime(struct ptp_clock_info *ptp,
drivers/net/wireless/intel/iwlwifi/mld/ptp.c
130
static int iwl_mld_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/net/wireless/intel/iwlwifi/mld/ptp.c
132
struct iwl_mld *mld = container_of(ptp, struct iwl_mld,
drivers/net/wireless/intel/iwlwifi/mld/ptp.c
144
static int iwl_mld_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/net/wireless/intel/iwlwifi/mld/ptp.c
146
struct iwl_mld *mld = container_of(ptp, struct iwl_mld,
drivers/net/wireless/intel/iwlwifi/mld/ptp.c
239
iwl_mld_phc_get_crosstimestamp(struct ptp_clock_info *ptp,
drivers/net/wireless/intel/iwlwifi/mld/ptp.c
242
struct iwl_mld *mld = container_of(ptp, struct iwl_mld,
drivers/net/wireless/intel/iwlwifi/mvm/ptp.c
150
iwl_mvm_phc_get_crosstimestamp(struct ptp_clock_info *ptp,
drivers/net/wireless/intel/iwlwifi/mvm/ptp.c
153
struct iwl_mvm *mvm = container_of(ptp, struct iwl_mvm,
drivers/net/wireless/intel/iwlwifi/mvm/ptp.c
206
static int iwl_mvm_ptp_gettime(struct ptp_clock_info *ptp,
drivers/net/wireless/intel/iwlwifi/mvm/ptp.c
209
struct iwl_mvm *mvm = container_of(ptp, struct iwl_mvm,
drivers/net/wireless/intel/iwlwifi/mvm/ptp.c
223
static int iwl_mvm_ptp_settime(struct ptp_clock_info *ptp,
drivers/net/wireless/intel/iwlwifi/mvm/ptp.c
229
static int iwl_mvm_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/net/wireless/intel/iwlwifi/mvm/ptp.c
231
struct iwl_mvm *mvm = container_of(ptp, struct iwl_mvm,
drivers/net/wireless/intel/iwlwifi/mvm/ptp.c
233
struct ptp_data *data = container_of(ptp, struct ptp_data,
drivers/net/wireless/intel/iwlwifi/mvm/ptp.c
244
static int iwl_mvm_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/net/wireless/intel/iwlwifi/mvm/ptp.c
246
struct iwl_mvm *mvm = container_of(ptp, struct iwl_mvm,
drivers/ptp/ptp_chardev.c
135
struct ptp_clock *ptp = container_of(pccontext->clk, struct ptp_clock, clock);
drivers/ptp/ptp_chardev.c
149
scoped_guard(spinlock_irq, &ptp->tsevqs_lock)
drivers/ptp/ptp_chardev.c
150
list_add_tail(&queue->qlist, &ptp->tsevqs);
drivers/ptp/ptp_chardev.c
156
debugfs_create_dir(debugfsname, ptp->debugfs_root);
drivers/ptp/ptp_chardev.c
169
struct ptp_clock *ptp =
drivers/ptp/ptp_chardev.c
174
scoped_guard(spinlock_irq, &ptp->tsevqs_lock)
drivers/ptp/ptp_chardev.c
181
static long ptp_clock_getcaps(struct ptp_clock *ptp, void __user *arg)
drivers/ptp/ptp_chardev.c
184
.max_adj = ptp->info->max_adj,
drivers/ptp/ptp_chardev.c
185
.n_alarm = ptp->info->n_alarm,
drivers/ptp/ptp_chardev.c
186
.n_ext_ts = ptp->info->n_ext_ts,
drivers/ptp/ptp_chardev.c
187
.n_per_out = ptp->info->n_per_out,
drivers/ptp/ptp_chardev.c
188
.pps = ptp->info->pps,
drivers/ptp/ptp_chardev.c
189
.n_pins = ptp->info->n_pins,
drivers/ptp/ptp_chardev.c
190
.cross_timestamping = ptp->info->getcrosststamp != NULL,
drivers/ptp/ptp_chardev.c
191
.adjust_phase = ptp->info->adjphase != NULL &&
drivers/ptp/ptp_chardev.c
192
ptp->info->getmaxphase != NULL,
drivers/ptp/ptp_chardev.c
196
caps.max_phase_adj = ptp->info->getmaxphase(ptp->info);
drivers/ptp/ptp_chardev.c
201
static long ptp_extts_request(struct ptp_clock *ptp, unsigned int cmd, void __user *arg)
drivers/ptp/ptp_chardev.c
204
struct ptp_clock_info *ops = ptp->info;
drivers/ptp/ptp_chardev.c
230
supported_extts_flags = ptp->info->supported_extts_flags;
drivers/ptp/ptp_chardev.c
243
scoped_cond_guard(mutex_intr, return -ERESTARTSYS, &ptp->pincfg_mux)
drivers/ptp/ptp_chardev.c
247
static long ptp_perout_request(struct ptp_clock *ptp, unsigned int cmd, void __user *arg)
drivers/ptp/ptp_chardev.c
251
struct ptp_clock_info *ops = ptp->info;
drivers/ptp/ptp_chardev.c
298
scoped_cond_guard(mutex_intr, return -ERESTARTSYS, &ptp->pincfg_mux)
drivers/ptp/ptp_chardev.c
302
static long ptp_enable_pps(struct ptp_clock *ptp, bool enable)
drivers/ptp/ptp_chardev.c
305
struct ptp_clock_info *ops = ptp->info;
drivers/ptp/ptp_chardev.c
310
scoped_cond_guard(mutex_intr, return -ERESTARTSYS, &ptp->pincfg_mux)
drivers/ptp/ptp_chardev.c
317
static long ptp_sys_offset_precise(struct ptp_clock *ptp, void __user *arg,
drivers/ptp/ptp_chardev.c
328
err = crosststamp_fn(ptp->info, &xtstamp);
drivers/ptp/ptp_chardev.c
350
static long ptp_sys_offset_extended(struct ptp_clock *ptp, void __user *arg,
drivers/ptp/ptp_chardev.c
384
err = gettimex_fn(ptp->info, &ts, &sts);
drivers/ptp/ptp_chardev.c
403
static long ptp_sys_offset(struct ptp_clock *ptp, void __user *arg)
drivers/ptp/ptp_chardev.c
418
struct ptp_clock_info *ops = ptp->info;
drivers/ptp/ptp_chardev.c
442
static long ptp_pin_getfunc(struct ptp_clock *ptp, unsigned int cmd, void __user *arg)
drivers/ptp/ptp_chardev.c
444
struct ptp_clock_info *ops = ptp->info;
drivers/ptp/ptp_chardev.c
456
scoped_cond_guard(mutex_intr, return -ERESTARTSYS, &ptp->pincfg_mux)
drivers/ptp/ptp_chardev.c
462
static long ptp_pin_setfunc(struct ptp_clock *ptp, unsigned int cmd, void __user *arg)
drivers/ptp/ptp_chardev.c
464
struct ptp_clock_info *ops = ptp->info;
drivers/ptp/ptp_chardev.c
478
scoped_cond_guard(mutex_intr, return -ERESTARTSYS, &ptp->pincfg_mux)
drivers/ptp/ptp_chardev.c
479
return ptp_set_pinfunc(ptp, pin_index, pd.func, pd.chan);
drivers/ptp/ptp_chardev.c
50
void ptp_disable_all_events(struct ptp_clock *ptp)
drivers/ptp/ptp_chardev.c
503
struct ptp_clock *ptp = container_of(pccontext->clk, struct ptp_clock, clock);
drivers/ptp/ptp_chardev.c
513
return ptp_clock_getcaps(ptp, argptr);
drivers/ptp/ptp_chardev.c
519
return ptp_extts_request(ptp, cmd, argptr);
drivers/ptp/ptp_chardev.c
52
struct ptp_clock_info *info = ptp->info;
drivers/ptp/ptp_chardev.c
525
return ptp_perout_request(ptp, cmd, argptr);
drivers/ptp/ptp_chardev.c
531
return ptp_enable_pps(ptp, !!arg);
drivers/ptp/ptp_chardev.c
535
return ptp_sys_offset_precise(ptp, argptr,
drivers/ptp/ptp_chardev.c
536
ptp->info->getcrosststamp);
drivers/ptp/ptp_chardev.c
540
return ptp_sys_offset_extended(ptp, argptr,
drivers/ptp/ptp_chardev.c
541
ptp->info->gettimex64);
drivers/ptp/ptp_chardev.c
545
return ptp_sys_offset(ptp, argptr);
drivers/ptp/ptp_chardev.c
549
return ptp_pin_getfunc(ptp, cmd, argptr);
drivers/ptp/ptp_chardev.c
55
mutex_lock(&ptp->pincfg_mux);
drivers/ptp/ptp_chardev.c
555
return ptp_pin_setfunc(ptp, cmd, argptr);
drivers/ptp/ptp_chardev.c
564
if (!ptp->has_cycles)
drivers/ptp/ptp_chardev.c
566
return ptp_sys_offset_precise(ptp, argptr,
drivers/ptp/ptp_chardev.c
567
ptp->info->getcrosscycles);
drivers/ptp/ptp_chardev.c
570
if (!ptp->has_cycles)
drivers/ptp/ptp_chardev.c
572
return ptp_sys_offset_extended(ptp, argptr,
drivers/ptp/ptp_chardev.c
573
ptp->info->getcyclesx64);
drivers/ptp/ptp_chardev.c
582
struct ptp_clock *ptp =
drivers/ptp/ptp_chardev.c
590
poll_wait(fp, &ptp->tsev_wq, wait);
drivers/ptp/ptp_chardev.c
600
struct ptp_clock *ptp = container_of(pccontext->clk, struct ptp_clock, clock);
drivers/ptp/ptp_chardev.c
615
if (wait_event_interruptible(ptp->tsev_wq, ptp->defunct || queue_cnt(queue)))
drivers/ptp/ptp_chardev.c
618
if (ptp->defunct)
drivers/ptp/ptp_chardev.c
67
mutex_unlock(&ptp->pincfg_mux);
drivers/ptp/ptp_chardev.c
70
int ptp_set_pinfunc(struct ptp_clock *ptp, unsigned int pin,
drivers/ptp/ptp_chardev.c
73
struct ptp_clock_info *info = ptp->info;
drivers/ptp/ptp_clock.c
107
return ptp->info->settime64(ptp->info, tp);
drivers/ptp/ptp_clock.c
112
struct ptp_clock *ptp = container_of(pc, struct ptp_clock, clock);
drivers/ptp/ptp_clock.c
115
if (ptp->info->gettimex64)
drivers/ptp/ptp_clock.c
116
err = ptp->info->gettimex64(ptp->info, tp, NULL);
drivers/ptp/ptp_clock.c
118
err = ptp->info->gettime64(ptp->info, tp);
drivers/ptp/ptp_clock.c
124
struct ptp_clock *ptp = container_of(pc, struct ptp_clock, clock);
drivers/ptp/ptp_clock.c
129
ptp_clock_freerun(ptp)) {
drivers/ptp/ptp_clock.c
134
ops = ptp->info;
drivers/ptp/ptp_clock.c
167
ptp->dialed_frequency = tx->freq;
drivers/ptp/ptp_clock.c
182
tx->freq = ptp->dialed_frequency;
drivers/ptp/ptp_clock.c
204
struct ptp_clock *ptp = container_of(dev, struct ptp_clock, dev);
drivers/ptp/ptp_clock.c
208
ptp_cleanup_pin_groups(ptp);
drivers/ptp/ptp_clock.c
209
kfree(ptp->vclock_index);
drivers/ptp/ptp_clock.c
210
mutex_destroy(&ptp->pincfg_mux);
drivers/ptp/ptp_clock.c
211
mutex_destroy(&ptp->n_vclocks_mux);
drivers/ptp/ptp_clock.c
213
spin_lock_irqsave(&ptp->tsevqs_lock, flags);
drivers/ptp/ptp_clock.c
214
tsevq = list_first_entry(&ptp->tsevqs, struct timestamp_event_queue,
drivers/ptp/ptp_clock.c
217
spin_unlock_irqrestore(&ptp->tsevqs_lock, flags);
drivers/ptp/ptp_clock.c
220
debugfs_remove(ptp->debugfs_root);
drivers/ptp/ptp_clock.c
221
xa_erase(&ptp_clocks_map, ptp->index);
drivers/ptp/ptp_clock.c
222
kfree(ptp);
drivers/ptp/ptp_clock.c
233
static int ptp_enable(struct ptp_clock_info *ptp, struct ptp_clock_request *request, int on)
drivers/ptp/ptp_clock.c
240
struct ptp_clock *ptp = container_of(work, struct ptp_clock,
drivers/ptp/ptp_clock.c
242
struct ptp_clock_info *info = ptp->info;
drivers/ptp/ptp_clock.c
248
kthread_queue_delayed_work(ptp->kworker, &ptp->aux_work, delay);
drivers/ptp/ptp_clock.c
255
struct ptp_clock *ptp = filep->private_data;
drivers/ptp/ptp_clock.c
258
snprintf(buf, sizeof(buf), "%d\n", ptp->info->n_per_lp);
drivers/ptp/ptp_clock.c
273
struct ptp_clock *ptp = filep->private_data;
drivers/ptp/ptp_clock.c
274
struct ptp_clock_info *ops = ptp->info;
drivers/ptp/ptp_clock.c
319
struct ptp_clock *ptp;
drivers/ptp/ptp_clock.c
331
ptp = kzalloc_obj(struct ptp_clock);
drivers/ptp/ptp_clock.c
332
if (!ptp) {
drivers/ptp/ptp_clock.c
337
err = xa_alloc(&ptp_clocks_map, &index, ptp, xa_limit_31b,
drivers/ptp/ptp_clock.c
342
ptp->clock.ops = ptp_clock_ops;
drivers/ptp/ptp_clock.c
343
ptp->info = info;
drivers/ptp/ptp_clock.c
344
ptp->devid = MKDEV(major, index);
drivers/ptp/ptp_clock.c
345
ptp->index = index;
drivers/ptp/ptp_clock.c
346
INIT_LIST_HEAD(&ptp->tsevqs);
drivers/ptp/ptp_clock.c
352
list_add_tail(&queue->qlist, &ptp->tsevqs);
drivers/ptp/ptp_clock.c
353
spin_lock_init(&ptp->tsevqs_lock);
drivers/ptp/ptp_clock.c
361
mutex_init(&ptp->pincfg_mux);
drivers/ptp/ptp_clock.c
362
mutex_init(&ptp->n_vclocks_mux);
drivers/ptp/ptp_clock.c
363
init_waitqueue_head(&ptp->tsev_wq);
drivers/ptp/ptp_clock.c
365
if (ptp->info->getcycles64 || ptp->info->getcyclesx64) {
drivers/ptp/ptp_clock.c
366
ptp->has_cycles = true;
drivers/ptp/ptp_clock.c
367
if (!ptp->info->getcycles64 && ptp->info->getcyclesx64)
drivers/ptp/ptp_clock.c
368
ptp->info->getcycles64 = ptp_getcycles64;
drivers/ptp/ptp_clock.c
371
ptp->info->getcycles64 = ptp_getcycles64;
drivers/ptp/ptp_clock.c
373
if (ptp->info->gettimex64)
drivers/ptp/ptp_clock.c
374
ptp->info->getcyclesx64 = ptp->info->gettimex64;
drivers/ptp/ptp_clock.c
376
if (ptp->info->getcrosststamp)
drivers/ptp/ptp_clock.c
377
ptp->info->getcrosscycles = ptp->info->getcrosststamp;
drivers/ptp/ptp_clock.c
380
if (!ptp->info->enable)
drivers/ptp/ptp_clock.c
381
ptp->info->enable = ptp_enable;
drivers/ptp/ptp_clock.c
383
if (ptp->info->do_aux_work) {
drivers/ptp/ptp_clock.c
384
kthread_init_delayed_work(&ptp->aux_work, ptp_aux_kworker);
drivers/ptp/ptp_clock.c
385
ptp->kworker = kthread_run_worker(0, "ptp%d", ptp->index);
drivers/ptp/ptp_clock.c
386
if (IS_ERR(ptp->kworker)) {
drivers/ptp/ptp_clock.c
387
err = PTR_ERR(ptp->kworker);
drivers/ptp/ptp_clock.c
396
ptp->is_virtual_clock = true;
drivers/ptp/ptp_clock.c
398
if (!ptp->is_virtual_clock) {
drivers/ptp/ptp_clock.c
399
ptp->max_vclocks = PTP_DEFAULT_MAX_VCLOCKS;
drivers/ptp/ptp_clock.c
401
size = sizeof(int) * ptp->max_vclocks;
drivers/ptp/ptp_clock.c
402
ptp->vclock_index = kzalloc(size, GFP_KERNEL);
drivers/ptp/ptp_clock.c
403
if (!ptp->vclock_index) {
drivers/ptp/ptp_clock.c
409
err = ptp_populate_pin_groups(ptp);
drivers/ptp/ptp_clock.c
420
ptp->pps_source = pps_register_source(&pps, PTP_PPS_DEFAULTS);
drivers/ptp/ptp_clock.c
421
if (IS_ERR(ptp->pps_source)) {
drivers/ptp/ptp_clock.c
422
err = PTR_ERR(ptp->pps_source);
drivers/ptp/ptp_clock.c
426
ptp->pps_source->lookup_cookie = ptp;
drivers/ptp/ptp_clock.c
430
device_initialize(&ptp->dev);
drivers/ptp/ptp_clock.c
431
ptp->dev.devt = ptp->devid;
drivers/ptp/ptp_clock.c
432
ptp->dev.class = &ptp_class;
drivers/ptp/ptp_clock.c
433
ptp->dev.parent = parent;
drivers/ptp/ptp_clock.c
434
ptp->dev.groups = ptp->pin_attr_groups;
drivers/ptp/ptp_clock.c
435
ptp->dev.release = ptp_clock_release;
drivers/ptp/ptp_clock.c
436
dev_set_drvdata(&ptp->dev, ptp);
drivers/ptp/ptp_clock.c
437
dev_set_name(&ptp->dev, "ptp%d", ptp->index);
drivers/ptp/ptp_clock.c
440
err = posix_clock_register(&ptp->clock, &ptp->dev);
drivers/ptp/ptp_clock.c
442
if (ptp->pps_source)
drivers/ptp/ptp_clock.c
443
pps_unregister_source(ptp->pps_source);
drivers/ptp/ptp_clock.c
445
if (ptp->kworker)
drivers/ptp/ptp_clock.c
446
kthread_destroy_worker(ptp->kworker);
drivers/ptp/ptp_clock.c
448
put_device(&ptp->dev);
drivers/ptp/ptp_clock.c
455
snprintf(debugfsname, sizeof(debugfsname), "ptp%d", ptp->index);
drivers/ptp/ptp_clock.c
456
ptp->debugfs_root = debugfs_create_dir(debugfsname, NULL);
drivers/ptp/ptp_clock.c
458
debugfs_create_file("n_perout_loopback", 0400, ptp->debugfs_root,
drivers/ptp/ptp_clock.c
459
ptp, &ptp_n_perout_loopback_fops);
drivers/ptp/ptp_clock.c
460
debugfs_create_file("perout_loopback", 0200, ptp->debugfs_root,
drivers/ptp/ptp_clock.c
461
ptp, &ptp_perout_loopback_ops);
drivers/ptp/ptp_clock.c
464
return ptp;
drivers/ptp/ptp_clock.c
467
ptp_cleanup_pin_groups(ptp);
drivers/ptp/ptp_clock.c
469
kfree(ptp->vclock_index);
drivers/ptp/ptp_clock.c
471
if (ptp->kworker)
drivers/ptp/ptp_clock.c
472
kthread_destroy_worker(ptp->kworker);
drivers/ptp/ptp_clock.c
474
mutex_destroy(&ptp->pincfg_mux);
drivers/ptp/ptp_clock.c
475
mutex_destroy(&ptp->n_vclocks_mux);
drivers/ptp/ptp_clock.c
483
kfree(ptp);
drivers/ptp/ptp_clock.c
491
struct ptp_clock *ptp = dev_get_drvdata(dev);
drivers/ptp/ptp_clock.c
493
ptp_vclock_unregister(info_to_vclock(ptp->info));
drivers/ptp/ptp_clock.c
497
int ptp_clock_unregister(struct ptp_clock *ptp)
drivers/ptp/ptp_clock.c
499
if (ptp_vclock_in_use(ptp)) {
drivers/ptp/ptp_clock.c
500
device_for_each_child(&ptp->dev, NULL, unregister_vclock);
drivers/ptp/ptp_clock.c
506
get_device(&ptp->dev);
drivers/ptp/ptp_clock.c
509
ptp->defunct = 1;
drivers/ptp/ptp_clock.c
510
wake_up_interruptible(&ptp->tsev_wq);
drivers/ptp/ptp_clock.c
513
posix_clock_unregister(&ptp->clock);
drivers/ptp/ptp_clock.c
516
ptp_disable_all_events(ptp);
drivers/ptp/ptp_clock.c
518
if (ptp->kworker) {
drivers/ptp/ptp_clock.c
519
kthread_cancel_delayed_work_sync(&ptp->aux_work);
drivers/ptp/ptp_clock.c
520
kthread_destroy_worker(ptp->kworker);
drivers/ptp/ptp_clock.c
524
if (ptp->pps_source)
drivers/ptp/ptp_clock.c
525
pps_unregister_source(ptp->pps_source);
drivers/ptp/ptp_clock.c
528
put_device(&ptp->dev);
drivers/ptp/ptp_clock.c
534
void ptp_clock_event(struct ptp_clock *ptp, struct ptp_clock_event *event)
drivers/ptp/ptp_clock.c
548
spin_lock_irqsave(&ptp->tsevqs_lock, flags);
drivers/ptp/ptp_clock.c
549
list_for_each_entry(tsevq, &ptp->tsevqs, qlist) {
drivers/ptp/ptp_clock.c
553
spin_unlock_irqrestore(&ptp->tsevqs_lock, flags);
drivers/ptp/ptp_clock.c
554
wake_up_interruptible(&ptp->tsev_wq);
drivers/ptp/ptp_clock.c
559
pps_event(ptp->pps_source, &evt, PTP_PPS_EVENT, NULL);
drivers/ptp/ptp_clock.c
563
pps_event(ptp->pps_source, &event->pps_times,
drivers/ptp/ptp_clock.c
570
int ptp_clock_index(struct ptp_clock *ptp)
drivers/ptp/ptp_clock.c
572
return ptp->index;
drivers/ptp/ptp_clock.c
585
struct ptp_clock *ptp;
drivers/ptp/ptp_clock.c
594
ptp = dev_get_drvdata(dev);
drivers/ptp/ptp_clock.c
595
phc_index = ptp_clock_index(ptp);
drivers/ptp/ptp_clock.c
611
struct ptp_clock *ptp;
drivers/ptp/ptp_clock.c
620
ptp = dev_get_drvdata(dev);
drivers/ptp/ptp_clock.c
621
phc_index = ptp_clock_index(ptp);
drivers/ptp/ptp_clock.c
628
int ptp_find_pin(struct ptp_clock *ptp,
drivers/ptp/ptp_clock.c
634
for (i = 0; i < ptp->info->n_pins; i++) {
drivers/ptp/ptp_clock.c
635
if (ptp->info->pin_config[i].func == func &&
drivers/ptp/ptp_clock.c
636
ptp->info->pin_config[i].chan == chan) {
drivers/ptp/ptp_clock.c
637
pin = &ptp->info->pin_config[i];
drivers/ptp/ptp_clock.c
646
int ptp_find_pin_unlocked(struct ptp_clock *ptp,
drivers/ptp/ptp_clock.c
651
mutex_lock(&ptp->pincfg_mux);
drivers/ptp/ptp_clock.c
653
result = ptp_find_pin(ptp, func, chan);
drivers/ptp/ptp_clock.c
655
mutex_unlock(&ptp->pincfg_mux);
drivers/ptp/ptp_clock.c
661
int ptp_schedule_worker(struct ptp_clock *ptp, unsigned long delay)
drivers/ptp/ptp_clock.c
663
return kthread_mod_delayed_work(ptp->kworker, &ptp->aux_work, delay);
drivers/ptp/ptp_clock.c
667
void ptp_cancel_worker_sync(struct ptp_clock *ptp)
drivers/ptp/ptp_clock.c
669
kthread_cancel_delayed_work_sync(&ptp->aux_work);
drivers/ptp/ptp_clock.c
97
struct ptp_clock *ptp = container_of(pc, struct ptp_clock, clock);
drivers/ptp/ptp_clock.c
99
if (ptp_clock_freerun(ptp)) {
drivers/ptp/ptp_clockmatrix.c
1520
static long idtcm_work_handler(struct ptp_clock_info *ptp)
drivers/ptp/ptp_clockmatrix.c
1522
struct idtcm_channel *channel = container_of(ptp, struct idtcm_channel, caps);
drivers/ptp/ptp_clockmatrix.c
1690
static s32 idtcm_getmaxphase(struct ptp_clock_info *ptp __always_unused)
drivers/ptp/ptp_clockmatrix.c
1772
static int idtcm_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts)
drivers/ptp/ptp_clockmatrix.c
1774
struct idtcm_channel *channel = container_of(ptp, struct idtcm_channel, caps);
drivers/ptp/ptp_clockmatrix.c
1789
static int idtcm_settime_deprecated(struct ptp_clock_info *ptp,
drivers/ptp/ptp_clockmatrix.c
1792
struct idtcm_channel *channel = container_of(ptp, struct idtcm_channel, caps);
drivers/ptp/ptp_clockmatrix.c
1807
static int idtcm_settime(struct ptp_clock_info *ptp,
drivers/ptp/ptp_clockmatrix.c
1810
struct idtcm_channel *channel = container_of(ptp, struct idtcm_channel, caps);
drivers/ptp/ptp_clockmatrix.c
1825
static int idtcm_adjtime_deprecated(struct ptp_clock_info *ptp, s64 delta)
drivers/ptp/ptp_clockmatrix.c
1827
struct idtcm_channel *channel = container_of(ptp, struct idtcm_channel, caps);
drivers/ptp/ptp_clockmatrix.c
1842
static int idtcm_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/ptp/ptp_clockmatrix.c
1844
struct idtcm_channel *channel = container_of(ptp, struct idtcm_channel, caps);
drivers/ptp/ptp_clockmatrix.c
1877
static int idtcm_adjphase(struct ptp_clock_info *ptp, s32 delta)
drivers/ptp/ptp_clockmatrix.c
1879
struct idtcm_channel *channel = container_of(ptp, struct idtcm_channel, caps);
drivers/ptp/ptp_clockmatrix.c
1894
static int idtcm_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/ptp/ptp_clockmatrix.c
1896
struct idtcm_channel *channel = container_of(ptp, struct idtcm_channel, caps);
drivers/ptp/ptp_clockmatrix.c
1919
static int idtcm_enable(struct ptp_clock_info *ptp,
drivers/ptp/ptp_clockmatrix.c
1922
struct idtcm_channel *channel = container_of(ptp, struct idtcm_channel, caps);
drivers/ptp/ptp_clockmatrix.c
2012
static int idtcm_verify_pin(struct ptp_clock_info *ptp, unsigned int pin,
drivers/ptp/ptp_dfl_tod.c
126
static int dfl_tod_adjust_fine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/ptp/ptp_dfl_tod.c
128
struct dfl_tod *dt = container_of(ptp, struct dfl_tod, ptp_clock_ops);
drivers/ptp/ptp_dfl_tod.c
171
static int dfl_tod_adjust_time(struct ptp_clock_info *ptp, s64 delta)
drivers/ptp/ptp_dfl_tod.c
173
struct dfl_tod *dt = container_of(ptp, struct dfl_tod, ptp_clock_ops);
drivers/ptp/ptp_dfl_tod.c
226
static int dfl_tod_get_timex(struct ptp_clock_info *ptp, struct timespec64 *ts,
drivers/ptp/ptp_dfl_tod.c
229
struct dfl_tod *dt = container_of(ptp, struct dfl_tod, ptp_clock_ops);
drivers/ptp/ptp_dfl_tod.c
251
static int dfl_tod_set_time(struct ptp_clock_info *ptp,
drivers/ptp/ptp_dfl_tod.c
254
struct dfl_tod *dt = container_of(ptp, struct dfl_tod, ptp_clock_ops);
drivers/ptp/ptp_dte.c
137
static int ptp_dte_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/ptp/ptp_dte.c
142
struct ptp_dte *ptp_dte = container_of(ptp, struct ptp_dte, caps);
drivers/ptp/ptp_dte.c
161
static int ptp_dte_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/ptp/ptp_dte.c
164
struct ptp_dte *ptp_dte = container_of(ptp, struct ptp_dte, caps);
drivers/ptp/ptp_dte.c
173
static int ptp_dte_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts)
drivers/ptp/ptp_dte.c
176
struct ptp_dte *ptp_dte = container_of(ptp, struct ptp_dte, caps);
drivers/ptp/ptp_dte.c
185
static int ptp_dte_settime(struct ptp_clock_info *ptp,
drivers/ptp/ptp_dte.c
189
struct ptp_dte *ptp_dte = container_of(ptp, struct ptp_dte, caps);
drivers/ptp/ptp_dte.c
210
static int ptp_dte_enable(struct ptp_clock_info *ptp,
drivers/ptp/ptp_fc3.c
373
static int idtfc3_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts)
drivers/ptp/ptp_fc3.c
375
struct idtfc3 *idtfc3 = container_of(ptp, struct idtfc3, caps);
drivers/ptp/ptp_fc3.c
408
static int idtfc3_settime(struct ptp_clock_info *ptp, const struct timespec64 *ts)
drivers/ptp/ptp_fc3.c
410
struct idtfc3 *idtfc3 = container_of(ptp, struct idtfc3, caps);
drivers/ptp/ptp_fc3.c
442
static int idtfc3_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/ptp/ptp_fc3.c
444
struct idtfc3 *idtfc3 = container_of(ptp, struct idtfc3, caps);
drivers/ptp/ptp_fc3.c
479
static int idtfc3_adjphase(struct ptp_clock_info *ptp, s32 delta)
drivers/ptp/ptp_fc3.c
481
struct idtfc3 *idtfc3 = container_of(ptp, struct idtfc3, caps);
drivers/ptp/ptp_fc3.c
522
static int idtfc3_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/ptp/ptp_fc3.c
524
struct idtfc3 *idtfc3 = container_of(ptp, struct idtfc3, caps);
drivers/ptp/ptp_fc3.c
534
static int idtfc3_enable(struct ptp_clock_info *ptp,
drivers/ptp/ptp_fc3.c
537
struct idtfc3 *idtfc3 = container_of(ptp, struct idtfc3, caps);
drivers/ptp/ptp_fc3.c
574
static long idtfc3_aux_work(struct ptp_clock_info *ptp)
drivers/ptp/ptp_fc3.c
576
struct idtfc3 *idtfc3 = container_of(ptp, struct idtfc3, caps);
drivers/ptp/ptp_idt82p33.c
1010
static int idt82p33_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/ptp/ptp_idt82p33.c
1013
container_of(ptp, struct idt82p33_channel, caps);
drivers/ptp/ptp_idt82p33.c
1036
static int idt82p33_adjtime(struct ptp_clock_info *ptp, s64 delta_ns)
drivers/ptp/ptp_idt82p33.c
1039
container_of(ptp, struct idt82p33_channel, caps);
drivers/ptp/ptp_idt82p33.c
1067
static int idt82p33_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts)
drivers/ptp/ptp_idt82p33.c
1070
container_of(ptp, struct idt82p33_channel, caps);
drivers/ptp/ptp_idt82p33.c
1084
static int idt82p33_settime(struct ptp_clock_info *ptp,
drivers/ptp/ptp_idt82p33.c
1088
container_of(ptp, struct idt82p33_channel, caps);
drivers/ptp/ptp_idt82p33.c
1139
static int idt82p33_verify_pin(struct ptp_clock_info *ptp, unsigned int pin,
drivers/ptp/ptp_idt82p33.c
854
static long idt82p33_work_handler(struct ptp_clock_info *ptp)
drivers/ptp/ptp_idt82p33.c
857
container_of(ptp, struct idt82p33_channel, caps);
drivers/ptp/ptp_idt82p33.c
931
static int idt82p33_enable(struct ptp_clock_info *ptp,
drivers/ptp/ptp_idt82p33.c
935
container_of(ptp, struct idt82p33_channel, caps);
drivers/ptp/ptp_idt82p33.c
969
static s32 idt82p33_getmaxphase(__always_unused struct ptp_clock_info *ptp)
drivers/ptp/ptp_idt82p33.c
974
static int idt82p33_adjwritephase(struct ptp_clock_info *ptp, s32 offset_ns)
drivers/ptp/ptp_idt82p33.c
977
container_of(ptp, struct idt82p33_channel, caps);
drivers/ptp/ptp_kvm_common.c
105
static int ptp_kvm_enable(struct ptp_clock_info *ptp,
drivers/ptp/ptp_kvm_common.c
58
static int ptp_kvm_getcrosststamp(struct ptp_clock_info *ptp,
drivers/ptp/ptp_kvm_common.c
69
static int ptp_kvm_adjfine(struct ptp_clock_info *ptp, long delta)
drivers/ptp/ptp_kvm_common.c
74
static int ptp_kvm_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/ptp/ptp_kvm_common.c
79
static int ptp_kvm_settime(struct ptp_clock_info *ptp,
drivers/ptp/ptp_kvm_common.c
85
static int ptp_kvm_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts)
drivers/ptp/ptp_netc.c
130
#define ptp_to_netc_timer(ptp) container_of((ptp), struct netc_timer, caps)
drivers/ptp/ptp_netc.c
597
static int netc_timer_enable(struct ptp_clock_info *ptp,
drivers/ptp/ptp_netc.c
600
struct netc_timer *priv = ptp_to_netc_timer(ptp);
drivers/ptp/ptp_netc.c
614
static int netc_timer_perout_loopback(struct ptp_clock_info *ptp,
drivers/ptp/ptp_netc.c
617
struct netc_timer *priv = ptp_to_netc_timer(ptp);
drivers/ptp/ptp_netc.c
659
static int netc_timer_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/ptp/ptp_netc.c
661
struct netc_timer *priv = ptp_to_netc_timer(ptp);
drivers/ptp/ptp_netc.c
670
static int netc_timer_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/ptp/ptp_netc.c
672
struct netc_timer *priv = ptp_to_netc_timer(ptp);
drivers/ptp/ptp_netc.c
695
static int netc_timer_gettimex64(struct ptp_clock_info *ptp,
drivers/ptp/ptp_netc.c
699
struct netc_timer *priv = ptp_to_netc_timer(ptp);
drivers/ptp/ptp_netc.c
716
static int netc_timer_settime64(struct ptp_clock_info *ptp,
drivers/ptp/ptp_netc.c
719
struct netc_timer *priv = ptp_to_netc_timer(ptp);
drivers/ptp/ptp_ocp.c
2171
ptp_clock_event(ext->bp->ptp, &ev);
drivers/ptp/ptp_ocp.c
2186
ptp_clock_event(ext->bp->ptp, &ev);
drivers/ptp/ptp_ocp.c
357
struct ptp_clock *ptp;
drivers/ptp/ptp_ocp.c
4093
seq_printf(s, "%7s: /dev/ptp%d\n", "PTP", ptp_clock_index(bp->ptp));
drivers/ptp/ptp_ocp.c
4479
sprintf(buf, "ptp%d", ptp_clock_index(bp->ptp));
drivers/ptp/ptp_ocp.c
4482
pps = pps_lookup_dev(bp->ptp);
drivers/ptp/ptp_ocp.c
4502
ptp_clock_index(bp->ptp));
drivers/ptp/ptp_ocp.c
4578
if (bp->ptp)
drivers/ptp/ptp_ocp.c
4579
ptp_clock_unregister(bp->ptp);
drivers/ptp/ptp_ocp.c
4776
bp->ptp = ptp_clock_register(&bp->ptp_info, &pdev->dev);
drivers/ptp/ptp_ocp.c
4777
if (IS_ERR(bp->ptp)) {
drivers/ptp/ptp_ocp.c
4778
err = PTR_ERR(bp->ptp);
drivers/ptp/ptp_ocp.c
4780
bp->ptp = NULL;
drivers/ptp/ptp_pch.c
340
static int ptp_pch_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/ptp/ptp_pch.c
343
struct pch_dev *pch_dev = container_of(ptp, struct pch_dev, caps);
drivers/ptp/ptp_pch.c
353
static int ptp_pch_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/ptp/ptp_pch.c
357
struct pch_dev *pch_dev = container_of(ptp, struct pch_dev, caps);
drivers/ptp/ptp_pch.c
369
static int ptp_pch_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts)
drivers/ptp/ptp_pch.c
373
struct pch_dev *pch_dev = container_of(ptp, struct pch_dev, caps);
drivers/ptp/ptp_pch.c
384
static int ptp_pch_settime(struct ptp_clock_info *ptp,
drivers/ptp/ptp_pch.c
389
struct pch_dev *pch_dev = container_of(ptp, struct pch_dev, caps);
drivers/ptp/ptp_pch.c
401
static int ptp_pch_enable(struct ptp_clock_info *ptp,
drivers/ptp/ptp_pch.c
404
struct pch_dev *pch_dev = container_of(ptp, struct pch_dev, caps);
drivers/ptp/ptp_private.h
105
static inline bool ptp_vclock_in_use(struct ptp_clock *ptp)
drivers/ptp/ptp_private.h
116
if (ptp->is_virtual_clock)
drivers/ptp/ptp_private.h
119
if (mutex_lock_interruptible(&ptp->n_vclocks_mux))
drivers/ptp/ptp_private.h
122
if (ptp->n_vclocks)
drivers/ptp/ptp_private.h
125
mutex_unlock(&ptp->n_vclocks_mux);
drivers/ptp/ptp_private.h
131
static inline bool ptp_clock_freerun(struct ptp_clock *ptp)
drivers/ptp/ptp_private.h
133
if (ptp->has_cycles)
drivers/ptp/ptp_private.h
136
return ptp_vclock_in_use(ptp);
drivers/ptp/ptp_private.h
145
void ptp_disable_all_events(struct ptp_clock *ptp);
drivers/ptp/ptp_private.h
148
int ptp_set_pinfunc(struct ptp_clock *ptp, unsigned int pin,
drivers/ptp/ptp_private.h
170
int ptp_populate_pin_groups(struct ptp_clock *ptp);
drivers/ptp/ptp_private.h
171
void ptp_cleanup_pin_groups(struct ptp_clock *ptp);
drivers/ptp/ptp_qoriq.c
202
int ptp_qoriq_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/ptp/ptp_qoriq.c
207
struct ptp_qoriq *ptp_qoriq = container_of(ptp, struct ptp_qoriq, caps);
drivers/ptp/ptp_qoriq.c
233
int ptp_qoriq_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/ptp/ptp_qoriq.c
235
struct ptp_qoriq *ptp_qoriq = container_of(ptp, struct ptp_qoriq, caps);
drivers/ptp/ptp_qoriq.c
261
int ptp_qoriq_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts)
drivers/ptp/ptp_qoriq.c
265
struct ptp_qoriq *ptp_qoriq = container_of(ptp, struct ptp_qoriq, caps);
drivers/ptp/ptp_qoriq.c
279
int ptp_qoriq_settime(struct ptp_clock_info *ptp,
drivers/ptp/ptp_qoriq.c
284
struct ptp_qoriq *ptp_qoriq = container_of(ptp, struct ptp_qoriq, caps);
drivers/ptp/ptp_qoriq.c
300
int ptp_qoriq_enable(struct ptp_clock_info *ptp,
drivers/ptp/ptp_qoriq.c
303
struct ptp_qoriq *ptp_qoriq = container_of(ptp, struct ptp_qoriq, caps);
drivers/ptp/ptp_qoriq.c
468
static int ptp_qoriq_perout_loopback(struct ptp_clock_info *ptp,
drivers/ptp/ptp_qoriq.c
471
struct ptp_qoriq *ptp_qoriq = container_of(ptp, struct ptp_qoriq, caps);
drivers/ptp/ptp_s390.c
13
static int ptp_s390_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/ptp/ptp_s390.c
18
static int ptp_s390_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/ptp/ptp_s390.c
33
static int ptp_s390_stcke_gettime(struct ptp_clock_info *ptp,
drivers/ptp/ptp_s390.c
46
static int ptp_s390_qpt_gettime(struct ptp_clock_info *ptp,
drivers/ptp/ptp_s390.c
56
static int ptp_s390_settime(struct ptp_clock_info *ptp,
drivers/ptp/ptp_s390.c
75
static int ptp_s390_getcrosststamp(struct ptp_clock_info *ptp,
drivers/ptp/ptp_sysfs.c
115
struct ptp_clock *ptp = dev_get_drvdata(dev);
drivers/ptp/ptp_sysfs.c
116
struct ptp_clock_info *ops = ptp->info;
drivers/ptp/ptp_sysfs.c
143
struct ptp_clock *ptp = dev_get_drvdata(dev);
drivers/ptp/ptp_sysfs.c
144
struct ptp_clock_info *ops = ptp->info;
drivers/ptp/ptp_sysfs.c
16
struct ptp_clock *ptp = dev_get_drvdata(dev);
drivers/ptp/ptp_sysfs.c
168
struct ptp_clock *ptp = dev_get_drvdata(dev);
drivers/ptp/ptp_sysfs.c
169
struct ptp_clock_info *info = ptp->info;
drivers/ptp/ptp_sysfs.c
17
return sysfs_emit(page, "%s\n", ptp->info->name);
drivers/ptp/ptp_sysfs.c
190
struct ptp_clock *ptp = dev_get_drvdata(dev);
drivers/ptp/ptp_sysfs.c
193
if (mutex_lock_interruptible(&ptp->n_vclocks_mux))
drivers/ptp/ptp_sysfs.c
196
size = sysfs_emit(page, "%u\n", ptp->n_vclocks);
drivers/ptp/ptp_sysfs.c
198
mutex_unlock(&ptp->n_vclocks_mux);
drivers/ptp/ptp_sysfs.c
207
struct ptp_clock *ptp = dev_get_drvdata(dev);
drivers/ptp/ptp_sysfs.c
215
if (mutex_lock_interruptible(&ptp->n_vclocks_mux))
drivers/ptp/ptp_sysfs.c
218
if (num > ptp->max_vclocks) {
drivers/ptp/ptp_sysfs.c
219
dev_err(dev, "max value is %d\n", ptp->max_vclocks);
drivers/ptp/ptp_sysfs.c
224
if (num > ptp->n_vclocks) {
drivers/ptp/ptp_sysfs.c
225
for (i = 0; i < num - ptp->n_vclocks; i++) {
drivers/ptp/ptp_sysfs.c
226
vclock = ptp_vclock_register(ptp);
drivers/ptp/ptp_sysfs.c
230
*(ptp->vclock_index + ptp->n_vclocks + i) =
drivers/ptp/ptp_sysfs.c
239
if (num < ptp->n_vclocks) {
drivers/ptp/ptp_sysfs.c
240
i = ptp->n_vclocks - num;
drivers/ptp/ptp_sysfs.c
244
for (i = 1; i <= ptp->n_vclocks - num; i++)
drivers/ptp/ptp_sysfs.c
245
*(ptp->vclock_index + ptp->n_vclocks - i) = -1;
drivers/ptp/ptp_sysfs.c
249
if (!ptp->has_cycles) {
drivers/ptp/ptp_sysfs.c
25
struct ptp_clock *ptp = dev_get_drvdata(dev);
drivers/ptp/ptp_sysfs.c
256
ptp->n_vclocks = num;
drivers/ptp/ptp_sysfs.c
257
mutex_unlock(&ptp->n_vclocks_mux);
drivers/ptp/ptp_sysfs.c
261
mutex_unlock(&ptp->n_vclocks_mux);
drivers/ptp/ptp_sysfs.c
269
struct ptp_clock *ptp = dev_get_drvdata(dev);
drivers/ptp/ptp_sysfs.c
27
return sysfs_emit(page, "%d\n", ptp->info->getmaxphase(ptp->info));
drivers/ptp/ptp_sysfs.c
272
size = sysfs_emit(page, "%u\n", ptp->max_vclocks);
drivers/ptp/ptp_sysfs.c
281
struct ptp_clock *ptp = dev_get_drvdata(dev);
drivers/ptp/ptp_sysfs.c
290
if (max == ptp->max_vclocks)
drivers/ptp/ptp_sysfs.c
293
if (mutex_lock_interruptible(&ptp->n_vclocks_mux))
drivers/ptp/ptp_sysfs.c
296
if (max < ptp->n_vclocks)
drivers/ptp/ptp_sysfs.c
305
size = sizeof(int) * ptp->n_vclocks;
drivers/ptp/ptp_sysfs.c
306
memcpy(vclock_index, ptp->vclock_index, size);
drivers/ptp/ptp_sysfs.c
308
kfree(ptp->vclock_index);
drivers/ptp/ptp_sysfs.c
309
ptp->vclock_index = vclock_index;
drivers/ptp/ptp_sysfs.c
310
ptp->max_vclocks = max;
drivers/ptp/ptp_sysfs.c
312
mutex_unlock(&ptp->n_vclocks_mux);
drivers/ptp/ptp_sysfs.c
316
mutex_unlock(&ptp->n_vclocks_mux);
drivers/ptp/ptp_sysfs.c
345
struct ptp_clock *ptp = dev_get_drvdata(dev);
drivers/ptp/ptp_sysfs.c
346
struct ptp_clock_info *info = ptp->info;
drivers/ptp/ptp_sysfs.c
35
struct ptp_clock *ptp = dev_get_drvdata(dev); \
drivers/ptp/ptp_sysfs.c
36
return sysfs_emit(page, "%d\n", ptp->info->var); \
drivers/ptp/ptp_sysfs.c
361
if (ptp->is_virtual_clock)
drivers/ptp/ptp_sysfs.c
381
static int ptp_pin_name2index(struct ptp_clock *ptp, const char *name)
drivers/ptp/ptp_sysfs.c
384
for (i = 0; i < ptp->info->n_pins; i++) {
drivers/ptp/ptp_sysfs.c
385
if (!strcmp(ptp->info->pin_config[i].name, name))
drivers/ptp/ptp_sysfs.c
394
struct ptp_clock *ptp = dev_get_drvdata(dev);
drivers/ptp/ptp_sysfs.c
398
index = ptp_pin_name2index(ptp, attr->attr.name);
drivers/ptp/ptp_sysfs.c
402
if (mutex_lock_interruptible(&ptp->pincfg_mux))
drivers/ptp/ptp_sysfs.c
405
func = ptp->info->pin_config[index].func;
drivers/ptp/ptp_sysfs.c
406
chan = ptp->info->pin_config[index].chan;
drivers/ptp/ptp_sysfs.c
408
mutex_unlock(&ptp->pincfg_mux);
drivers/ptp/ptp_sysfs.c
416
struct ptp_clock *ptp = dev_get_drvdata(dev);
drivers/ptp/ptp_sysfs.c
424
index = ptp_pin_name2index(ptp, attr->attr.name);
drivers/ptp/ptp_sysfs.c
428
if (mutex_lock_interruptible(&ptp->pincfg_mux))
drivers/ptp/ptp_sysfs.c
430
err = ptp_set_pinfunc(ptp, index, func, chan);
drivers/ptp/ptp_sysfs.c
431
mutex_unlock(&ptp->pincfg_mux);
drivers/ptp/ptp_sysfs.c
438
int ptp_populate_pin_groups(struct ptp_clock *ptp)
drivers/ptp/ptp_sysfs.c
440
struct ptp_clock_info *info = ptp->info;
drivers/ptp/ptp_sysfs.c
446
ptp->pin_dev_attr = kzalloc_objs(*ptp->pin_dev_attr, n_pins);
drivers/ptp/ptp_sysfs.c
447
if (!ptp->pin_dev_attr)
drivers/ptp/ptp_sysfs.c
450
ptp->pin_attr = kzalloc_objs(*ptp->pin_attr, 1 + n_pins);
drivers/ptp/ptp_sysfs.c
451
if (!ptp->pin_attr)
drivers/ptp/ptp_sysfs.c
455
struct device_attribute *da = &ptp->pin_dev_attr[i];
drivers/ptp/ptp_sysfs.c
461
ptp->pin_attr[i] = &da->attr;
drivers/ptp/ptp_sysfs.c
464
ptp->pin_attr_group.name = "pins";
drivers/ptp/ptp_sysfs.c
465
ptp->pin_attr_group.attrs = ptp->pin_attr;
drivers/ptp/ptp_sysfs.c
467
ptp->pin_attr_groups[0] = &ptp->pin_attr_group;
drivers/ptp/ptp_sysfs.c
472
kfree(ptp->pin_dev_attr);
drivers/ptp/ptp_sysfs.c
477
void ptp_cleanup_pin_groups(struct ptp_clock *ptp)
drivers/ptp/ptp_sysfs.c
479
kfree(ptp->pin_attr);
drivers/ptp/ptp_sysfs.c
480
kfree(ptp->pin_dev_attr);
drivers/ptp/ptp_sysfs.c
51
struct ptp_clock *ptp = dev_get_drvdata(dev);
drivers/ptp/ptp_sysfs.c
52
struct ptp_clock_info *ops = ptp->info;
drivers/ptp/ptp_sysfs.c
76
struct ptp_clock *ptp = dev_get_drvdata(dev);
drivers/ptp/ptp_sysfs.c
83
cnt = list_count_nodes(&ptp->tsevqs);
drivers/ptp/ptp_sysfs.c
88
queue = list_first_entry(&ptp->tsevqs, struct timestamp_event_queue,
drivers/ptp/ptp_vclock.c
111
static int ptp_vclock_settime(struct ptp_clock_info *ptp,
drivers/ptp/ptp_vclock.c
114
struct ptp_vclock *vclock = info_to_vclock(ptp);
drivers/ptp/ptp_vclock.c
125
static int ptp_vclock_getcrosststamp(struct ptp_clock_info *ptp,
drivers/ptp/ptp_vclock.c
128
struct ptp_vclock *vclock = info_to_vclock(ptp);
drivers/ptp/ptp_vclock.c
147
static long ptp_vclock_refresh(struct ptp_clock_info *ptp)
drivers/ptp/ptp_vclock.c
149
struct ptp_vclock *vclock = info_to_vclock(ptp);
drivers/ptp/ptp_vclock.c
157
static void ptp_vclock_set_subclass(struct ptp_clock *ptp)
drivers/ptp/ptp_vclock.c
159
lockdep_set_subclass(&ptp->clock.rwsem, PTP_LOCK_VIRTUAL);
drivers/ptp/ptp_vclock.c
175
struct ptp_clock *ptp = vclock->pclock;
drivers/ptp/ptp_vclock.c
178
ptp->info->getcycles64(ptp->info, &ts);
drivers/ptp/ptp_vclock.c
243
struct ptp_clock *ptp;
drivers/ptp/ptp_vclock.c
255
ptp = dev_get_drvdata(dev);
drivers/ptp/ptp_vclock.c
257
if (mutex_lock_interruptible(&ptp->n_vclocks_mux)) {
drivers/ptp/ptp_vclock.c
262
*vclock_index = kzalloc(sizeof(int) * ptp->n_vclocks, GFP_KERNEL);
drivers/ptp/ptp_vclock.c
266
memcpy(*vclock_index, ptp->vclock_index, sizeof(int) * ptp->n_vclocks);
drivers/ptp/ptp_vclock.c
267
num = ptp->n_vclocks;
drivers/ptp/ptp_vclock.c
269
mutex_unlock(&ptp->n_vclocks_mux);
drivers/ptp/ptp_vclock.c
43
static int ptp_vclock_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/ptp/ptp_vclock.c
45
struct ptp_vclock *vclock = info_to_vclock(ptp);
drivers/ptp/ptp_vclock.c
60
static int ptp_vclock_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/ptp/ptp_vclock.c
62
struct ptp_vclock *vclock = info_to_vclock(ptp);
drivers/ptp/ptp_vclock.c
72
static int ptp_vclock_gettime(struct ptp_clock_info *ptp,
drivers/ptp/ptp_vclock.c
75
struct ptp_vclock *vclock = info_to_vclock(ptp);
drivers/ptp/ptp_vclock.c
87
static int ptp_vclock_gettimex(struct ptp_clock_info *ptp,
drivers/ptp/ptp_vclock.c
91
struct ptp_vclock *vclock = info_to_vclock(ptp);
drivers/ptp/ptp_vmclock.c
259
static int ptp_vmclock_getcrosststamp(struct ptp_clock_info *ptp,
drivers/ptp/ptp_vmclock.c
262
struct vmclock_state *st = container_of(ptp, struct vmclock_state,
drivers/ptp/ptp_vmclock.c
292
static int ptp_vmclock_adjfine(struct ptp_clock_info *ptp, long delta)
drivers/ptp/ptp_vmclock.c
297
static int ptp_vmclock_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/ptp/ptp_vmclock.c
302
static int ptp_vmclock_settime(struct ptp_clock_info *ptp,
drivers/ptp/ptp_vmclock.c
308
static int ptp_vmclock_gettimex(struct ptp_clock_info *ptp, struct timespec64 *ts,
drivers/ptp/ptp_vmclock.c
311
struct vmclock_state *st = container_of(ptp, struct vmclock_state,
drivers/ptp/ptp_vmclock.c
317
static int ptp_vmclock_enable(struct ptp_clock_info *ptp,
drivers/virtio/virtio_rtc_ptp.c
124
static int viortc_ptp_getcrosststamp(struct ptp_clock_info *ptp,
drivers/virtio/virtio_rtc_ptp.c
128
container_of(ptp, struct viortc_ptp_clock, ptp_info);
drivers/virtio/virtio_rtc_ptp.c
168
static int viortc_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
drivers/virtio/virtio_rtc_ptp.c
174
static int viortc_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
drivers/virtio/virtio_rtc_ptp.c
180
static int viortc_ptp_settime64(struct ptp_clock_info *ptp,
drivers/virtio/virtio_rtc_ptp.c
191
static int viortc_ptp_gettimex64(struct ptp_clock_info *ptp,
drivers/virtio/virtio_rtc_ptp.c
196
container_of(ptp, struct viortc_ptp_clock, ptp_info);
drivers/virtio/virtio_rtc_ptp.c
216
static int viortc_ptp_enable(struct ptp_clock_info *ptp,
include/linux/fsl/ptp_qoriq.h
189
int ptp_qoriq_adjfine(struct ptp_clock_info *ptp, long scaled_ppm);
include/linux/fsl/ptp_qoriq.h
190
int ptp_qoriq_adjtime(struct ptp_clock_info *ptp, s64 delta);
include/linux/fsl/ptp_qoriq.h
191
int ptp_qoriq_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts);
include/linux/fsl/ptp_qoriq.h
192
int ptp_qoriq_settime(struct ptp_clock_info *ptp,
include/linux/fsl/ptp_qoriq.h
194
int ptp_qoriq_enable(struct ptp_clock_info *ptp,
include/linux/ptp_clock_kernel.h
204
int (*adjfine)(struct ptp_clock_info *ptp, long scaled_ppm);
include/linux/ptp_clock_kernel.h
205
int (*adjphase)(struct ptp_clock_info *ptp, s32 phase);
include/linux/ptp_clock_kernel.h
206
s32 (*getmaxphase)(struct ptp_clock_info *ptp);
include/linux/ptp_clock_kernel.h
207
int (*adjtime)(struct ptp_clock_info *ptp, s64 delta);
include/linux/ptp_clock_kernel.h
208
int (*gettime64)(struct ptp_clock_info *ptp, struct timespec64 *ts);
include/linux/ptp_clock_kernel.h
209
int (*gettimex64)(struct ptp_clock_info *ptp, struct timespec64 *ts,
include/linux/ptp_clock_kernel.h
211
int (*getcrosststamp)(struct ptp_clock_info *ptp,
include/linux/ptp_clock_kernel.h
214
int (*getcycles64)(struct ptp_clock_info *ptp, struct timespec64 *ts);
include/linux/ptp_clock_kernel.h
215
int (*getcyclesx64)(struct ptp_clock_info *ptp, struct timespec64 *ts,
include/linux/ptp_clock_kernel.h
217
int (*getcrosscycles)(struct ptp_clock_info *ptp,
include/linux/ptp_clock_kernel.h
219
int (*enable)(struct ptp_clock_info *ptp,
include/linux/ptp_clock_kernel.h
221
int (*verify)(struct ptp_clock_info *ptp, unsigned int pin,
include/linux/ptp_clock_kernel.h
223
long (*do_aux_work)(struct ptp_clock_info *ptp);
include/linux/ptp_clock_kernel.h
224
int (*perout_loopback)(struct ptp_clock_info *ptp, unsigned int index,
include/linux/ptp_clock_kernel.h
353
extern int ptp_clock_unregister(struct ptp_clock *ptp);
include/linux/ptp_clock_kernel.h
362
extern void ptp_clock_event(struct ptp_clock *ptp,
include/linux/ptp_clock_kernel.h
371
extern int ptp_clock_index(struct ptp_clock *ptp);
include/linux/ptp_clock_kernel.h
407
int ptp_find_pin(struct ptp_clock *ptp,
include/linux/ptp_clock_kernel.h
425
int ptp_find_pin_unlocked(struct ptp_clock *ptp,
include/linux/ptp_clock_kernel.h
436
int ptp_schedule_worker(struct ptp_clock *ptp, unsigned long delay);
include/linux/ptp_clock_kernel.h
443
void ptp_cancel_worker_sync(struct ptp_clock *ptp);
include/linux/ptp_clock_kernel.h
449
static inline int ptp_clock_unregister(struct ptp_clock *ptp)
include/linux/ptp_clock_kernel.h
451
static inline void ptp_clock_event(struct ptp_clock *ptp,
include/linux/ptp_clock_kernel.h
454
static inline int ptp_clock_index(struct ptp_clock *ptp)
include/linux/ptp_clock_kernel.h
460
static inline int ptp_find_pin(struct ptp_clock *ptp,
include/linux/ptp_clock_kernel.h
463
static inline int ptp_find_pin_unlocked(struct ptp_clock *ptp,
include/linux/ptp_clock_kernel.h
467
static inline int ptp_schedule_worker(struct ptp_clock *ptp,
include/linux/ptp_clock_kernel.h
470
static inline void ptp_cancel_worker_sync(struct ptp_clock *ptp)
include/linux/qed/qed_eth_if.h
266
const struct qed_eth_ptp_ops *ptp;
include/soc/mscc/ocelot.h
885
u8 ptp:1;
include/soc/mscc/ocelot_ptp.h
48
int ocelot_ptp_gettime64(struct ptp_clock_info *ptp, struct timespec64 *ts);
include/soc/mscc/ocelot_ptp.h
49
int ocelot_ptp_settime64(struct ptp_clock_info *ptp,
include/soc/mscc/ocelot_ptp.h
51
int ocelot_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta);
include/soc/mscc/ocelot_ptp.h
52
int ocelot_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm);
include/soc/mscc/ocelot_ptp.h
53
int ocelot_ptp_verify(struct ptp_clock_info *ptp, unsigned int pin,
include/soc/mscc/ocelot_ptp.h
55
int ocelot_ptp_enable(struct ptp_clock_info *ptp,
net/ceph/auth_x.c
204
void **ptp;
net/ceph/auth_x.c
268
ptp = &tp;
net/ceph/auth_x.c
272
ptp = p;
net/ceph/auth_x.c
275
ceph_decode_32_safe(ptp, tpend, dlen, bad);
net/ceph/auth_x.c
277
ceph_decode_need(ptp, tpend, 1 + sizeof(u64), bad);
net/ceph/auth_x.c
278
blob_struct_v = ceph_decode_8(ptp);
net/ceph/auth_x.c
282
new_secret_id = ceph_decode_64(ptp);
net/ceph/auth_x.c
283
ret = ceph_decode_buffer(&new_ticket_blob, ptp, tpend);
security/smack/smack_lsm.c
492
static int smack_ptrace_traceme(struct task_struct *ptp)
security/smack/smack_lsm.c
498
return smk_ptrace_rule_check(ptp, skp, PTRACE_MODE_ATTACH, __func__);
sound/pci/ctxfi/ctvmem.c
125
unsigned long *ptp;
sound/pci/ctxfi/ctvmem.c
135
ptp = (unsigned long *)vm->ptp[0].area;
sound/pci/ctxfi/ctvmem.c
141
ptp[pte_start + i] = addr;
sound/pci/ctxfi/ctvmem.c
162
return (index >= CT_PTP_NUM) ? ~0UL : vm->ptp[index].addr;
sound/pci/ctxfi/ctvmem.c
183
PAGE_SIZE, &vm->ptp[i]);
sound/pci/ctxfi/ctvmem.c
233
snd_dma_free_pages(&vm->ptp[i]);
sound/pci/ctxfi/ctvmem.h
43
struct snd_dma_buffer ptp[CT_PTP_NUM]; /* Device page table pages */