Lines Matching defs:clocks
400 u64 clocks;
412 /* Determine the number of clocks in the requested period. 64 bit
416 clocks = period * (u64)gpt->ipb_freq;
417 do_div(clocks, 1000000000); /* Scale it down to ns range */
420 if (clocks > 0xffffffff)
423 /* Calculate the prescaler and count values from the clocks value.
424 * 'clocks' is the number of clock ticks in the period. The timer
426 * calculated by integer dividing the clocks by 0x10000 (shifting
427 * down 16 bits) to obtain the smallest possible divisor for clocks
435 prescale = (clocks >> 16) + 1;
436 do_div(clocks, prescale);
437 if (clocks > 0xffff) {
438 pr_err("calculation error; prescale:%x clocks:%llx\n",
439 prescale, clocks);
451 out_be32(&gpt->regs->count, prescale << 16 | clocks);