Lines Matching refs:ptp
13 struct otx2_ptp *ptp = container_of(ptp_info, struct otx2_ptp, in otx2_ptp_adjfine() local
17 if (!ptp->nic) in otx2_ptp_adjfine()
20 req = otx2_mbox_alloc_msg_ptp_op(&ptp->nic->mbox); in otx2_ptp_adjfine()
27 return otx2_sync_mbox_msg(&ptp->nic->mbox); in otx2_ptp_adjfine()
32 struct otx2_ptp *ptp = container_of(cc, struct otx2_ptp, cycle_counter); in ptp_cc_read() local
37 if (!ptp->nic) in ptp_cc_read()
40 req = otx2_mbox_alloc_msg_ptp_op(&ptp->nic->mbox); in ptp_cc_read()
46 err = otx2_sync_mbox_msg(&ptp->nic->mbox); in ptp_cc_read()
50 rsp = (struct ptp_rsp *)otx2_mbox_get_rsp(&ptp->nic->mbox.mbox, 0, in ptp_cc_read()
60 struct otx2_ptp *ptp = container_of(ptp_info, struct otx2_ptp, in otx2_ptp_adjtime() local
62 struct otx2_nic *pfvf = ptp->nic; in otx2_ptp_adjtime()
65 timecounter_adjtime(&ptp->time_counter, delta); in otx2_ptp_adjtime()
74 struct otx2_ptp *ptp = container_of(ptp_info, struct otx2_ptp, in otx2_ptp_gettime() local
76 struct otx2_nic *pfvf = ptp->nic; in otx2_ptp_gettime()
80 nsec = timecounter_read(&ptp->time_counter); in otx2_ptp_gettime()
91 struct otx2_ptp *ptp = container_of(ptp_info, struct otx2_ptp, in otx2_ptp_settime() local
93 struct otx2_nic *pfvf = ptp->nic; in otx2_ptp_settime()
99 timecounter_init(&ptp->time_counter, &ptp->cycle_counter, nsec); in otx2_ptp_settime()
174 pfvf->ptp = ptp_ptr; in otx2_ptp_init()
182 struct otx2_ptp *ptp = pfvf->ptp; in otx2_ptp_destroy() local
184 if (!ptp) in otx2_ptp_destroy()
187 ptp_clock_unregister(ptp->ptp_clock); in otx2_ptp_destroy()
188 kfree(ptp); in otx2_ptp_destroy()
189 pfvf->ptp = NULL; in otx2_ptp_destroy()
194 if (!pfvf->ptp) in otx2_ptp_clock_index()
197 return ptp_clock_index(pfvf->ptp->ptp_clock); in otx2_ptp_clock_index()
202 if (!pfvf->ptp) in otx2_ptp_tstamp2time()
205 *tsns = timecounter_cyc2time(&pfvf->ptp->time_counter, tstamp); in otx2_ptp_tstamp2time()