Home
last modified time | relevance | path

Searched refs:perout (Results 1 – 25 of 31) sorted by relevance

12

/linux-6.1.9/drivers/ptp/
Dptp_chardev.c36 rq.perout.index = chan; in ptp_disable_pinfunc()
189 if (copy_from_user(&req.perout, (void __user *)arg, in ptp_ioctl()
190 sizeof(req.perout))) { in ptp_ioctl()
195 struct ptp_perout_request *perout = &req.perout; in ptp_ioctl() local
197 if (perout->flags & ~PTP_PEROUT_VALID_FLAGS) { in ptp_ioctl()
206 if (!(perout->flags & PTP_PEROUT_DUTY_CYCLE) && in ptp_ioctl()
207 (perout->rsv[0] || perout->rsv[1] || in ptp_ioctl()
208 perout->rsv[2] || perout->rsv[3])) { in ptp_ioctl()
212 if (perout->flags & PTP_PEROUT_DUTY_CYCLE) { in ptp_ioctl()
214 if (perout->on.sec > perout->period.sec || in ptp_ioctl()
[all …]
Dptp_sysfs.c106 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()
Dptp_idt82p33.c509 struct ptp_perout_request *perout) in idt82p33_perout_enable() argument
511 unsigned int flags = perout->flags; in idt82p33_perout_enable()
518 return idt82p33_output_enable(channel, enable, perout->index); in idt82p33_perout_enable()
570 &rq->perout); in idt82p33_enable()
572 else if (rq->perout.start.nsec || rq->perout.period.sec != 1 || in idt82p33_enable()
573 rq->perout.period.nsec) in idt82p33_enable()
577 &rq->perout); in idt82p33_enable()
Dptp_clockmatrix.c1356 struct ptp_perout_request *perout, in idtcm_perout_enable() argument
1363 err = idtcm_output_enable(channel, enable, perout->index); in idtcm_perout_enable()
1947 err = idtcm_perout_enable(channel, &rq->perout, false); in idtcm_enable()
1949 else if (rq->perout.start.nsec || rq->perout.period.sec != 1 || in idtcm_enable()
1950 rq->perout.period.nsec) in idtcm_enable()
1953 err = idtcm_perout_enable(channel, &rq->perout, true); in idtcm_enable()
Dptp_ocp.c983 switch (rq->perout.index) { in ptp_ocp_enable()
988 if (on && (rq->perout.period.sec != 1 || in ptp_ocp_enable()
989 rq->perout.period.nsec != 0)) in ptp_ocp_enable()
996 req = rq->perout.index - 1; in ptp_ocp_enable()
998 err = ptp_ocp_signal_from_perout(bp, req, &rq->perout); in ptp_ocp_enable()
/linux-6.1.9/drivers/net/ethernet/renesas/
Dravb_ptp.c219 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 …]
Dravb.h1011 struct ravb_ptp_perout perout[N_PER_OUT]; member
/linux-6.1.9/drivers/net/ethernet/microchip/
Dlan743x_ptp.c476 struct lan743x_ptp_perout *perout = &ptp->perout[index]; in lan743x_ptp_perout_off() local
478 if (perout->gpio_pin >= 0) { in lan743x_ptp_perout_off()
479 lan743x_gpio_release(adapter, perout->gpio_pin); in lan743x_ptp_perout_off()
480 perout->gpio_pin = -1; in lan743x_ptp_perout_off()
483 if (perout->event_ch >= 0) { in lan743x_ptp_perout_off()
486 PTP_CLOCK_TARGET_SEC_X(perout->event_ch), in lan743x_ptp_perout_off()
489 PTP_CLOCK_TARGET_NS_X(perout->event_ch), in lan743x_ptp_perout_off()
494 (perout->event_ch); in lan743x_ptp_perout_off()
496 lan743x_ptp_release_event_ch(adapter, perout->event_ch); in lan743x_ptp_perout_off()
497 perout->event_ch = -1; in lan743x_ptp_perout_off()
[all …]
Dlan743x_ptp.h82 struct lan743x_ptp_perout perout[LAN743X_PTP_N_PEROUT]; member
/linux-6.1.9/drivers/net/ethernet/intel/igb/
Digb_ptp.c562 if (rq->perout.flags) in igb_ptp_feature_enable_82580()
567 rq->perout.index); in igb_ptp_feature_enable_82580()
571 ts.tv_sec = rq->perout.period.sec; in igb_ptp_feature_enable_82580()
572 ts.tv_nsec = rq->perout.period.nsec; in igb_ptp_feature_enable_82580()
578 if (rq->perout.index == 1) { in igb_ptp_feature_enable_82580()
592 if (rq->perout.index == 1) { in igb_ptp_feature_enable_82580()
600 int i = rq->perout.index; in igb_ptp_feature_enable_82580()
638 igb->perout[i].start.tv_sec = start.tv_sec; in igb_ptp_feature_enable_82580()
639 igb->perout[i].start.tv_nsec = start.tv_nsec; in igb_ptp_feature_enable_82580()
640 igb->perout[i].period.tv_sec = ts.tv_sec; in igb_ptp_feature_enable_82580()
[all …]
Digb.h638 } perout[IGB_N_PEROUT]; member
/linux-6.1.9/drivers/net/ethernet/stmicro/stmmac/
Dstmmac_ptp.c186 if (rq->perout.flags) in stmmac_enable()
189 cfg = &priv->pps[rq->perout.index]; in stmmac_enable()
191 cfg->start.tv_sec = rq->perout.start.sec; in stmmac_enable()
192 cfg->start.tv_nsec = rq->perout.start.nsec; in stmmac_enable()
193 cfg->period.tv_sec = rq->perout.period.sec; in stmmac_enable()
194 cfg->period.tv_nsec = rq->perout.period.nsec; in stmmac_enable()
198 rq->perout.index, cfg, on, in stmmac_enable()
/linux-6.1.9/tools/testing/selftests/ptp/
Dtestptp.c187 int64_t perout = -1; in main() local
232 perout = atoll(optarg); in main()
428 if (pulsewidth >= 0 && perout < 0) { in main()
433 if (perout_phase >= 0 && perout < 0) { in main()
438 if (perout >= 0) { in main()
445 perout_request.period.sec = perout / NSEC_PER_SEC; in main()
446 perout_request.period.nsec = perout % NSEC_PER_SEC; in main()
/linux-6.1.9/drivers/net/ethernet/microchip/lan966x/
Dlan966x_ptp.c603 if (rq->perout.flags & ~(PTP_PEROUT_DUTY_CYCLE | in lan966x_ptp_perout()
607 pin = ptp_find_pin(phc->clock, PTP_PF_PEROUT, rq->perout.index); in lan966x_ptp_perout()
624 if (rq->perout.period.sec == 1 && in lan966x_ptp_perout()
625 rq->perout.period.nsec == 0) in lan966x_ptp_perout()
628 if (rq->perout.flags & PTP_PEROUT_PHASE) { in lan966x_ptp_perout()
629 ts_phase.tv_sec = rq->perout.phase.sec; in lan966x_ptp_perout()
630 ts_phase.tv_nsec = rq->perout.phase.nsec; in lan966x_ptp_perout()
632 ts_phase.tv_sec = rq->perout.start.sec; in lan966x_ptp_perout()
633 ts_phase.tv_nsec = rq->perout.start.nsec; in lan966x_ptp_perout()
642 if (rq->perout.flags & PTP_PEROUT_DUTY_CYCLE) { in lan966x_ptp_perout()
[all …]
/linux-6.1.9/drivers/net/ethernet/intel/igc/
Digc_ptp.c303 if (rq->perout.flags) in igc_ptp_feature_enable_i225()
308 rq->perout.index); in igc_ptp_feature_enable_i225()
312 ts.tv_sec = rq->perout.period.sec; in igc_ptp_feature_enable_i225()
313 ts.tv_nsec = rq->perout.period.nsec; in igc_ptp_feature_enable_i225()
323 if (rq->perout.index == 1) { in igc_ptp_feature_enable_i225()
349 if (rq->perout.index == 1) { in igc_ptp_feature_enable_i225()
359 int i = rq->perout.index; in igc_ptp_feature_enable_i225()
362 igc->perout[i].start.tv_sec = rq->perout.start.sec; in igc_ptp_feature_enable_i225()
363 igc->perout[i].start.tv_nsec = rq->perout.start.nsec; in igc_ptp_feature_enable_i225()
364 igc->perout[i].period.tv_sec = ts.tv_sec; in igc_ptp_feature_enable_i225()
[all …]
Digc.h252 } perout[IGC_N_PEROUT]; member
/linux-6.1.9/drivers/net/ethernet/mellanox/mlx5/core/lib/
Dclock.c482 ts.tv_nsec = rq->perout.period.nsec; in perout_conf_1pps()
483 ts.tv_sec = rq->perout.period.sec; in perout_conf_1pps()
489 *time_stamp = real_time ? perout_conf_real_time(rq->perout.start.sec, 0) : in perout_conf_1pps()
490 perout_conf_internal_timer(mdev, rq->perout.start.sec); in perout_conf_1pps()
504 if (rq->perout.flags & PTP_PEROUT_DUTY_CYCLE) { in mlx5_perout_conf_out_pulse_duration()
505 ts.tv_sec = rq->perout.on.sec; in mlx5_perout_conf_out_pulse_duration()
506 ts.tv_nsec = rq->perout.on.nsec; in mlx5_perout_conf_out_pulse_duration()
512 ts.tv_sec = rq->perout.period.sec; in mlx5_perout_conf_out_pulse_duration()
513 ts.tv_nsec = rq->perout.period.nsec; in mlx5_perout_conf_out_pulse_duration()
534 struct ptp_clock_time *time = &rq->perout.start; in perout_conf_npps_real_time()
[all …]
/linux-6.1.9/drivers/net/ethernet/mscc/
Docelot_ptp.c213 if (rq->perout.flags & ~(PTP_PEROUT_DUTY_CYCLE | in ocelot_ptp_enable()
218 rq->perout.index); in ocelot_ptp_enable()
230 ts_period.tv_sec = rq->perout.period.sec; in ocelot_ptp_enable()
231 ts_period.tv_nsec = rq->perout.period.nsec; in ocelot_ptp_enable()
245 if (rq->perout.flags & PTP_PEROUT_PHASE) { in ocelot_ptp_enable()
246 ts_phase.tv_sec = rq->perout.phase.sec; in ocelot_ptp_enable()
247 ts_phase.tv_nsec = rq->perout.phase.nsec; in ocelot_ptp_enable()
250 ts_phase.tv_sec = rq->perout.start.sec; in ocelot_ptp_enable()
251 ts_phase.tv_nsec = rq->perout.start.nsec; in ocelot_ptp_enable()
262 if (rq->perout.flags & PTP_PEROUT_DUTY_CYCLE) { in ocelot_ptp_enable()
[all …]
/linux-6.1.9/drivers/net/phy/
Dnxp-c45-tja11xx.c509 struct ptp_perout_request *perout, int on) in nxp_c45_perout_enable() argument
514 if (perout->flags & ~PTP_PEROUT_PHASE) in nxp_c45_perout_enable()
517 pin = ptp_find_pin(priv->ptp_clock, PTP_PF_PEROUT, perout->index); in nxp_c45_perout_enable()
536 if (perout->period.sec != 1 || perout->period.nsec != 0) { in nxp_c45_perout_enable()
541 if (!(perout->flags & PTP_PEROUT_PHASE)) { in nxp_c45_perout_enable()
542 if (perout->start.sec != 0 || perout->start.nsec != 0) { in nxp_c45_perout_enable()
547 if (perout->phase.nsec != 0 && in nxp_c45_perout_enable()
548 perout->phase.nsec != (NSEC_PER_SEC >> 1)) { in nxp_c45_perout_enable()
553 if (perout->phase.nsec == 0) in nxp_c45_perout_enable()
620 return nxp_c45_perout_enable(priv, &req->perout, on); in nxp_c45_ptp_enable()
Ddp83640.c338 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-6.1.9/drivers/net/dsa/sja1105/
Dsja1105_ptp.c758 struct ptp_perout_request *perout, in sja1105_per_out_enable() argument
767 if (perout->index != 0) in sja1105_per_out_enable()
771 if (perout->flags) in sja1105_per_out_enable()
782 .tv_sec = perout->period.sec, in sja1105_per_out_enable()
783 .tv_nsec = perout->period.nsec, in sja1105_per_out_enable()
786 .tv_sec = perout->start.sec, in sja1105_per_out_enable()
787 .tv_nsec = perout->start.nsec, in sja1105_per_out_enable()
888 rc = sja1105_per_out_enable(priv, &req->perout, on); in sja1105_ptp_enable()
/linux-6.1.9/include/linux/
Dptp_clock_kernel.h40 struct ptp_perout_request perout; member
/linux-6.1.9/drivers/net/ethernet/broadcom/bnxt/
Dbnxt_ptp.c396 ts.tv_sec = rq->perout.start.sec; in bnxt_ptp_perout_cfg()
397 ts.tv_nsec = rq->perout.start.nsec; in bnxt_ptp_perout_cfg()
450 rq->perout.index); in bnxt_ptp_enable()
/linux-6.1.9/drivers/net/ethernet/intel/ice/
Dice_ptp.c1743 chan = rq->perout.index; in ice_ptp_gpio_enable_e810()
1762 clk_cfg.period = ((rq->perout.period.sec * NSEC_PER_SEC) + in ice_ptp_gpio_enable_e810()
1763 rq->perout.period.nsec); in ice_ptp_gpio_enable_e810()
1764 clk_cfg.start_time = ((rq->perout.start.sec * NSEC_PER_SEC) + in ice_ptp_gpio_enable_e810()
1765 rq->perout.start.nsec); in ice_ptp_gpio_enable_e810()
/linux-6.1.9/drivers/net/ethernet/aquantia/atlantic/
Daq_ptp.c393 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()

12