Lines Matching refs:duration
312 int duration = 0; in tpm_calc_ordinal_duration() local
322 duration = chip->duration[duration_idx]; in tpm_calc_ordinal_duration()
323 if (duration <= 0) in tpm_calc_ordinal_duration()
326 return duration; in tpm_calc_ordinal_duration()
781 chip->duration[TPM_SHORT] = in tpm_get_timeouts()
783 chip->duration[TPM_MEDIUM] = in tpm_get_timeouts()
785 chip->duration[TPM_LONG] = in tpm_get_timeouts()
787 chip->duration[TPM_LONG_LONG] = in tpm_get_timeouts()
867 sizeof(cap.duration)); in tpm_get_timeouts()
871 chip->duration[TPM_SHORT] = in tpm_get_timeouts()
872 usecs_to_jiffies(be32_to_cpu(cap.duration.tpm_short)); in tpm_get_timeouts()
873 chip->duration[TPM_MEDIUM] = in tpm_get_timeouts()
874 usecs_to_jiffies(be32_to_cpu(cap.duration.tpm_medium)); in tpm_get_timeouts()
875 chip->duration[TPM_LONG] = in tpm_get_timeouts()
876 usecs_to_jiffies(be32_to_cpu(cap.duration.tpm_long)); in tpm_get_timeouts()
877 chip->duration[TPM_LONG_LONG] = 0; /* not used under 1.2 */ in tpm_get_timeouts()
884 if (chip->duration[TPM_SHORT] < (HZ / 100)) { in tpm_get_timeouts()
885 chip->duration[TPM_SHORT] = HZ; in tpm_get_timeouts()
886 chip->duration[TPM_MEDIUM] *= 1000; in tpm_get_timeouts()
887 chip->duration[TPM_LONG] *= 1000; in tpm_get_timeouts()
1085 unsigned long duration; in tpm_do_selftest() local
1088 duration = tpm_calc_ordinal_duration(chip, TPM_ORD_CONTINUE_SELFTEST); in tpm_do_selftest()
1090 loops = jiffies_to_msecs(duration) / delay_msec; in tpm_do_selftest()