/* Get the control of TPM chip by sending requestUse command TIS_PC_ACC_RQUUSE to ACCESS Register in the time of default TIS_TIMEOUT_A. */
EFI_STATUS TisPcRequestUseTpm(IN TIS_PC_REGISTERS_PTR TisReg)
/* Get the control of TPM chip by sending requestUse command TIS_PC_ACC_RQUUSE to ACCESS Register in the time of default TIS_TIMEOUT_A. */
EFI_STATUS TisPcRequestUseTpm(IN TIS_PC_REGISTERS_PTR TisReg)
{
  EFI_STATUS  Status;
  if (TisReg == NULL) {
    return EFI_INVALID_PARAMETER;
  }
  if (!TisPcPresenceCheck (TisReg)) {
    return EFI_NOT_FOUND;
  }
  MmioWrite8 ((UINTN)&TisReg->Access, TIS_PC_ACC_RQUUSE);
  Status = TisPcWaitRegisterBits (
             &TisReg->Access,
             (UINT8)(TIS_PC_ACC_ACTIVE |TIS_PC_VALID),
             0,
             TIS_TIMEOUT_A
             );
  return Status;
}