EmbeddedPkg/MmcDxe: expand to support multiple blocks

Make use of DMA to transfer multiple blocks at one time. It could
improve the performance on MMC/SD driver.

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:
Haojian Zhuang
2016-11-23 21:36:24 +08:00
committed by Ard Biesheuvel
parent e06253ba80
commit 339c6e905a
2 changed files with 121 additions and 59 deletions

View File

@@ -34,6 +34,10 @@
#define MMC_OCR_POWERUP 0x80000000
#define MMC_OCR_ACCESS_MASK 0x3 /* bit[30-29] */
#define MMC_OCR_ACCESS_BYTE 0x1 /* bit[29] */
#define MMC_OCR_ACCESS_SECTOR 0x2 /* bit[30] */
#define MMC_CSD_GET_CCC(Response) (Response[2] >> 20)
#define MMC_CSD_GET_TRANSPEED(Response) (Response[3] & 0xFF)
#define MMC_CSD_GET_READBLLEN(Response) ((Response[2] >> 16) & 0xF)