/* Refer to SD Host Controller Simplified spec 3.0 Section 3.2.2 for details. */
EFI_STATUS SdMmcHcStopClock(IN EFI_PCI_IO_PROTOCOL *PciIo, IN UINT8 Slot)
/* Refer to SD Host Controller Simplified spec 3.0 Section 3.2.2 for details. */
EFI_STATUS SdMmcHcStopClock(IN EFI_PCI_IO_PROTOCOL *PciIo, IN UINT8 Slot)
{
  EFI_STATUS  Status;
  UINT32      PresentState;
  UINT16      ClockCtrl;
  Status = SdMmcHcWaitMmioSet (
             PciIo,
             Slot,
             SD_MMC_HC_PRESENT_STATE,
             sizeof (PresentState),
             BIT0 | BIT1,
             0,
             SD_MMC_HC_GENERIC_TIMEOUT
             );
  if (EFI_ERROR (Status)) {
    return Status;
  }
  ClockCtrl = (UINT16) ~BIT2;
  Status    = SdMmcHcAndMmio (PciIo, Slot, SD_MMC_HC_CLOCK_CTRL, sizeof (ClockCtrl), &ClockCtrl);
  return Status;
}