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()
482 struct sparx5_phc *phc = container_of(ptp, struct sparx5_phc, info); in sparx5_ptp_gettime64() local
483 struct sparx5 *sparx5 = phc->sparx5; in sparx5_ptp_gettime64()
491 PTP_PTP_PIN_CFG_PTP_PIN_DOM_SET(phc->index) | in sparx5_ptp_gettime64()
519 struct sparx5_phc *phc = container_of(ptp, struct sparx5_phc, info); in sparx5_ptp_adjtime() local
520 struct sparx5 *sparx5 = phc->sparx5; in sparx5_ptp_adjtime()
529 PTP_PTP_PIN_CFG_PTP_PIN_DOM_SET(phc->index) | in sparx5_ptp_adjtime()
541 PTP_PTP_PIN_CFG_PTP_PIN_DOM_SET(phc->index) | in sparx5_ptp_adjtime()
579 struct sparx5_phc *phc = &sparx5->phc[index]; in sparx5_ptp_phc_init() local
581 phc->info = *clock_info; in sparx5_ptp_phc_init()
582 phc->clock = ptp_clock_register(&phc->info, sparx5->dev); in sparx5_ptp_phc_init()
583 if (IS_ERR(phc->clock)) in sparx5_ptp_phc_init()
584 return PTR_ERR(phc->clock); in sparx5_ptp_phc_init()
586 phc->index = index; in sparx5_ptp_phc_init()
587 phc->sparx5 = sparx5; in sparx5_ptp_phc_init()
590 phc->hwtstamp_config.rx_filter = HWTSTAMP_FILTER_PTP_V2_EVENT; in sparx5_ptp_phc_init()
661 ptp_clock_unregister(sparx5->phc[i].clock); in sparx5_ptp_deinit()
668 struct sparx5_phc *phc; in sparx5_ptp_rxtstamp() local
675 phc = &sparx5->phc[SPARX5_PHC_PORT]; in sparx5_ptp_rxtstamp()
676 sparx5_ptp_gettime64(&phc->info, &ts); in sparx5_ptp_rxtstamp()