/* Refer to EMMC Electrical Standard Spec 5.1 Section 6.4 for details. */
EFI_STATUS EmmcPeimSetRca(IN EMMC_PEIM_HC_SLOT *Slot, IN UINT32 Rca)
/* Refer to EMMC Electrical Standard Spec 5.1 Section 6.4 for details. */
EFI_STATUS EmmcPeimSetRca(IN EMMC_PEIM_HC_SLOT *Slot, IN UINT32 Rca)
{
  EMMC_COMMAND_BLOCK   EmmcCmdBlk;
  EMMC_STATUS_BLOCK    EmmcStatusBlk;
  EMMC_COMMAND_PACKET  Packet;
  EFI_STATUS           Status;
  ZeroMem (&EmmcCmdBlk, sizeof (EmmcCmdBlk));
  ZeroMem (&EmmcStatusBlk, sizeof (EmmcStatusBlk));
  ZeroMem (&Packet, sizeof (Packet));
  Packet.EmmcCmdBlk    = &EmmcCmdBlk;
  Packet.EmmcStatusBlk = &EmmcStatusBlk;
  Packet.Timeout       = EMMC_TIMEOUT;
  EmmcCmdBlk.CommandIndex    = EMMC_SET_RELATIVE_ADDR;
  EmmcCmdBlk.CommandType     = EmmcCommandTypeAc;
  EmmcCmdBlk.ResponseType    = EmmcResponceTypeR1;
  EmmcCmdBlk.CommandArgument = Rca << 16;
  Status = EmmcPeimExecCmd (Slot, &Packet);
  return Status;
}