X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=EmbeddedPkg%2FUniversal%2FMmcDxe%2FMmc.h;h=c7e8c7e9fa402a22fc9c69adb9d2cbea779d4fe5;hb=16d88c2d20ccd9f8ea52967b578ece82174ea762;hp=8858454d0965099da464225fd1e1fda51097348a;hpb=36aa561136094f201484fd1fd9ac85ce6de3767a;p=mirror_edk2.git diff --git a/EmbeddedPkg/Universal/MmcDxe/Mmc.h b/EmbeddedPkg/Universal/MmcDxe/Mmc.h index 8858454d09..c7e8c7e9fa 100644 --- a/EmbeddedPkg/Universal/MmcDxe/Mmc.h +++ b/EmbeddedPkg/Universal/MmcDxe/Mmc.h @@ -32,15 +32,15 @@ #define MMC_OCR_POWERUP 0x80000000 -#define MMC_CSD_GET_CCC(Response) (Response[1] >> 20) -#define MMC_CSD_GET_TRANSPEED(Response) (Response[0] & 0xFF) -#define MMC_CSD_GET_READBLLEN(Response) ((Response[1] >> 16) & 0xF) -#define MMC_CSD_GET_WRITEBLLEN(Response) ((Response[3] >> 22) & 0xF) -#define MMC_CSD_GET_FILEFORMAT(Response) ((Response[3] >> 10) & 0x3) -#define MMC_CSD_GET_FILEFORMATGRP(Response) ((Response[3] >> 15) & 0x1) -#define MMC_CSD_GET_DEVICESIZE(csd) (((Response[2] >> 30) & 0x3) | ((Response[1] & 0x3FF) << 2)) +#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) +#define MMC_CSD_GET_WRITEBLLEN(Response) ((Response[0] >> 22) & 0xF) +#define MMC_CSD_GET_FILEFORMAT(Response) ((Response[0] >> 10) & 0x3) +#define MMC_CSD_GET_FILEFORMATGRP(Response) ((Response[0] >> 15) & 0x1) +#define MMC_CSD_GET_DEVICESIZE(csd) (((Response[1] >> 30) & 0x3) | ((Response[2] & 0x3FF) << 2)) #define HC_MMC_CSD_GET_DEVICESIZE(Response) ((Response[1] >> 16) | ((Response[2] & 0x40) << 16)); -#define MMC_CSD_GET_DEVICESIZEMULT(csd) ((Response[2] >> 15) & 0x7) +#define MMC_CSD_GET_DEVICESIZEMULT(csd) ((Response[1] >> 15) & 0x7) #define MMC_R0_READY_FOR_DATA (1 << 8) @@ -288,4 +288,15 @@ MmcFlushBlocks ( IN EFI_BLOCK_IO_PROTOCOL *This ); +EFI_STATUS InitializeMmcDevice ( + IN MMC_HOST_INSTANCE *MmcHost + ); + +VOID +EFIAPI +CheckCardsCallback ( + IN EFI_EVENT Event, + IN VOID *Context + ); + #endif