Lines Matching full:duration

282  * tpm1_calc_ordinal_duration() - calculate the maximum command duration
289 * Return: A maximal duration time for an ordinal in jiffies.
294 int duration = 0; in tpm1_calc_ordinal_duration() local
297 * We only have a duration table for protected commands, where the upper in tpm1_calc_ordinal_duration()
304 duration = chip->duration[duration_idx]; in tpm1_calc_ordinal_duration()
305 if (duration <= 0) in tpm1_calc_ordinal_duration()
308 return duration; in tpm1_calc_ordinal_duration()
419 sizeof(cap.duration)); in tpm1_get_timeouts()
423 chip->duration[TPM_SHORT] = in tpm1_get_timeouts()
424 usecs_to_jiffies(be32_to_cpu(cap.duration.tpm_short)); in tpm1_get_timeouts()
425 chip->duration[TPM_MEDIUM] = in tpm1_get_timeouts()
426 usecs_to_jiffies(be32_to_cpu(cap.duration.tpm_medium)); in tpm1_get_timeouts()
427 chip->duration[TPM_LONG] = in tpm1_get_timeouts()
428 usecs_to_jiffies(be32_to_cpu(cap.duration.tpm_long)); in tpm1_get_timeouts()
429 chip->duration[TPM_LONG_LONG] = 0; /* not used under 1.2 */ in tpm1_get_timeouts()
432 * Provide the ability for vendor overrides of duration values in case in tpm1_get_timeouts()
440 chip->duration[TPM_SHORT] = durations[0]; in tpm1_get_timeouts()
441 chip->duration[TPM_MEDIUM] = durations[1]; in tpm1_get_timeouts()
442 chip->duration[TPM_LONG] = durations[2]; in tpm1_get_timeouts()
450 if (chip->duration[TPM_SHORT] < (HZ / 100)) { in tpm1_get_timeouts()
451 chip->duration[TPM_SHORT] = HZ; in tpm1_get_timeouts()
452 chip->duration[TPM_MEDIUM] *= 1000; in tpm1_get_timeouts()
453 chip->duration[TPM_LONG] *= 1000; in tpm1_get_timeouts()
647 unsigned long duration; in tpm1_do_selftest() local
650 duration = tpm1_calc_ordinal_duration(chip, TPM_ORD_CONTINUE_SELFTEST); in tpm1_do_selftest()
652 loops = jiffies_to_msecs(duration) / delay_msec; in tpm1_do_selftest()
671 * until the self test duration expires. in tpm1_do_selftest()