Lines Matching refs: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;
297 * We only have a duration table for protected commands, where the upper
304 duration = chip->duration[duration_idx];
305 if (duration <= 0)
308 return duration;
419 sizeof(cap.duration));
423 chip->duration[TPM_SHORT] =
424 usecs_to_jiffies(be32_to_cpu(cap.duration.tpm_short));
425 chip->duration[TPM_MEDIUM] =
426 usecs_to_jiffies(be32_to_cpu(cap.duration.tpm_medium));
427 chip->duration[TPM_LONG] =
428 usecs_to_jiffies(be32_to_cpu(cap.duration.tpm_long));
429 chip->duration[TPM_LONG_LONG] = 0; /* not used under 1.2 */
432 * Provide the ability for vendor overrides of duration values in case
440 chip->duration[TPM_SHORT] = durations[0];
441 chip->duration[TPM_MEDIUM] = durations[1];
442 chip->duration[TPM_LONG] = durations[2];
450 if (chip->duration[TPM_SHORT] < (HZ / 100)) {
451 chip->duration[TPM_SHORT] = HZ;
452 chip->duration[TPM_MEDIUM] *= 1000;
453 chip->duration[TPM_LONG] *= 1000;
647 unsigned long duration;
650 duration = tpm1_calc_ordinal_duration(chip, TPM_ORD_CONTINUE_SELFTEST);
652 loops = jiffies_to_msecs(duration) / delay_msec;
671 * until the self test duration expires.