Lines Matching refs:ptp

77 	struct ptp_clock *ptp;  member
106 mlxsw_sp1_ptp_clock(struct ptp_clock_info *ptp) in mlxsw_sp1_ptp_clock() argument
108 return container_of(ptp, struct mlxsw_sp1_ptp_clock, common.ptp_info); in mlxsw_sp1_ptp_clock()
189 static int mlxsw_sp1_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm) in mlxsw_sp1_ptp_adjfine() argument
191 struct mlxsw_sp1_ptp_clock *clock = mlxsw_sp1_ptp_clock(ptp); in mlxsw_sp1_ptp_adjfine()
217 static int mlxsw_sp1_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta) in mlxsw_sp1_ptp_adjtime() argument
219 struct mlxsw_sp1_ptp_clock *clock = mlxsw_sp1_ptp_clock(ptp); in mlxsw_sp1_ptp_adjtime()
230 static int mlxsw_sp1_ptp_gettimex(struct ptp_clock_info *ptp, in mlxsw_sp1_ptp_gettimex() argument
234 struct mlxsw_sp1_ptp_clock *clock = mlxsw_sp1_ptp_clock(ptp); in mlxsw_sp1_ptp_gettimex()
247 static int mlxsw_sp1_ptp_settime(struct ptp_clock_info *ptp, in mlxsw_sp1_ptp_settime() argument
250 struct mlxsw_sp1_ptp_clock *clock = mlxsw_sp1_ptp_clock(ptp); in mlxsw_sp1_ptp_settime()
323 clock->common.ptp = ptp_clock_register(&clock->common.ptp_info, dev); in mlxsw_sp1_ptp_clock_init()
324 if (IS_ERR(clock->common.ptp)) { in mlxsw_sp1_ptp_clock_init()
325 err = PTR_ERR(clock->common.ptp); in mlxsw_sp1_ptp_clock_init()
343 ptp_clock_unregister(clock_common->ptp); in mlxsw_sp1_ptp_clock_fini()
384 static int mlxsw_sp2_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm) in mlxsw_sp2_ptp_adjfine() argument
387 container_of(ptp, struct mlxsw_sp_ptp_clock, ptp_info); in mlxsw_sp2_ptp_adjfine()
397 static int mlxsw_sp2_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta) in mlxsw_sp2_ptp_adjtime() argument
400 container_of(ptp, struct mlxsw_sp_ptp_clock, ptp_info); in mlxsw_sp2_ptp_adjtime()
420 static int mlxsw_sp2_ptp_gettimex(struct ptp_clock_info *ptp, in mlxsw_sp2_ptp_gettimex() argument
425 container_of(ptp, struct mlxsw_sp_ptp_clock, ptp_info); in mlxsw_sp2_ptp_gettimex()
434 static int mlxsw_sp2_ptp_settime(struct ptp_clock_info *ptp, in mlxsw_sp2_ptp_settime() argument
438 container_of(ptp, struct mlxsw_sp_ptp_clock, ptp_info); in mlxsw_sp2_ptp_settime()
474 clock->ptp = ptp_clock_register(&clock->ptp_info, dev); in mlxsw_sp2_ptp_clock_init()
475 if (IS_ERR(clock->ptp)) { in mlxsw_sp2_ptp_clock_init()
476 err = PTR_ERR(clock->ptp); in mlxsw_sp2_ptp_clock_init()
491 ptp_clock_unregister(clock->ptp); in mlxsw_sp2_ptp_clock_fini()
730 types = ingress ? mlxsw_sp_port->ptp.ing_types : in mlxsw_sp1_ptp_got_packet()
731 mlxsw_sp_port->ptp.egr_types; in mlxsw_sp1_ptp_got_packet()
772 types = ingress ? mlxsw_sp_port->ptp.ing_types : in mlxsw_sp1_ptp_got_timestamp()
773 mlxsw_sp_port->ptp.egr_types; in mlxsw_sp1_ptp_got_timestamp()
834 &mlxsw_sp_port->ptp.stats.rx_gcd : in mlxsw_sp1_ptp_ht_gc_collect()
835 &mlxsw_sp_port->ptp.stats.tx_gcd; in mlxsw_sp1_ptp_ht_gc_collect()
1099 *config = mlxsw_sp_port->ptp.hwtstamp_config; in mlxsw_sp1_ptp_hwtstamp_get()
1181 orig_ing_types |= tmp->ptp.ing_types; in mlxsw_sp1_ptp_mtpppc_update()
1182 orig_egr_types |= tmp->ptp.egr_types; in mlxsw_sp1_ptp_mtpppc_update()
1185 ing_types |= tmp->ptp.ing_types; in mlxsw_sp1_ptp_mtpppc_update()
1186 egr_types |= tmp->ptp.egr_types; in mlxsw_sp1_ptp_mtpppc_update()
1206 return mlxsw_sp_port->ptp.ing_types || mlxsw_sp_port->ptp.egr_types; in mlxsw_sp1_ptp_hwtstamp_enabled()
1249 ptp.shaper_dw); in mlxsw_sp1_ptp_shaper_work()
1276 mlxsw_sp_port->ptp.hwtstamp_config = *config; in mlxsw_sp1_ptp_hwtstamp_set()
1277 mlxsw_sp_port->ptp.ing_types = ing_types; in mlxsw_sp1_ptp_hwtstamp_set()
1278 mlxsw_sp_port->ptp.egr_types = egr_types; in mlxsw_sp1_ptp_hwtstamp_set()
1293 info->phc_index = ptp_clock_index(mlxsw_sp->clock->ptp); in mlxsw_sp1_ptp_get_ts_info()
1351 void *stats = &mlxsw_sp_port->ptp.stats; in mlxsw_sp1_get_stats()
1645 ptp_enabled = mlxsw_sp_port->ptp.ing_types || in mlxsw_sp2_ptp_hwtstamp_set()
1646 mlxsw_sp_port->ptp.egr_types; in mlxsw_sp2_ptp_hwtstamp_set()
1659 mlxsw_sp_port->ptp.ing_types = new_ing_types; in mlxsw_sp2_ptp_hwtstamp_set()
1660 mlxsw_sp_port->ptp.egr_types = new_egr_types; in mlxsw_sp2_ptp_hwtstamp_set()
1678 info->phc_index = ptp_clock_index(mlxsw_sp->clock->ptp); in mlxsw_sp2_ptp_get_ts_info()