Lines Matching refs:phc

81 	struct sparx5_phc *phc;  in sparx5_ptp_hwtstamp_set()  local
133 phc = &sparx5->phc[SPARX5_PHC_PORT]; in sparx5_ptp_hwtstamp_set()
134 memcpy(&phc->hwtstamp_config, &cfg, sizeof(cfg)); in sparx5_ptp_hwtstamp_set()
143 struct sparx5_phc *phc; in sparx5_ptp_hwtstamp_get() local
145 phc = &sparx5->phc[SPARX5_PHC_PORT]; in sparx5_ptp_hwtstamp_get()
146 return copy_to_user(ifr->ifr_data, &phc->hwtstamp_config, in sparx5_ptp_hwtstamp_get()
147 sizeof(phc->hwtstamp_config)) ? -EFAULT : 0; in sparx5_ptp_hwtstamp_get()
395 struct sparx5_phc *phc = container_of(ptp, struct sparx5_phc, info); in sparx5_ptp_adjfine() local
396 struct sparx5 *sparx5 = phc->sparx5; in sparx5_ptp_adjfine()
422 spx5_rmw(PTP_PTP_DOM_CFG_PTP_CLKCFG_DIS_SET(1 << BIT(phc->index)), in sparx5_ptp_adjfine()
427 PTP_CLK_PER_CFG(phc->index, 0)); in sparx5_ptp_adjfine()
429 PTP_CLK_PER_CFG(phc->index, 1)); in sparx5_ptp_adjfine()
443 struct sparx5_phc *phc = container_of(ptp, struct sparx5_phc, info); in sparx5_ptp_settime64() local
444 struct sparx5 *sparx5 = phc->sparx5; in sparx5_ptp_settime64()
451 PTP_PTP_PIN_CFG_PTP_PIN_DOM_SET(phc->index) | in sparx5_ptp_settime64()
467 PTP_PTP_PIN_CFG_PTP_PIN_DOM_SET(phc->index) | in sparx5_ptp_settime64()
481 struct sparx5_phc *phc = container_of(ptp, struct sparx5_phc, info); in sparx5_ptp_gettime64() local
482 struct sparx5 *sparx5 = phc->sparx5; in sparx5_ptp_gettime64()
490 PTP_PTP_PIN_CFG_PTP_PIN_DOM_SET(phc->index) | in sparx5_ptp_gettime64()
518 struct sparx5_phc *phc = container_of(ptp, struct sparx5_phc, info); in sparx5_ptp_adjtime() local
519 struct sparx5 *sparx5 = phc->sparx5; in sparx5_ptp_adjtime()
528 PTP_PTP_PIN_CFG_PTP_PIN_DOM_SET(phc->index) | in sparx5_ptp_adjtime()
540 PTP_PTP_PIN_CFG_PTP_PIN_DOM_SET(phc->index) | in sparx5_ptp_adjtime()
578 struct sparx5_phc *phc = &sparx5->phc[index]; in sparx5_ptp_phc_init() local
580 phc->info = *clock_info; in sparx5_ptp_phc_init()
581 phc->clock = ptp_clock_register(&phc->info, sparx5->dev); in sparx5_ptp_phc_init()
582 if (IS_ERR(phc->clock)) in sparx5_ptp_phc_init()
583 return PTR_ERR(phc->clock); in sparx5_ptp_phc_init()
585 phc->index = index; in sparx5_ptp_phc_init()
586 phc->sparx5 = sparx5; in sparx5_ptp_phc_init()
589 phc->hwtstamp_config.rx_filter = HWTSTAMP_FILTER_PTP_V2_EVENT; in sparx5_ptp_phc_init()
660 ptp_clock_unregister(sparx5->phc[i].clock); in sparx5_ptp_deinit()
667 struct sparx5_phc *phc; in sparx5_ptp_rxtstamp() local
674 phc = &sparx5->phc[SPARX5_PHC_PORT]; in sparx5_ptp_rxtstamp()
675 sparx5_ptp_gettime64(&phc->info, &ts); in sparx5_ptp_rxtstamp()