Lines Matching full:gp2

23 static void iwl_mvm_ptp_update_new_read(struct iwl_mvm *mvm, u32 gp2)  in iwl_mvm_ptp_update_new_read()  argument
28 if (gp2 < mvm->ptp_data.last_gp2 && in iwl_mvm_ptp_update_new_read()
29 mvm->ptp_data.last_gp2 - gp2 < IWL_PTP_WRAP_THRESHOLD_USEC) { in iwl_mvm_ptp_update_new_read()
31 "PTP: ignore old read (gp2=%u, last_gp2=%u)\n", in iwl_mvm_ptp_update_new_read()
32 gp2, mvm->ptp_data.last_gp2); in iwl_mvm_ptp_update_new_read()
36 if (gp2 < mvm->ptp_data.last_gp2) { in iwl_mvm_ptp_update_new_read()
43 mvm->ptp_data.last_gp2 = gp2; in iwl_mvm_ptp_update_new_read()
63 /* It is possible that a GP2 timestamp was received from fw before the in iwl_mvm_ptp_get_adj_time()
87 iwl_mvm_get_crosstimestamp_fw(struct iwl_mvm *mvm, u32 *gp2, u64 *sys_time) in iwl_mvm_get_crosstimestamp_fw() argument
119 *gp2 = div_u64(gp2_10ns, 100); in iwl_mvm_get_crosstimestamp_fw()
128 ktime_t *sys_time, u32 *gp2) in iwl_mvm_phc_get_crosstimestamp_loop() argument
141 *gp2 = tmp_gp2; in iwl_mvm_phc_get_crosstimestamp_loop()
143 IWL_DEBUG_INFO(mvm, "PTP: new times: gp2=%u sys=%lld\n", in iwl_mvm_phc_get_crosstimestamp_loop()
144 *gp2, *sys_time); in iwl_mvm_phc_get_crosstimestamp_loop()
156 /* Raw value read from GP2 register in usec */ in iwl_mvm_phc_get_crosstimestamp()
157 u32 gp2; in iwl_mvm_phc_get_crosstimestamp() local
158 /* GP2 value in ns*/ in iwl_mvm_phc_get_crosstimestamp()
172 ret = iwl_mvm_get_crosstimestamp_fw(mvm, &gp2, &sys_time); in iwl_mvm_phc_get_crosstimestamp()
177 iwl_mvm_phc_get_crosstimestamp_loop(mvm, &sys_time, &gp2); in iwl_mvm_phc_get_crosstimestamp()
180 gp2_ns = iwl_mvm_ptp_get_adj_time(mvm, (u64)gp2 * NSEC_PER_USEC); in iwl_mvm_phc_get_crosstimestamp()
182 IWL_INFO(mvm, "Got Sync Time: GP2:%u, last_GP2: %u, GP2_ns: %lld, sys_time: %lld\n", in iwl_mvm_phc_get_crosstimestamp()
183 gp2, mvm->ptp_data.last_gp2, gp2_ns, (s64)sys_time); in iwl_mvm_phc_get_crosstimestamp()
198 u32 gp2; in iwl_mvm_ptp_work() local
201 gp2 = iwl_mvm_get_systime(mvm); in iwl_mvm_ptp_work()
202 iwl_mvm_ptp_update_new_read(mvm, gp2); in iwl_mvm_ptp_work()
211 u64 gp2; in iwl_mvm_ptp_gettime() local
215 gp2 = iwl_mvm_get_systime(mvm); in iwl_mvm_ptp_gettime()
216 ns = iwl_mvm_ptp_get_adj_time(mvm, gp2 * NSEC_PER_USEC); in iwl_mvm_ptp_gettime()
243 u32 gp2; in iwl_mvm_ptp_adjfine() local
251 gp2 = iwl_mvm_get_systime(mvm); in iwl_mvm_ptp_adjfine()
253 iwl_mvm_ptp_get_adj_time(mvm, gp2 * NSEC_PER_USEC); in iwl_mvm_ptp_adjfine()
254 data->scale_update_gp2 = gp2; in iwl_mvm_ptp_adjfine()