/linux/drivers/ptp/ |
A D | ptp_chardev.c | 36 rq.perout.index = chan; in ptp_disable_pinfunc() 195 struct ptp_perout_request *perout = &req.perout; in ptp_ioctl() local 207 (perout->rsv[0] || perout->rsv[1] || in ptp_ioctl() 208 perout->rsv[2] || perout->rsv[3])) { in ptp_ioctl() 214 if (perout->on.sec > perout->period.sec || in ptp_ioctl() 215 (perout->on.sec == perout->period.sec && in ptp_ioctl() 216 perout->on.nsec > perout->period.nsec)) { in ptp_ioctl() 227 if (perout->phase.sec > perout->period.sec || in ptp_ioctl() 228 (perout->phase.sec == perout->period.sec && in ptp_ioctl() 229 perout->phase.nsec >= perout->period.nsec)) { in ptp_ioctl() [all …]
|
A D | ptp_sysfs.c | 106 cnt = sscanf(buf, "%u %lld %u %lld %u", &req.perout.index, in period_store() 107 &req.perout.start.sec, &req.perout.start.nsec, in period_store() 108 &req.perout.period.sec, &req.perout.period.nsec); in period_store() 111 if (req.perout.index >= ops->n_per_out) in period_store() 114 enable = req.perout.period.sec || req.perout.period.nsec; in period_store()
|
A D | ptp_idt82p33.c | 620 struct ptp_perout_request *perout) in idt82p33_perout_enable() argument 622 unsigned int flags = perout->flags; in idt82p33_perout_enable() 629 return idt82p33_output_enable(channel, enable, perout->index); in idt82p33_perout_enable() 690 &rq->perout); in idt82p33_enable() 692 else if (rq->perout.start.nsec || rq->perout.period.sec != 1 || in idt82p33_enable() 693 rq->perout.period.nsec) { in idt82p33_enable() 697 &rq->perout); in idt82p33_enable()
|
A D | ptp_clockmatrix.c | 1360 struct ptp_perout_request *perout, in idtcm_perout_enable() argument 1364 unsigned int flags = perout->flags; in idtcm_perout_enable() 1371 err = idtcm_output_enable(channel, enable, perout->index); in idtcm_perout_enable() 1952 err = idtcm_perout_enable(channel, &rq->perout, false); in idtcm_enable() 1954 else if (rq->perout.start.nsec || rq->perout.period.sec != 1 || in idtcm_enable() 1955 rq->perout.period.nsec) in idtcm_enable() 1958 err = idtcm_perout_enable(channel, &rq->perout, true); in idtcm_enable()
|
A D | ptp_ocp.c | 692 (rq->perout.period.sec != 1 || rq->perout.period.nsec != 0)) in ptp_ocp_enable()
|
/linux/drivers/net/ethernet/renesas/ |
A D | ravb_ptp.c | 219 struct ravb_ptp_perout *perout; in ravb_ptp_perout() local 251 perout = &priv->ptp.perout[req->index]; in ravb_ptp_perout() 252 perout->target = (u32)start_ns; in ravb_ptp_perout() 253 perout->period = (u32)period_ns; in ravb_ptp_perout() 265 perout = &priv->ptp.perout[req->index]; in ravb_ptp_perout() 266 perout->period = 0; in ravb_ptp_perout() 286 return ravb_ptp_perout(ptp, &req->perout, on); in ravb_ptp_enable() 321 struct ravb_ptp_perout *perout = priv->ptp.perout; in ravb_ptp_interrupt() local 323 if (perout->period) { in ravb_ptp_interrupt() 324 perout->target += perout->period; in ravb_ptp_interrupt() [all …]
|
A D | ravb.h | 1003 struct ravb_ptp_perout perout[N_PER_OUT]; member
|
/linux/drivers/net/ethernet/microchip/ |
A D | lan743x_ptp.c | 458 struct lan743x_ptp_perout *perout = &ptp->perout[index]; in lan743x_ptp_perout_off() local 460 if (perout->gpio_pin >= 0) { in lan743x_ptp_perout_off() 462 perout->gpio_pin = -1; in lan743x_ptp_perout_off() 476 (perout->event_ch); in lan743x_ptp_perout_off() 479 perout->event_ch = -1; in lan743x_ptp_perout_off() 493 struct lan743x_ptp_perout *perout = &ptp->perout[index]; in lan743x_ptp_perout() local 518 if (perout->event_ch < 0) { in lan743x_ptp_perout() 530 if (perout->gpio_pin < 0) { in lan743x_ptp_perout() 644 (perout->event_ch)); in lan743x_ptp_perout() 648 (perout->event_ch); in lan743x_ptp_perout() [all …]
|
A D | lan743x_ptp.h | 74 struct lan743x_ptp_perout perout[LAN743X_PTP_N_PEROUT]; member
|
/linux/drivers/net/ethernet/mscc/ |
A D | ocelot_ptp.c | 206 rq->perout.index); in ocelot_ptp_enable() 218 ts_period.tv_sec = rq->perout.period.sec; in ocelot_ptp_enable() 219 ts_period.tv_nsec = rq->perout.period.nsec; in ocelot_ptp_enable() 233 if (rq->perout.flags & PTP_PEROUT_PHASE) { in ocelot_ptp_enable() 234 ts_phase.tv_sec = rq->perout.phase.sec; in ocelot_ptp_enable() 235 ts_phase.tv_nsec = rq->perout.phase.nsec; in ocelot_ptp_enable() 238 ts_phase.tv_sec = rq->perout.start.sec; in ocelot_ptp_enable() 239 ts_phase.tv_nsec = rq->perout.start.nsec; in ocelot_ptp_enable() 250 if (rq->perout.flags & PTP_PEROUT_DUTY_CYCLE) { in ocelot_ptp_enable() 253 ts_on.tv_sec = rq->perout.on.sec; in ocelot_ptp_enable() [all …]
|
/linux/drivers/net/ethernet/stmicro/stmmac/ |
A D | stmmac_ptp.c | 187 if (rq->perout.flags) in stmmac_enable() 190 cfg = &priv->pps[rq->perout.index]; in stmmac_enable() 192 cfg->start.tv_sec = rq->perout.start.sec; in stmmac_enable() 193 cfg->start.tv_nsec = rq->perout.start.nsec; in stmmac_enable() 194 cfg->period.tv_sec = rq->perout.period.sec; in stmmac_enable() 195 cfg->period.tv_nsec = rq->perout.period.nsec; in stmmac_enable() 199 rq->perout.index, cfg, on, in stmmac_enable()
|
/linux/drivers/net/ethernet/intel/igc/ |
A D | igc_ptp.c | 304 if (rq->perout.flags) in igc_ptp_feature_enable_i225() 309 rq->perout.index); in igc_ptp_feature_enable_i225() 313 ts.tv_sec = rq->perout.period.sec; in igc_ptp_feature_enable_i225() 314 ts.tv_nsec = rq->perout.period.nsec; in igc_ptp_feature_enable_i225() 324 if (rq->perout.index == 1) { in igc_ptp_feature_enable_i225() 350 if (rq->perout.index == 1) { in igc_ptp_feature_enable_i225() 358 int i = rq->perout.index; in igc_ptp_feature_enable_i225() 361 igc->perout[i].start.tv_sec = rq->perout.start.sec; in igc_ptp_feature_enable_i225() 362 igc->perout[i].start.tv_nsec = rq->perout.start.nsec; in igc_ptp_feature_enable_i225() 363 igc->perout[i].period.tv_sec = ts.tv_sec; in igc_ptp_feature_enable_i225() [all …]
|
A D | igc.h | 249 } perout[IGC_N_PEROUT]; member
|
A D | igc_main.c | 5015 ts = timespec64_add(adapter->perout[0].start, in igc_tsync_interrupt() 5016 adapter->perout[0].period); in igc_tsync_interrupt() 5022 adapter->perout[0].start = ts; in igc_tsync_interrupt() 5029 ts = timespec64_add(adapter->perout[1].start, in igc_tsync_interrupt() 5030 adapter->perout[1].period); in igc_tsync_interrupt() 5036 adapter->perout[1].start = ts; in igc_tsync_interrupt()
|
/linux/tools/testing/selftests/ptp/ |
A D | testptp.c | 185 int64_t perout = -1; in main() local 227 perout = atoll(optarg); in main() 406 if (pulsewidth >= 0 && perout < 0) { in main() 411 if (perout_phase >= 0 && perout < 0) { in main() 416 if (perout >= 0) { in main() 423 perout_request.period.sec = perout / NSEC_PER_SEC; in main() 424 perout_request.period.nsec = perout % NSEC_PER_SEC; in main()
|
/linux/drivers/net/ethernet/intel/igb/ |
A D | igb_ptp.c | 568 if (rq->perout.flags) in igb_ptp_feature_enable_i210() 573 rq->perout.index); in igb_ptp_feature_enable_i210() 577 ts.tv_sec = rq->perout.period.sec; in igb_ptp_feature_enable_i210() 578 ts.tv_nsec = rq->perout.period.nsec; in igb_ptp_feature_enable_i210() 588 if (rq->perout.index == 1) { in igb_ptp_feature_enable_i210() 614 if (rq->perout.index == 1) { in igb_ptp_feature_enable_i210() 622 int i = rq->perout.index; in igb_ptp_feature_enable_i210() 624 igb->perout[i].start.tv_sec = rq->perout.start.sec; in igb_ptp_feature_enable_i210() 625 igb->perout[i].start.tv_nsec = rq->perout.start.nsec; in igb_ptp_feature_enable_i210() 628 wr32(trgttimh, rq->perout.start.sec); in igb_ptp_feature_enable_i210() [all …]
|
A D | igb.h | 638 } perout[IGB_N_PEROUT]; member
|
/linux/drivers/net/dsa/sja1105/ |
A D | sja1105_ptp.c | 729 struct ptp_perout_request *perout, in sja1105_per_out_enable() argument 738 if (perout->index != 0) in sja1105_per_out_enable() 742 if (perout->flags) in sja1105_per_out_enable() 753 .tv_sec = perout->period.sec, in sja1105_per_out_enable() 754 .tv_nsec = perout->period.nsec, in sja1105_per_out_enable() 757 .tv_sec = perout->start.sec, in sja1105_per_out_enable() 758 .tv_nsec = perout->start.nsec, in sja1105_per_out_enable() 859 rc = sja1105_per_out_enable(priv, &req->perout, on); in sja1105_ptp_enable()
|
/linux/drivers/net/ethernet/mellanox/mlx5/core/lib/ |
A D | clock.c | 490 if (rq->perout.flags) in mlx5_perout_configure() 493 if (rq->perout.index >= clock->ptp_info.n_pins) in mlx5_perout_configure() 497 pin = ptp_find_pin(clock->ptp, PTP_PF_PEROUT, rq->perout.index); in mlx5_perout_configure() 503 s64 sec = rq->perout.start.sec; in mlx5_perout_configure() 505 if (rq->perout.start.nsec) in mlx5_perout_configure() 510 ts.tv_sec = rq->perout.period.sec; in mlx5_perout_configure() 511 ts.tv_nsec = rq->perout.period.nsec; in mlx5_perout_configure()
|
/linux/drivers/net/phy/ |
A D | dp83640.c | 338 sec = clkreq->perout.start.sec; in periodic_output() 339 nsec = clkreq->perout.start.nsec; in periodic_output() 340 pwidth = clkreq->perout.period.sec * 1000000000UL; in periodic_output() 341 pwidth += clkreq->perout.period.nsec; in periodic_output() 517 if (rq->perout.flags) in ptp_dp83640_enable() 519 if (rq->perout.index >= N_PER_OUT) in ptp_dp83640_enable() 521 return periodic_output(clock, rq, on, rq->perout.index); in ptp_dp83640_enable()
|
/linux/include/linux/ |
A D | ptp_clock_kernel.h | 40 struct ptp_perout_request perout; member
|
/linux/drivers/net/ethernet/intel/ice/ |
A D | ice_ptp.c | 994 chan = rq->perout.index; in ice_ptp_gpio_enable_e810() 1013 clk_cfg.period = ((rq->perout.period.sec * NSEC_PER_SEC) + in ice_ptp_gpio_enable_e810() 1014 rq->perout.period.nsec); in ice_ptp_gpio_enable_e810() 1015 clk_cfg.start_time = ((rq->perout.start.sec * NSEC_PER_SEC) + in ice_ptp_gpio_enable_e810() 1016 rq->perout.start.nsec); in ice_ptp_gpio_enable_e810()
|
/linux/drivers/net/ethernet/broadcom/bnxt/ |
A D | bnxt_ptp.c | 300 ts.tv_sec = rq->perout.start.sec; in bnxt_ptp_perout_cfg() 301 ts.tv_nsec = rq->perout.start.nsec; in bnxt_ptp_perout_cfg() 352 rq->perout.index); in bnxt_ptp_enable()
|
/linux/drivers/net/ethernet/aquantia/atlantic/ |
A D | aq_ptp.c | 393 struct ptp_clock_time *t = &rq->perout.period; in aq_ptp_perout_pin_configure() 394 struct ptp_clock_time *s = &rq->perout.start; in aq_ptp_perout_pin_configure() 397 u32 pin_index = rq->perout.index; in aq_ptp_perout_pin_configure()
|
/linux/drivers/net/ethernet/ti/ |
A D | am65-cpts.c | 605 return am65_cpts_perout_enable(cpts, &rq->perout, on); in am65_cpts_ptp_enable()
|