/* Check if the passed bus width is supported by controller and card. */
BOOLEAN EmmcIsBusWidthSupported(IN SD_MMC_HC_PRIVATE_DATA *Private, IN UINT8 SlotIndex, IN SD_MMC_BUS_MODE BusTiming, IN UINT16 BusWidth)
/* Check if the passed bus width is supported by controller and card. */
BOOLEAN EmmcIsBusWidthSupported(IN SD_MMC_HC_PRIVATE_DATA *Private, IN UINT8 SlotIndex, IN SD_MMC_BUS_MODE BusTiming, IN UINT16 BusWidth)
{
  if ((BusWidth == 8) && (Private->Capability[SlotIndex].BusWidth8 != 0)) {
    return TRUE;
  } else if ((BusWidth == 4) && (BusTiming != SdMmcMmcHs400)) {
    return TRUE;
  } else if ((BusWidth == 1) && ((BusTiming == SdMmcMmcHsSdr) || (BusTiming == SdMmcMmcLegacy))) {
    return TRUE;
  }
  return FALSE;
}