/* Set TPM chip to ready state by sending ready command TIS_PC_STS_READY to Status Register in time. */
EFI_STATUS Tpm12TisPcPrepareCommand(IN TIS_PC_REGISTERS_PTR TisReg)
/* Set TPM chip to ready state by sending ready command TIS_PC_STS_READY to Status Register in time. */
EFI_STATUS Tpm12TisPcPrepareCommand(IN TIS_PC_REGISTERS_PTR TisReg)
{
  EFI_STATUS  Status;
  if (TisReg == NULL) {
    return EFI_INVALID_PARAMETER;
  }
  MmioWrite8 ((UINTN)&TisReg->Status, TIS_PC_STS_READY);
  Status = Tpm12TisPcWaitRegisterBits (
             &TisReg->Status,
             TIS_PC_STS_READY,
             0,
             TIS_TIMEOUT_B
             );
  return Status;
}