/* Get the MMIO base address of SD/MMC host controller. */
EFI_STATUS EFIAPI GetSdMmcHcMmioBar(IN EDKII_SD_MMC_HOST_CONTROLLER_PPI *This, IN UINT8 ControllerId, IN OUT UINTN **MmioBar, OUT UINT8 *BarNum)
/* Get the MMIO base address of SD/MMC host controller. */
EFI_STATUS EFIAPI GetSdMmcHcMmioBar(IN EDKII_SD_MMC_HOST_CONTROLLER_PPI *This, IN UINT8 ControllerId, IN OUT UINTN **MmioBar, OUT UINT8 *BarNum)
{
  SD_MMC_HC_PEI_PRIVATE_DATA  *Private;
  if ((This == NULL) || (MmioBar == NULL) || (BarNum == NULL)) {
    return EFI_INVALID_PARAMETER;
  }
  Private = SD_MMC_HC_PEI_PRIVATE_DATA_FROM_THIS (This);
  if (ControllerId >= Private->TotalSdMmcHcs) {
    return EFI_INVALID_PARAMETER;
  }
  *MmioBar = &Private->MmioBar[ControllerId].MmioBarAddr[0];
  *BarNum  = (UINT8)Private->MmioBar[ControllerId].SlotNum;
  return EFI_SUCCESS;
}