diff options
author | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-09-01 17:08:41 +0000 |
---|---|---|
committer | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-09-01 17:08:41 +0000 |
commit | 16d88c2d20ccd9f8ea52967b578ece82174ea762 (patch) | |
tree | 396c179773cb020167359aee051b6831a03d2f47 /EmbeddedPkg/Include/Protocol/MmcHost.h | |
parent | 66f47f9fc00e3770d0502305387389c91e2025de (diff) | |
download | edk2-platforms-16d88c2d20ccd9f8ea52967b578ece82174ea762.tar.xz |
EmbeddedPkg/MmcDxe: Add 'This' pointer attribute to protocol function
This attribute allows the EFI_MMC_HOST_PROTOCOL interface to manage
multiple instances in one driver.
EmbeddedPkg/MmcDxe: Add Revision attribute to the EFI_MMC_HOST_PROTOCOL
Note: The ARM PL180 and Omap35xx MMC host drivers has been updated.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12255 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EmbeddedPkg/Include/Protocol/MmcHost.h')
-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
|