]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c
MdeModulePkg/SdMmcPciHcDxe: Allow additional SDHCI versions
[mirror_edk2.git] / MdeModulePkg / Bus / Pci / SdMmcPciHcDxe / SdMmcPciHci.c
index 3b9a184bc4efcdd504a70ed1bd579fc8f14e368d..bedc96863cc3ca13327cd919aaa0186574478ac1 100644 (file)
@@ -782,7 +782,8 @@ SdMmcHcClockSupply (
   //\r
   // Set SDCLK Frequency Select and Internal Clock Enable fields in Clock Control register.\r
   //\r
-  if ((ControllerVer & 0xFF) == SD_MMC_HC_CTRL_VER_300) {\r
+  if (((ControllerVer & 0xFF) >= SD_MMC_HC_CTRL_VER_300) &&\r
+      ((ControllerVer & 0xFF) <= SD_MMC_HC_CTRL_VER_420)) {\r
     ASSERT (Divisor <= 0x3FF);\r
     ClockCtrl = ((Divisor & 0xFF) << 8) | ((Divisor & 0x300) >> 2);\r
   } else if (((ControllerVer & 0xFF) == 0) || ((ControllerVer & 0xFF) == 1)) {\r