Lines Matching full:prescale
388 u32 prescale; in mpc52xx_gpt_do_start() local
417 * Note: the prescale register is '1' based, not '0' based. ie. a in mpc52xx_gpt_do_start()
420 * around and divides by 0x10000. That is why prescale must be in mpc52xx_gpt_do_start()
422 prescale = (clocks >> 16) + 1; in mpc52xx_gpt_do_start()
423 do_div(clocks, prescale); in mpc52xx_gpt_do_start()
425 pr_err("calculation error; prescale:%x clocks:%llx\n", in mpc52xx_gpt_do_start()
426 prescale, clocks); in mpc52xx_gpt_do_start()
438 out_be32(&gpt->regs->count, prescale << 16 | clocks); in mpc52xx_gpt_do_start()
492 u64 prescale; in mpc52xx_gpt_timer_period() local
499 prescale = period >> 16; in mpc52xx_gpt_timer_period()
501 if (prescale == 0) in mpc52xx_gpt_timer_period()
502 prescale = 0x10000; in mpc52xx_gpt_timer_period()
503 period = period * prescale * 1000000000ULL; in mpc52xx_gpt_timer_period()