Home
last modified time | relevance | path

Searched refs:idtfc3 (Results 1 – 2 of 2) sorted by relevance

/linux-6.12.1/drivers/ptp/
Dptp_fc3.c38 static s64 ns2counters(struct idtfc3 *idtfc3, s64 nsec, u32 *sub_ns) in ns2counters() argument
44 sync = div_u64_rem(nsec, idtfc3->ns_per_sync, &rem); in ns2counters()
47 sync = -div_u64_rem(-nsec - 1, idtfc3->ns_per_sync, &rem) - 1; in ns2counters()
48 *sub_ns = idtfc3->ns_per_sync - rem - 1; in ns2counters()
51 return sync * idtfc3->ns_per_sync; in ns2counters()
54 static s64 tdc_meas2offset(struct idtfc3 *idtfc3, u64 meas_read) in tdc_meas2offset() argument
61 fine = div64_s64(fine * NSEC_PER_SEC, idtfc3->tdc_apll_freq * 62LL); in tdc_meas2offset()
62 coarse = div64_s64(coarse * NSEC_PER_SEC, idtfc3->time_ref_freq); in tdc_meas2offset()
67 static s64 tdc_offset2phase(struct idtfc3 *idtfc3, s64 offset_ns) in tdc_offset2phase() argument
69 if (offset_ns > idtfc3->ns_per_sync / 2) in tdc_offset2phase()
[all …]
Dptp_fc3.h20 struct idtfc3 { struct