MdeModulePkg/SdMmcPciHcDxe: Check SD's supported bus mode before switch

Before switch to a bus mode, we need check if the SD device supports
this bus mode.

Cc: Wu, Hao A <hao.a.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Feng Tian <feng.tian@intel.com>
This commit is contained in:
Feng Tian
2016-05-03 09:57:55 +08:00
parent 8c983d3e06
commit 6263ae931d
3 changed files with 86 additions and 52 deletions

View File

@@ -254,6 +254,7 @@ SdPeimHcInitHost (
@param[in] DriveStrength The value for drive length group.
@param[in] PowerLimit The value for power limit group.
@param[in] Mode Switch or check function.
@param[out] SwitchResp The return switch function status.
@retval EFI_SUCCESS The operation is done correctly.
@retval Others The operation fails.
@@ -261,12 +262,13 @@ SdPeimHcInitHost (
**/
EFI_STATUS
SdPeimSwitch (
IN SD_PEIM_HC_SLOT *Slot,
IN UINT8 AccessMode,
IN UINT8 CommandSystem,
IN UINT8 DriveStrength,
IN UINT8 PowerLimit,
IN BOOLEAN Mode
IN SD_PEIM_HC_SLOT *Slot,
IN UINT8 AccessMode,
IN UINT8 CommandSystem,
IN UINT8 DriveStrength,
IN UINT8 PowerLimit,
IN BOOLEAN Mode,
OUT UINT8 *SwitchResp
);
/**