Lines Matching refs:phc
42 struct lan966x_phc *phc; in lan966x_ptp_hwtstamp_set() local
93 phc = &lan966x->phc[LAN966X_PHC_PORT]; in lan966x_ptp_hwtstamp_set()
94 memcpy(&phc->hwtstamp_config, &cfg, sizeof(cfg)); in lan966x_ptp_hwtstamp_set()
103 struct lan966x_phc *phc; in lan966x_ptp_hwtstamp_get() local
105 phc = &lan966x->phc[LAN966X_PHC_PORT]; in lan966x_ptp_hwtstamp_get()
106 return copy_to_user(ifr->ifr_data, &phc->hwtstamp_config, in lan966x_ptp_hwtstamp_get()
107 sizeof(phc->hwtstamp_config)) ? -EFAULT : 0; in lan966x_ptp_hwtstamp_get()
327 struct lan966x_phc *phc; in lan966x_ptp_ext_irq_handler() local
341 phc = &lan966x->phc[i]; in lan966x_ptp_ext_irq_handler()
342 pin = ptp_find_pin_unlocked(phc->clock, PTP_PF_EXTTS, 0); in lan966x_ptp_ext_irq_handler()
375 ptp_clock_event(phc->clock, &ptp_event); in lan966x_ptp_ext_irq_handler()
383 struct lan966x_phc *phc = container_of(ptp, struct lan966x_phc, info); in lan966x_ptp_adjfine() local
384 struct lan966x *lan966x = phc->lan966x; in lan966x_ptp_adjfine()
410 lan_rmw(PTP_DOM_CFG_CLKCFG_DIS_SET(1 << BIT(phc->index)), in lan966x_ptp_adjfine()
415 PTP_CLK_PER_CFG(phc->index, 0)); in lan966x_ptp_adjfine()
417 PTP_CLK_PER_CFG(phc->index, 1)); in lan966x_ptp_adjfine()
431 struct lan966x_phc *phc = container_of(ptp, struct lan966x_phc, info); in lan966x_ptp_settime64() local
432 struct lan966x *lan966x = phc->lan966x; in lan966x_ptp_settime64()
439 PTP_PIN_CFG_PIN_DOM_SET(phc->index) | in lan966x_ptp_settime64()
455 PTP_PIN_CFG_PIN_DOM_SET(phc->index) | in lan966x_ptp_settime64()
469 struct lan966x_phc *phc = container_of(ptp, struct lan966x_phc, info); in lan966x_ptp_gettime64() local
470 struct lan966x *lan966x = phc->lan966x; in lan966x_ptp_gettime64()
478 PTP_PIN_CFG_PIN_DOM_SET(phc->index) | in lan966x_ptp_gettime64()
506 struct lan966x_phc *phc = container_of(ptp, struct lan966x_phc, info); in lan966x_ptp_adjtime() local
507 struct lan966x *lan966x = phc->lan966x; in lan966x_ptp_adjtime()
516 PTP_PIN_CFG_PIN_DOM_SET(phc->index) | in lan966x_ptp_adjtime()
528 PTP_PIN_CFG_PIN_DOM_SET(phc->index) | in lan966x_ptp_adjtime()
555 struct lan966x_phc *phc = container_of(ptp, struct lan966x_phc, info); in lan966x_ptp_verify() local
556 struct lan966x *lan966x = phc->lan966x; in lan966x_ptp_verify()
578 info = &lan966x->phc[i].info; in lan966x_ptp_verify()
595 struct lan966x_phc *phc = container_of(ptp, struct lan966x_phc, info); in lan966x_ptp_perout() local
596 struct lan966x *lan966x = phc->lan966x; in lan966x_ptp_perout()
607 pin = ptp_find_pin(phc->clock, PTP_PF_PEROUT, rq->perout.index); in lan966x_ptp_perout()
614 PTP_PIN_CFG_PIN_DOM_SET(phc->index) | in lan966x_ptp_perout()
660 PTP_PIN_CFG_PIN_DOM_SET(phc->index) | in lan966x_ptp_perout()
682 PTP_PIN_CFG_PIN_DOM_SET(phc->index) | in lan966x_ptp_perout()
696 struct lan966x_phc *phc = container_of(ptp, struct lan966x_phc, info); in lan966x_ptp_extts() local
697 struct lan966x *lan966x = phc->lan966x; in lan966x_ptp_extts()
711 pin = ptp_find_pin(phc->clock, PTP_PF_EXTTS, rq->extts.index); in lan966x_ptp_extts()
718 PTP_PIN_CFG_PIN_DOM_SET(phc->index) | in lan966x_ptp_extts()
772 struct lan966x_phc *phc = &lan966x->phc[index]; in lan966x_ptp_phc_init() local
777 p = &phc->pins[i]; in lan966x_ptp_phc_init()
784 phc->info = *clock_info; in lan966x_ptp_phc_init()
785 phc->info.pin_config = &phc->pins[0]; in lan966x_ptp_phc_init()
786 phc->clock = ptp_clock_register(&phc->info, lan966x->dev); in lan966x_ptp_phc_init()
787 if (IS_ERR(phc->clock)) in lan966x_ptp_phc_init()
788 return PTR_ERR(phc->clock); in lan966x_ptp_phc_init()
790 phc->index = index; in lan966x_ptp_phc_init()
791 phc->lan966x = lan966x; in lan966x_ptp_phc_init()
794 phc->hwtstamp_config.rx_filter = HWTSTAMP_FILTER_PTP_V2_EVENT; in lan966x_ptp_phc_init()
865 ptp_clock_unregister(lan966x->phc[i].clock); in lan966x_ptp_deinit()
872 struct lan966x_phc *phc; in lan966x_ptp_rxtstamp() local
879 phc = &lan966x->phc[LAN966X_PHC_PORT]; in lan966x_ptp_rxtstamp()
880 lan966x_ptp_gettime64(&phc->info, &ts); in lan966x_ptp_rxtstamp()