Lines Matching refs:cc
190 static u64 cpts_systim_read(const struct cyclecounter *cc) in cpts_systim_read() argument
195 struct cpts *cpts = container_of(cc, struct cpts, cc); in cpts_systim_read()
237 cpts->cc.mult = neg_adj ? mult - diff : mult + diff; in cpts_ptp_adjfreq()
281 timecounter_init(&cpts->tc, &cpts->cc, ns); in cpts_ptp_settime()
462 timecounter_init(&cpts->tc, &cpts->cc, ktime_to_ns(ktime_get_real())); in cpts_register()
509 maxsec = cpts->cc.mask; in cpts_calc_mult_shift()
522 if (cpts->cc.mult || cpts->cc.shift) in cpts_calc_mult_shift()
525 clocks_calc_mult_shift(&cpts->cc.mult, &cpts->cc.shift, in cpts_calc_mult_shift()
529 ns = cyclecounter_cyc2ns(&cpts->cc, freq, cpts->cc.mask, &frac); in cpts_calc_mult_shift()
533 freq, cpts->cc.mult, cpts->cc.shift, (ns - NSEC_PER_SEC)); in cpts_calc_mult_shift()
618 cpts->cc.mult = prop; in cpts_of_parse()
621 cpts->cc.shift = prop; in cpts_of_parse()
623 if ((cpts->cc.mult && !cpts->cc.shift) || in cpts_of_parse()
624 (!cpts->cc.mult && cpts->cc.shift)) in cpts_of_parse()
667 cpts->cc.read = cpts_systim_read; in cpts_create()
668 cpts->cc.mask = CLOCKSOURCE_MASK(32); in cpts_create()
675 cpts->cc_mult = cpts->cc.mult; in cpts_create()