/* Refer to SD Host Controller Simplified spec 3.0 Section 3.3 for details. */
EFI_STATUS SdMmcHcPowerControl(IN EFI_PCI_IO_PROTOCOL *PciIo, IN UINT8 Slot, IN UINT8 PowerCtrl)
/* Refer to SD Host Controller Simplified spec 3.0 Section 3.3 for details. */
EFI_STATUS SdMmcHcPowerControl(IN EFI_PCI_IO_PROTOCOL *PciIo, IN UINT8 Slot, IN UINT8 PowerCtrl)
{
  EFI_STATUS  Status;
  PowerCtrl &= (UINT8) ~BIT0;
  Status     = SdMmcHcRwMmio (PciIo, Slot, SD_MMC_HC_POWER_CTRL, FALSE, sizeof (PowerCtrl), &PowerCtrl);
  if (EFI_ERROR (Status)) {
    return Status;
  }
  PowerCtrl |= BIT0;
  Status     = SdMmcHcRwMmio (PciIo, Slot, SD_MMC_HC_POWER_CTRL, FALSE, sizeof (PowerCtrl), &PowerCtrl);
  return Status;
}