Lines Matching full:phc
265 struct lan966x_phc *phc; in lan966x_ptp_hwtstamp_set() local
308 phc = &lan966x->phc[LAN966X_PHC_PORT]; in lan966x_ptp_hwtstamp_set()
309 phc->hwtstamp_config = *cfg; in lan966x_ptp_hwtstamp_set()
319 struct lan966x_phc *phc; in lan966x_ptp_hwtstamp_get() local
321 phc = &lan966x->phc[LAN966X_PHC_PORT]; in lan966x_ptp_hwtstamp_get()
322 *cfg = phc->hwtstamp_config; in lan966x_ptp_hwtstamp_get()
542 struct lan966x_phc *phc; in lan966x_ptp_ext_irq_handler() local
556 phc = &lan966x->phc[i]; in lan966x_ptp_ext_irq_handler()
557 pin = ptp_find_pin_unlocked(phc->clock, PTP_PF_EXTTS, 0); in lan966x_ptp_ext_irq_handler()
590 ptp_clock_event(phc->clock, &ptp_event); in lan966x_ptp_ext_irq_handler()
598 struct lan966x_phc *phc = container_of(ptp, struct lan966x_phc, info); in lan966x_ptp_adjfine() local
599 struct lan966x *lan966x = phc->lan966x; in lan966x_ptp_adjfine()
625 lan_rmw(PTP_DOM_CFG_CLKCFG_DIS_SET(1 << BIT(phc->index)), in lan966x_ptp_adjfine()
630 PTP_CLK_PER_CFG(phc->index, 0)); in lan966x_ptp_adjfine()
632 PTP_CLK_PER_CFG(phc->index, 1)); in lan966x_ptp_adjfine()
646 struct lan966x_phc *phc = container_of(ptp, struct lan966x_phc, info); in lan966x_ptp_settime64() local
647 struct lan966x *lan966x = phc->lan966x; in lan966x_ptp_settime64()
654 PTP_PIN_CFG_PIN_DOM_SET(phc->index) | in lan966x_ptp_settime64()
670 PTP_PIN_CFG_PIN_DOM_SET(phc->index) | in lan966x_ptp_settime64()
684 struct lan966x_phc *phc = container_of(ptp, struct lan966x_phc, info); in lan966x_ptp_gettime64() local
685 struct lan966x *lan966x = phc->lan966x; in lan966x_ptp_gettime64()
693 PTP_PIN_CFG_PIN_DOM_SET(phc->index) | in lan966x_ptp_gettime64()
721 struct lan966x_phc *phc = container_of(ptp, struct lan966x_phc, info); in lan966x_ptp_adjtime() local
722 struct lan966x *lan966x = phc->lan966x; in lan966x_ptp_adjtime()
731 PTP_PIN_CFG_PIN_DOM_SET(phc->index) | in lan966x_ptp_adjtime()
743 PTP_PIN_CFG_PIN_DOM_SET(phc->index) | in lan966x_ptp_adjtime()
770 struct lan966x_phc *phc = container_of(ptp, struct lan966x_phc, info); in lan966x_ptp_verify() local
771 struct lan966x *lan966x = phc->lan966x; in lan966x_ptp_verify()
788 /* The PTP pins are shared by all the PHC. So it is required to see if in lan966x_ptp_verify()
789 * the pin is connected to another PHC. The pin is connected to another in lan966x_ptp_verify()
790 * PHC if that pin already has a function on that PHC. in lan966x_ptp_verify()
793 info = &lan966x->phc[i].info; in lan966x_ptp_verify()
810 struct lan966x_phc *phc = container_of(ptp, struct lan966x_phc, info); in lan966x_ptp_perout() local
811 struct lan966x *lan966x = phc->lan966x; in lan966x_ptp_perout()
822 pin = ptp_find_pin(phc->clock, PTP_PF_PEROUT, rq->perout.index); in lan966x_ptp_perout()
829 PTP_PIN_CFG_PIN_DOM_SET(phc->index) | in lan966x_ptp_perout()
875 PTP_PIN_CFG_PIN_DOM_SET(phc->index) | in lan966x_ptp_perout()
897 PTP_PIN_CFG_PIN_DOM_SET(phc->index) | in lan966x_ptp_perout()
911 struct lan966x_phc *phc = container_of(ptp, struct lan966x_phc, info); in lan966x_ptp_extts() local
912 struct lan966x *lan966x = phc->lan966x; in lan966x_ptp_extts()
926 pin = ptp_find_pin(phc->clock, PTP_PF_EXTTS, rq->extts.index); in lan966x_ptp_extts()
933 PTP_PIN_CFG_PIN_DOM_SET(phc->index) | in lan966x_ptp_extts()
987 struct lan966x_phc *phc = &lan966x->phc[index]; in lan966x_ptp_phc_init() local
992 p = &phc->pins[i]; in lan966x_ptp_phc_init()
999 phc->info = *clock_info; in lan966x_ptp_phc_init()
1000 phc->info.pin_config = &phc->pins[0]; in lan966x_ptp_phc_init()
1001 phc->clock = ptp_clock_register(&phc->info, lan966x->dev); in lan966x_ptp_phc_init()
1002 if (IS_ERR(phc->clock)) in lan966x_ptp_phc_init()
1003 return PTR_ERR(phc->clock); in lan966x_ptp_phc_init()
1005 phc->index = index; in lan966x_ptp_phc_init()
1006 phc->lan966x = lan966x; in lan966x_ptp_phc_init()
1080 ptp_clock_unregister(lan966x->phc[i].clock); in lan966x_ptp_deinit()
1087 struct lan966x_phc *phc; in lan966x_ptp_rxtstamp() local
1095 phc = &lan966x->phc[LAN966X_PHC_PORT]; in lan966x_ptp_rxtstamp()
1096 lan966x_ptp_gettime64(&phc->info, &ts); in lan966x_ptp_rxtstamp()