EmbeddedPkg/MmcDxe: invoke SetIos() protocol method to set speed and width
Add the interface to change the bus width and speed. By default, MMC is initialized with 1-bit mode and less than 400KHz bus clock. It causes MMC working inefficiently. Set I/O bus width on both MMC controller and EXTCSD. Otherwise, it may cause unmatched failure case. And support more timing mode, high speed, HS200 & HS400 mode. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org> Tested-by: Ryan Harkin <ryan.harkin@linaro.org> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
This commit is contained in:
committed by
Ard Biesheuvel
parent
1df2fe1433
commit
752ae80514
@@ -55,6 +55,11 @@
|
||||
#define MMC_R0_STATE_TRAN 4
|
||||
#define MMC_R0_STATE_DATA 5
|
||||
|
||||
#define EMMC_CMD6_ARG_ACCESS(x) (((x) & 0x3) << 24)
|
||||
#define EMMC_CMD6_ARG_INDEX(x) (((x) & 0xFF) << 16)
|
||||
#define EMMC_CMD6_ARG_VALUE(x) (((x) & 0xFF) << 8)
|
||||
#define EMMC_CMD6_ARG_CMD_SET(x) (((x) & 0x7) << 0)
|
||||
|
||||
typedef enum {
|
||||
UNKNOWN_CARD,
|
||||
MMC_CARD, //MMC card
|
||||
|
Reference in New Issue
Block a user