mirror of https://github.com/acidanthera/audk.git
MdeModulePkg/SdMmcPciHcDxe: Allow additional SDHCI versions
Clock control is similar in SDHCI versions greater then version 2. Add support for more recent versions of the controller specification. SD card support for 1.8V is also present in controller versions 3 and greater. https://bugzilla.tianocore.org/show_bug.cgi?id=1233 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jeff Brasen <jbrasen@nvidia.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
This commit is contained in:
parent
bdf038ccff
commit
bbce001515
|
@ -978,7 +978,8 @@ SdCardIdentification (
|
|||
return Status;
|
||||
}
|
||||
|
||||
if ((ControllerVer & 0xFF) == SD_MMC_HC_CTRL_VER_300) {
|
||||
if (((ControllerVer & 0xFF) >= SD_MMC_HC_CTRL_VER_300) &&
|
||||
((ControllerVer & 0xFF) <= SD_MMC_HC_CTRL_VER_420)) {
|
||||
S18r = TRUE;
|
||||
} else if (((ControllerVer & 0xFF) == SD_MMC_HC_CTRL_VER_100) || ((ControllerVer & 0xFF) == SD_MMC_HC_CTRL_VER_200)) {
|
||||
S18r = FALSE;
|
||||
|
|
|
@ -782,7 +782,8 @@ SdMmcHcClockSupply (
|
|||
//
|
||||
// Set SDCLK Frequency Select and Internal Clock Enable fields in Clock Control register.
|
||||
//
|
||||
if ((ControllerVer & 0xFF) == SD_MMC_HC_CTRL_VER_300) {
|
||||
if (((ControllerVer & 0xFF) >= SD_MMC_HC_CTRL_VER_300) &&
|
||||
((ControllerVer & 0xFF) <= SD_MMC_HC_CTRL_VER_420)) {
|
||||
ASSERT (Divisor <= 0x3FF);
|
||||
ClockCtrl = ((Divisor & 0xFF) << 8) | ((Divisor & 0x300) >> 2);
|
||||
} else if (((ControllerVer & 0xFF) == 0) || ((ControllerVer & 0xFF) == 1)) {
|
||||
|
|
Loading…
Reference in New Issue