Lines Matching refs:pfvf
66 struct otx2_nic *pfvf = ptp->nic; in otx2_ptp_adjtime() local
68 mutex_lock(&pfvf->mbox.lock); in otx2_ptp_adjtime()
70 mutex_unlock(&pfvf->mbox.lock); in otx2_ptp_adjtime()
80 struct otx2_nic *pfvf = ptp->nic; in otx2_ptp_gettime() local
83 mutex_lock(&pfvf->mbox.lock); in otx2_ptp_gettime()
85 mutex_unlock(&pfvf->mbox.lock); in otx2_ptp_gettime()
97 struct otx2_nic *pfvf = ptp->nic; in otx2_ptp_settime() local
102 mutex_lock(&pfvf->mbox.lock); in otx2_ptp_settime()
104 mutex_unlock(&pfvf->mbox.lock); in otx2_ptp_settime()
115 int otx2_ptp_init(struct otx2_nic *pfvf) in otx2_ptp_init() argument
122 mutex_lock(&pfvf->mbox.lock); in otx2_ptp_init()
124 req = otx2_mbox_alloc_msg_ptp_op(&pfvf->mbox); in otx2_ptp_init()
126 mutex_unlock(&pfvf->mbox.lock); in otx2_ptp_init()
132 err = otx2_sync_mbox_msg(&pfvf->mbox); in otx2_ptp_init()
134 mutex_unlock(&pfvf->mbox.lock); in otx2_ptp_init()
137 mutex_unlock(&pfvf->mbox.lock); in otx2_ptp_init()
145 ptp_ptr->nic = pfvf; in otx2_ptp_init()
170 ptp_ptr->ptp_clock = ptp_clock_register(&ptp_ptr->ptp_info, pfvf->dev); in otx2_ptp_init()
178 pfvf->ptp = ptp_ptr; in otx2_ptp_init()
184 void otx2_ptp_destroy(struct otx2_nic *pfvf) in otx2_ptp_destroy() argument
186 struct otx2_ptp *ptp = pfvf->ptp; in otx2_ptp_destroy()
193 pfvf->ptp = NULL; in otx2_ptp_destroy()
196 int otx2_ptp_clock_index(struct otx2_nic *pfvf) in otx2_ptp_clock_index() argument
198 if (!pfvf->ptp) in otx2_ptp_clock_index()
201 return ptp_clock_index(pfvf->ptp->ptp_clock); in otx2_ptp_clock_index()
204 int otx2_ptp_tstamp2time(struct otx2_nic *pfvf, u64 tstamp, u64 *tsns) in otx2_ptp_tstamp2time() argument
206 if (!pfvf->ptp) in otx2_ptp_tstamp2time()
209 *tsns = timecounter_cyc2time(&pfvf->ptp->time_counter, tstamp); in otx2_ptp_tstamp2time()