/openbmc/linux/drivers/ptp/ |
H A D | ptp_chardev.c | 36 rq.perout.index = chan; in ptp_disable_pinfunc() 199 struct ptp_perout_request *perout = &req.perout; in ptp_ioctl() local 211 (perout->rsv[0] || perout->rsv[1] || in ptp_ioctl() 212 perout->rsv[2] || perout->rsv[3])) { in ptp_ioctl() 218 if (perout->on.sec > perout->period.sec || in ptp_ioctl() 219 (perout->on.sec == perout->period.sec && in ptp_ioctl() 220 perout->on.nsec > perout->period.nsec)) { in ptp_ioctl() 231 if (perout->phase.sec > perout->period.sec || in ptp_ioctl() 232 (perout->phase.sec == perout->period.sec && in ptp_ioctl() 233 perout->phase.nsec >= perout->period.nsec)) { in ptp_ioctl() [all …]
|
H A D | ptp_sysfs.c | 118 cnt = sscanf(buf, "%u %lld %u %lld %u", &req.perout.index, in period_store() 119 &req.perout.start.sec, &req.perout.start.nsec, in period_store() 120 &req.perout.period.sec, &req.perout.period.nsec); in period_store() 123 if (req.perout.index >= ops->n_per_out) in period_store() 126 enable = req.perout.period.sec || req.perout.period.nsec; in period_store()
|
H A D | ptp_idt82p33.c | 900 struct ptp_perout_request *perout) in idt82p33_perout_enable() argument 903 return idt82p33_output_enable(channel, enable, perout->index); in idt82p33_perout_enable() 957 &rq->perout); in idt82p33_enable() 959 else if (rq->perout.start.nsec || rq->perout.period.sec != 1 || in idt82p33_enable() 960 rq->perout.period.nsec) in idt82p33_enable() 964 &rq->perout); in idt82p33_enable()
|
H A D | ptp_clockmatrix.c | 1356 struct ptp_perout_request *perout, in idtcm_perout_enable() argument 1363 err = idtcm_output_enable(channel, enable, perout->index); in idtcm_perout_enable() 1943 err = idtcm_perout_enable(channel, &rq->perout, false); in idtcm_enable() 1945 else if (rq->perout.start.nsec || rq->perout.period.sec != 1 || in idtcm_enable() 1946 rq->perout.period.nsec) in idtcm_enable() 1949 err = idtcm_perout_enable(channel, &rq->perout, true); in idtcm_enable()
|
/openbmc/linux/drivers/net/ethernet/renesas/ |
H A D | ravb_ptp.c | 212 struct ravb_ptp_perout *perout; in ravb_ptp_perout() local 244 perout = &priv->ptp.perout[req->index]; in ravb_ptp_perout() 245 perout->target = (u32)start_ns; in ravb_ptp_perout() 246 perout->period = (u32)period_ns; in ravb_ptp_perout() 258 perout = &priv->ptp.perout[req->index]; in ravb_ptp_perout() 259 perout->period = 0; in ravb_ptp_perout() 279 return ravb_ptp_perout(ptp, &req->perout, on); in ravb_ptp_enable() 314 struct ravb_ptp_perout *perout = priv->ptp.perout; in ravb_ptp_interrupt() local 316 if (perout->period) { in ravb_ptp_interrupt() 317 perout->target += perout->period; in ravb_ptp_interrupt() [all …]
|
/openbmc/linux/drivers/net/ethernet/microchip/ |
H A D | lan743x_ptp.c | 435 struct lan743x_ptp_perout *perout = &ptp->perout[index]; in lan743x_ptp_perout_off() local 437 if (perout->gpio_pin >= 0) { in lan743x_ptp_perout_off() 439 perout->gpio_pin = -1; in lan743x_ptp_perout_off() 453 (perout->event_ch); in lan743x_ptp_perout_off() 456 perout->event_ch = -1; in lan743x_ptp_perout_off() 470 struct lan743x_ptp_perout *perout = &ptp->perout[index]; in lan743x_ptp_perout() local 495 if (perout->event_ch < 0) { in lan743x_ptp_perout() 507 if (perout->gpio_pin < 0) { in lan743x_ptp_perout() 621 (perout->event_ch)); in lan743x_ptp_perout() 625 (perout->event_ch); in lan743x_ptp_perout() [all …]
|
H A D | lan743x_ptp.h | 82 struct lan743x_ptp_perout perout[LAN743X_PTP_N_PEROUT]; member
|
/openbmc/linux/drivers/net/ethernet/intel/igb/ |
H A D | igb_ptp.c | 543 if (rq->perout.flags) in igb_ptp_feature_enable_82580() 548 rq->perout.index); in igb_ptp_feature_enable_82580() 559 if (rq->perout.index == 1) { in igb_ptp_feature_enable_82580() 573 if (rq->perout.index == 1) { in igb_ptp_feature_enable_82580() 581 int i = rq->perout.index; in igb_ptp_feature_enable_82580() 699 if (rq->perout.flags) in igb_ptp_feature_enable_i210() 704 rq->perout.index); in igb_ptp_feature_enable_i210() 719 if (rq->perout.index == 1) { in igb_ptp_feature_enable_i210() 753 int i = rq->perout.index; in igb_ptp_feature_enable_i210() 755 igb->perout[i].start.tv_sec = rq->perout.start.sec; in igb_ptp_feature_enable_i210() [all …]
|
/openbmc/linux/drivers/net/ethernet/stmicro/stmmac/ |
H A D | stmmac_ptp.c | 177 if (rq->perout.flags) in stmmac_enable() 180 cfg = &priv->pps[rq->perout.index]; in stmmac_enable() 182 cfg->start.tv_sec = rq->perout.start.sec; in stmmac_enable() 183 cfg->start.tv_nsec = rq->perout.start.nsec; in stmmac_enable() 184 cfg->period.tv_sec = rq->perout.period.sec; in stmmac_enable() 185 cfg->period.tv_nsec = rq->perout.period.nsec; in stmmac_enable() 189 rq->perout.index, cfg, on, in stmmac_enable()
|
/openbmc/linux/drivers/net/ethernet/intel/igc/ |
H A D | igc_ptp.c | 303 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() 360 int i = rq->perout.index; in igc_ptp_feature_enable_i225() 380 igc->perout[i].start.tv_sec = rq->perout.start.sec; in igc_ptp_feature_enable_i225() 381 igc->perout[i].start.tv_nsec = rq->perout.start.nsec; in igc_ptp_feature_enable_i225() 382 igc->perout[i].period.tv_sec = ts.tv_sec; in igc_ptp_feature_enable_i225() [all …]
|
/openbmc/linux/drivers/net/ethernet/mellanox/mlx5/core/lib/ |
H A D | clock.c | 547 ts.tv_nsec = rq->perout.period.nsec; in perout_conf_1pps() 548 ts.tv_sec = rq->perout.period.sec; in perout_conf_1pps() 569 if (rq->perout.flags & PTP_PEROUT_DUTY_CYCLE) { in mlx5_perout_conf_out_pulse_duration() 570 ts.tv_sec = rq->perout.on.sec; in mlx5_perout_conf_out_pulse_duration() 571 ts.tv_nsec = rq->perout.on.nsec; in mlx5_perout_conf_out_pulse_duration() 577 ts.tv_sec = rq->perout.period.sec; in mlx5_perout_conf_out_pulse_duration() 578 ts.tv_nsec = rq->perout.period.nsec; in mlx5_perout_conf_out_pulse_duration() 602 ts.tv_sec = rq->perout.period.sec; in perout_conf_npps_real_time() 603 ts.tv_nsec = rq->perout.period.nsec; in perout_conf_npps_real_time() 609 *period = perout_conf_real_time(rq->perout.period.sec, rq->perout.period.nsec); in perout_conf_npps_real_time() [all …]
|
/openbmc/linux/tools/testing/selftests/ptp/ |
H A D | testptp.c | 195 int64_t perout = -1; in main() local 243 perout = atoll(optarg); in main() 465 if (pulsewidth >= 0 && perout < 0) { in main() 470 if (perout_phase >= 0 && perout < 0) { in main() 475 if (perout >= 0) { in main() 482 perout_request.period.sec = perout / NSEC_PER_SEC; in main() 483 perout_request.period.nsec = perout % NSEC_PER_SEC; in main()
|
/openbmc/linux/drivers/net/ethernet/microchip/lan966x/ |
H A D | lan966x_ptp.c | 839 if (rq->perout.period.sec == 1 && in lan966x_ptp_perout() 840 rq->perout.period.nsec == 0) in lan966x_ptp_perout() 843 if (rq->perout.flags & PTP_PEROUT_PHASE) { in lan966x_ptp_perout() 844 ts_phase.tv_sec = rq->perout.phase.sec; in lan966x_ptp_perout() 845 ts_phase.tv_nsec = rq->perout.phase.nsec; in lan966x_ptp_perout() 847 ts_phase.tv_sec = rq->perout.start.sec; in lan966x_ptp_perout() 848 ts_phase.tv_nsec = rq->perout.start.nsec; in lan966x_ptp_perout() 860 ts_on.tv_sec = rq->perout.on.sec; in lan966x_ptp_perout() 861 ts_on.tv_nsec = rq->perout.on.nsec; in lan966x_ptp_perout() 885 ts_period.tv_sec = rq->perout.period.sec; in lan966x_ptp_perout() [all …]
|
/openbmc/linux/drivers/net/ethernet/mscc/ |
H A D | ocelot_ptp.c | 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() 265 ts_on.tv_sec = rq->perout.on.sec; in ocelot_ptp_enable() [all …]
|
/openbmc/linux/drivers/net/dsa/sja1105/ |
H A D | sja1105_ptp.c | 718 struct ptp_perout_request *perout, in sja1105_per_out_enable() argument 727 if (perout->index != 0) in sja1105_per_out_enable() 731 if (perout->flags) in sja1105_per_out_enable() 742 .tv_sec = perout->period.sec, in sja1105_per_out_enable() 743 .tv_nsec = perout->period.nsec, in sja1105_per_out_enable() 746 .tv_sec = perout->start.sec, in sja1105_per_out_enable() 747 .tv_nsec = perout->start.nsec, in sja1105_per_out_enable() 848 rc = sja1105_per_out_enable(priv, &req->perout, on); in sja1105_ptp_enable()
|
/openbmc/linux/drivers/net/ethernet/ti/icssg/ |
H A D | icss_iep.c | 594 rq.perout.index = 0; in icss_iep_pps_enable() 598 rq.perout.period.sec = 1; in icss_iep_pps_enable() 599 rq.perout.period.nsec = 0; in icss_iep_pps_enable() 600 rq.perout.start.sec = ts.tv_sec + 2; in icss_iep_pps_enable() 601 rq.perout.start.nsec = 0; in icss_iep_pps_enable() 602 ret = icss_iep_perout_enable_hw(iep, &rq.perout, on); in icss_iep_pps_enable() 604 ret = icss_iep_perout_enable_hw(iep, &rq.perout, on); in icss_iep_pps_enable() 656 return icss_iep_perout_enable(iep, &rq->perout, on); in icss_iep_ptp_enable()
|
/openbmc/linux/drivers/net/ethernet/freescale/ |
H A D | fec_ptp.c | 536 if (rq->perout.flags) in fec_ptp_enable() 539 if (rq->perout.index != DEFAULT_PPS_CHANNEL) in fec_ptp_enable() 543 period.tv_sec = rq->perout.period.sec; in fec_ptp_enable() 544 period.tv_nsec = rq->perout.period.nsec; in fec_ptp_enable() 558 start_time.tv_sec = rq->perout.start.sec; in fec_ptp_enable() 559 start_time.tv_nsec = rq->perout.start.nsec; in fec_ptp_enable()
|
/openbmc/linux/drivers/net/phy/ |
H A D | nxp-c45-tja11xx.c | 763 struct ptp_perout_request *perout, int on) in nxp_c45_perout_enable() argument 769 if (perout->flags & ~PTP_PEROUT_PHASE) in nxp_c45_perout_enable() 772 pin = ptp_find_pin(priv->ptp_clock, PTP_PF_PEROUT, perout->index); in nxp_c45_perout_enable() 791 if (perout->period.sec != 1 || perout->period.nsec != 0) { in nxp_c45_perout_enable() 796 if (!(perout->flags & PTP_PEROUT_PHASE)) { in nxp_c45_perout_enable() 797 if (perout->start.sec != 0 || perout->start.nsec != 0) { in nxp_c45_perout_enable() 802 if (perout->phase.nsec != 0 && in nxp_c45_perout_enable() 803 perout->phase.nsec != (NSEC_PER_SEC >> 1)) { in nxp_c45_perout_enable() 808 if (perout->phase.nsec == 0) in nxp_c45_perout_enable() 912 return nxp_c45_perout_enable(priv, &req->perout, on); in nxp_c45_ptp_enable()
|
H 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()
|
H A D | micrel.c | 4395 if (rq->perout.flags & ~PTP_PEROUT_DUTY_CYCLE) in lan8841_ptp_perout() 4398 pin = ptp_find_pin(ptp_priv->ptp_clock, PTP_PF_PEROUT, rq->perout.index); in lan8841_ptp_perout() 4410 ts_on.tv_sec = rq->perout.on.sec; in lan8841_ptp_perout() 4411 ts_on.tv_nsec = rq->perout.on.nsec; in lan8841_ptp_perout() 4414 ts_period.tv_sec = rq->perout.period.sec; in lan8841_ptp_perout() 4415 ts_period.tv_nsec = rq->perout.period.nsec; in lan8841_ptp_perout() 4481 ret = lan8841_ptp_set_target(ptp_priv, LAN8841_EVENT_A, rq->perout.start.sec, in lan8841_ptp_perout() 4482 rq->perout.start.nsec); in lan8841_ptp_perout() 4487 ret = lan8841_ptp_set_reload(ptp_priv, LAN8841_EVENT_A, rq->perout.period.sec, in lan8841_ptp_perout() 4488 rq->perout.period.nsec); in lan8841_ptp_perout()
|
/openbmc/linux/drivers/net/ethernet/ti/ |
H A D | am65-cpts.c | 707 rq.perout.period.sec = 1; in am65_cpts_pps_enable() 708 rq.perout.period.nsec = 0; in am65_cpts_pps_enable() 709 rq.perout.start.sec = ts.tv_sec + 2; in am65_cpts_pps_enable() 710 rq.perout.start.nsec = 0; in am65_cpts_pps_enable() 711 rq.perout.index = cpts->pps_genf_idx; in am65_cpts_pps_enable() 713 am65_cpts_perout_enable_hw(cpts, &rq.perout, on); in am65_cpts_pps_enable() 716 rq.perout.index = cpts->pps_genf_idx; in am65_cpts_pps_enable() 717 am65_cpts_perout_enable_hw(cpts, &rq.perout, on); in am65_cpts_pps_enable() 738 return am65_cpts_perout_enable(cpts, &rq->perout, on); in am65_cpts_ptp_enable()
|
/openbmc/linux/include/linux/ |
H A D | ptp_clock_kernel.h | 40 struct ptp_perout_request perout; member
|
/openbmc/linux/drivers/net/ethernet/broadcom/bnxt/ |
H A D | bnxt_ptp.c | 411 ts.tv_sec = rq->perout.start.sec; in bnxt_ptp_perout_cfg() 412 ts.tv_nsec = rq->perout.start.nsec; in bnxt_ptp_perout_cfg() 465 rq->perout.index); in bnxt_ptp_enable()
|
/openbmc/linux/drivers/net/ethernet/intel/ice/ |
H A D | ice_ptp.c | 1728 chan = rq->perout.index; in ice_ptp_gpio_enable_e810() 1747 clk_cfg.period = ((rq->perout.period.sec * NSEC_PER_SEC) + in ice_ptp_gpio_enable_e810() 1748 rq->perout.period.nsec); in ice_ptp_gpio_enable_e810() 1749 clk_cfg.start_time = ((rq->perout.start.sec * NSEC_PER_SEC) + in ice_ptp_gpio_enable_e810() 1750 rq->perout.start.nsec); in ice_ptp_gpio_enable_e810()
|
/openbmc/linux/drivers/net/ethernet/aquantia/atlantic/ |
H 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()
|