diff options
Diffstat (limited to 'EmbeddedPkg/Include/Protocol')
-rw-r--r-- | EmbeddedPkg/Include/Protocol/MmcHost.h | 81 |
1 files changed, 60 insertions, 21 deletions
diff --git a/EmbeddedPkg/Include/Protocol/MmcHost.h b/EmbeddedPkg/Include/Protocol/MmcHost.h index 0196aad2ae..21112cc3dd 100644 --- a/EmbeddedPkg/Include/Protocol/MmcHost.h +++ b/EmbeddedPkg/Include/Protocol/MmcHost.h @@ -78,36 +78,75 @@ typedef enum _MMC_STATE { MmcDisconnectState,
} MMC_STATE;
-typedef BOOLEAN (*MMC_ISCARDPRESENT)();
-
-typedef BOOLEAN (*MMC_ISREADONLY)();
-
-typedef EFI_STATUS (*MMC_BUILDDEVICEPATH)(EFI_DEVICE_PATH_PROTOCOL **DevicePath);
-
-typedef EFI_STATUS (*MMC_NOTIFYSTATE)(MMC_STATE State);
-
-typedef EFI_STATUS (*MMC_SENDCOMMAND)(MMC_CMD Cmd, UINT32 Argument);
+///
+/// Forward declaration for EFI_MMC_HOST_PROTOCOL
+///
+typedef struct _EFI_MMC_HOST_PROTOCOL EFI_MMC_HOST_PROTOCOL;
+
+typedef BOOLEAN (EFIAPI *MMC_ISCARDPRESENT) (
+ IN EFI_MMC_HOST_PROTOCOL *This
+ );
+
+typedef BOOLEAN (EFIAPI *MMC_ISREADONLY) (
+ IN EFI_MMC_HOST_PROTOCOL *This
+ );
+
+typedef EFI_STATUS (EFIAPI *MMC_BUILDDEVICEPATH) (
+ IN EFI_MMC_HOST_PROTOCOL *This,
+ OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath
+ );
+
+typedef EFI_STATUS (EFIAPI *MMC_NOTIFYSTATE) (
+ IN EFI_MMC_HOST_PROTOCOL *This,
+ IN MMC_STATE State
+ );
+
+typedef EFI_STATUS (EFIAPI *MMC_SENDCOMMAND) (
+ IN EFI_MMC_HOST_PROTOCOL *This,
+ IN MMC_CMD Cmd,
+ IN UINT32 Argument
+ );
+
+typedef EFI_STATUS (EFIAPI *MMC_RECEIVERESPONSE) (
+ IN EFI_MMC_HOST_PROTOCOL *This,
+ IN MMC_RESPONSE_TYPE Type,
+ IN UINT32 *Buffer
+ );
+
+typedef EFI_STATUS (EFIAPI *MMC_READBLOCKDATA) (
+ IN EFI_MMC_HOST_PROTOCOL *This,
+ IN EFI_LBA Lba,
+ IN UINTN Length,
+ OUT UINT32 *Buffer
+ );
+
+typedef EFI_STATUS (EFIAPI *MMC_WRITEBLOCKDATA) (
+ IN EFI_MMC_HOST_PROTOCOL *This,
+ IN EFI_LBA Lba,
+ IN UINTN Length,
+ IN UINT32 *Buffer
+ );
-typedef EFI_STATUS (*MMC_RECEIVERESPONSE)(MMC_RESPONSE_TYPE Type, UINT32* Buffer);
-typedef EFI_STATUS (*MMC_READBLOCKDATA)(EFI_LBA Lba, UINTN Length, UINT32* Buffer);
+typedef struct _EFI_MMC_HOST_PROTOCOL {
-typedef EFI_STATUS (*MMC_WRITEBLOCKDATA)(EFI_LBA Lba, UINTN Length, UINT32* Buffer);
+ UINT32 Revision;
+ MMC_ISCARDPRESENT IsCardPresent;
+ MMC_ISREADONLY IsReadOnly;
+ MMC_BUILDDEVICEPATH BuildDevicePath;
-typedef struct _EFI_MMC_HOST_PROTOCOL {
- MMC_ISCARDPRESENT IsCardPresent;
- MMC_ISREADONLY IsReadOnly;
- MMC_BUILDDEVICEPATH BuildDevicePath;
+ MMC_NOTIFYSTATE NotifyState;
- MMC_NOTIFYSTATE NotifyState;
+ MMC_SENDCOMMAND SendCommand;
+ MMC_RECEIVERESPONSE ReceiveResponse;
- MMC_SENDCOMMAND SendCommand;
- MMC_RECEIVERESPONSE ReceiveResponse;
+ MMC_READBLOCKDATA ReadBlockData;
+ MMC_WRITEBLOCKDATA WriteBlockData;
- MMC_READBLOCKDATA ReadBlockData;
- MMC_WRITEBLOCKDATA WriteBlockData;
} EFI_MMC_HOST_PROTOCOL;
+#define MMC_HOST_PROTOCOL_REVISION 0x00010001 // 1.1
+
extern EFI_GUID gEfiMmcHostProtocolGuid;
#endif
|