TianoCore EDK2 master
Loading...
Searching...
No Matches
MmcHost.h File Reference

Go to the source code of this file.

Data Structures

struct  _EFI_MMC_HOST_PROTOCOL
 

Macros

#define EMBEDDED_MMC_HOST_PROTOCOL_GUID    { 0x3e591c00, 0x9e4a, 0x11df, {0x92, 0x44, 0x00, 0x02, 0xA5, 0xD5, 0xC5, 0x1B } }
 
#define MMC_RESPONSE_TYPE_R1   0
 
#define MMC_RESPONSE_TYPE_R1b   0
 
#define MMC_RESPONSE_TYPE_R2   1
 
#define MMC_RESPONSE_TYPE_R3   0
 
#define MMC_RESPONSE_TYPE_R6   0
 
#define MMC_RESPONSE_TYPE_R7   0
 
#define MMC_RESPONSE_TYPE_OCR   0
 
#define MMC_RESPONSE_TYPE_CID   1
 
#define MMC_RESPONSE_TYPE_CSD   1
 
#define MMC_RESPONSE_TYPE_RCA   0
 
#define MMC_CMD_WAIT_RESPONSE   (1 << 16)
 
#define MMC_CMD_LONG_RESPONSE   (1 << 17)
 
#define MMC_CMD_NO_CRC_RESPONSE   (1 << 18)
 
#define MMC_INDX(Index)   ((Index) & 0xFFFF)
 
#define MMC_GET_INDX(MmcCmd)   ((MmcCmd) & 0xFFFF)
 
#define MMC_CMD0   (MMC_INDX(0) | MMC_CMD_NO_CRC_RESPONSE)
 
#define MMC_CMD1   (MMC_INDX(1) | MMC_CMD_WAIT_RESPONSE | MMC_CMD_NO_CRC_RESPONSE)
 
#define MMC_CMD2   (MMC_INDX(2) | MMC_CMD_WAIT_RESPONSE | MMC_CMD_LONG_RESPONSE)
 
#define MMC_CMD3   (MMC_INDX(3) | MMC_CMD_WAIT_RESPONSE)
 
#define MMC_CMD5   (MMC_INDX(5) | MMC_CMD_WAIT_RESPONSE | MMC_CMD_NO_CRC_RESPONSE)
 
#define MMC_CMD6   (MMC_INDX(6) | MMC_CMD_WAIT_RESPONSE)
 
#define MMC_CMD7   (MMC_INDX(7) | MMC_CMD_WAIT_RESPONSE)
 
#define MMC_CMD8   (MMC_INDX(8) | MMC_CMD_WAIT_RESPONSE)
 
#define MMC_CMD9   (MMC_INDX(9) | MMC_CMD_WAIT_RESPONSE | MMC_CMD_LONG_RESPONSE)
 
#define MMC_CMD11   (MMC_INDX(11) | MMC_CMD_WAIT_RESPONSE)
 
#define MMC_CMD12   (MMC_INDX(12) | MMC_CMD_WAIT_RESPONSE)
 
#define MMC_CMD13   (MMC_INDX(13) | MMC_CMD_WAIT_RESPONSE)
 
#define MMC_CMD16   (MMC_INDX(16) | MMC_CMD_WAIT_RESPONSE)
 
#define MMC_CMD17   (MMC_INDX(17) | MMC_CMD_WAIT_RESPONSE)
 
#define MMC_CMD18   (MMC_INDX(18) | MMC_CMD_WAIT_RESPONSE)
 
#define MMC_CMD20   (MMC_INDX(20) | MMC_CMD_WAIT_RESPONSE)
 
#define MMC_CMD23   (MMC_INDX(23) | MMC_CMD_WAIT_RESPONSE)
 
#define MMC_CMD24   (MMC_INDX(24) | MMC_CMD_WAIT_RESPONSE)
 
#define MMC_CMD25   (MMC_INDX(25) | MMC_CMD_WAIT_RESPONSE)
 
#define MMC_CMD55   (MMC_INDX(55) | MMC_CMD_WAIT_RESPONSE)
 
#define MMC_ACMD41   (MMC_INDX(41) | MMC_CMD_WAIT_RESPONSE | MMC_CMD_NO_CRC_RESPONSE)
 
#define MMC_ACMD51   (MMC_INDX(51) | MMC_CMD_WAIT_RESPONSE)
 
#define EMMC_CMD1_CAPACITY_LESS_THAN_2GB   0x00FF8080
 
#define EMMC_CMD1_CAPACITY_GREATER_THAN_2GB   0x40FF8080
 
#define MMC_STATUS_APP_CMD   (1 << 5)
 
#define EMMCBACKWARD   (0)
 
#define EMMCHS26   (1 << 0)
 
#define EMMCHS52   (1 << 1)
 
#define EMMCHS52DDR1V8   (1 << 2)
 
#define EMMCHS52DDR1V2   (1 << 3)
 
#define EMMCHS200SDR1V8   (1 << 4)
 
#define EMMCHS200SDR1V2   (1 << 5)
 
#define EMMCHS400DDR1V8   (1 << 6)
 
#define EMMCHS400DDR1V2   (1 << 7)
 
#define MMC_HOST_PROTOCOL_REVISION   0x00010002
 
#define MMC_HOST_HAS_SETIOS(Host)
 
#define MMC_HOST_HAS_ISMULTIBLOCK(Host)
 

Typedefs

typedef UINT32 MMC_RESPONSE_TYPE
 
typedef UINT32 MMC_CMD
 
typedef enum _MMC_STATE MMC_STATE
 
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(EFIAPI * MMC_SETIOS) (IN EFI_MMC_HOST_PROTOCOL *This, IN UINT32 BusClockFreq, IN UINT32 BusWidth, IN UINT32 TimingMode)
 
typedef BOOLEAN(EFIAPI * MMC_ISMULTIBLOCK) (IN EFI_MMC_HOST_PROTOCOL *This)
 

Enumerations

enum  _MMC_STATE {
  MmcInvalidState = 0 , MmcHwInitializationState , MmcIdleState , MmcReadyState ,
  MmcIdentificationState , MmcStandByState , MmcTransferState , MmcSendingDataState ,
  MmcReceiveDataState , MmcProgrammingState , MmcDisconnectState
}
 

Variables

EFI_GUID gEmbeddedMmcHostProtocolGuid
 

Detailed Description

Definition of the MMC Host Protocol

Copyright (c) 2011-2014, ARM Limited. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file MmcHost.h.

Macro Definition Documentation

◆ EMBEDDED_MMC_HOST_PROTOCOL_GUID

#define EMBEDDED_MMC_HOST_PROTOCOL_GUID    { 0x3e591c00, 0x9e4a, 0x11df, {0x92, 0x44, 0x00, 0x02, 0xA5, 0xD5, 0xC5, 0x1B } }

Global ID for the MMC Host Protocol

Definition at line 16 of file MmcHost.h.

◆ EMMC_CMD1_CAPACITY_GREATER_THAN_2GB

#define EMMC_CMD1_CAPACITY_GREATER_THAN_2GB   0x40FF8080

Definition at line 66 of file MmcHost.h.

◆ EMMC_CMD1_CAPACITY_LESS_THAN_2GB

#define EMMC_CMD1_CAPACITY_LESS_THAN_2GB   0x00FF8080

Definition at line 65 of file MmcHost.h.

◆ EMMCBACKWARD

#define EMMCBACKWARD   (0)

Definition at line 84 of file MmcHost.h.

◆ EMMCHS200SDR1V2

#define EMMCHS200SDR1V2   (1 << 5)

Definition at line 90 of file MmcHost.h.

◆ EMMCHS200SDR1V8

#define EMMCHS200SDR1V8   (1 << 4)

Definition at line 89 of file MmcHost.h.

◆ EMMCHS26

#define EMMCHS26   (1 << 0)

Definition at line 85 of file MmcHost.h.

◆ EMMCHS400DDR1V2

#define EMMCHS400DDR1V2   (1 << 7)

Definition at line 92 of file MmcHost.h.

◆ EMMCHS400DDR1V8

#define EMMCHS400DDR1V8   (1 << 6)

Definition at line 91 of file MmcHost.h.

◆ EMMCHS52

#define EMMCHS52   (1 << 1)

Definition at line 86 of file MmcHost.h.

◆ EMMCHS52DDR1V2

#define EMMCHS52DDR1V2   (1 << 3)

Definition at line 88 of file MmcHost.h.

◆ EMMCHS52DDR1V8

#define EMMCHS52DDR1V8   (1 << 2)

Definition at line 87 of file MmcHost.h.

◆ MMC_ACMD41

#define MMC_ACMD41   (MMC_INDX(41) | MMC_CMD_WAIT_RESPONSE | MMC_CMD_NO_CRC_RESPONSE)

Definition at line 61 of file MmcHost.h.

◆ MMC_ACMD51

#define MMC_ACMD51   (MMC_INDX(51) | MMC_CMD_WAIT_RESPONSE)

Definition at line 62 of file MmcHost.h.

◆ MMC_CMD0

#define MMC_CMD0   (MMC_INDX(0) | MMC_CMD_NO_CRC_RESPONSE)

Definition at line 41 of file MmcHost.h.

◆ MMC_CMD1

#define MMC_CMD1   (MMC_INDX(1) | MMC_CMD_WAIT_RESPONSE | MMC_CMD_NO_CRC_RESPONSE)

Definition at line 42 of file MmcHost.h.

◆ MMC_CMD11

#define MMC_CMD11   (MMC_INDX(11) | MMC_CMD_WAIT_RESPONSE)

Definition at line 50 of file MmcHost.h.

◆ MMC_CMD12

#define MMC_CMD12   (MMC_INDX(12) | MMC_CMD_WAIT_RESPONSE)

Definition at line 51 of file MmcHost.h.

◆ MMC_CMD13

#define MMC_CMD13   (MMC_INDX(13) | MMC_CMD_WAIT_RESPONSE)

Definition at line 52 of file MmcHost.h.

◆ MMC_CMD16

#define MMC_CMD16   (MMC_INDX(16) | MMC_CMD_WAIT_RESPONSE)

Definition at line 53 of file MmcHost.h.

◆ MMC_CMD17

#define MMC_CMD17   (MMC_INDX(17) | MMC_CMD_WAIT_RESPONSE)

Definition at line 54 of file MmcHost.h.

◆ MMC_CMD18

#define MMC_CMD18   (MMC_INDX(18) | MMC_CMD_WAIT_RESPONSE)

Definition at line 55 of file MmcHost.h.

◆ MMC_CMD2

#define MMC_CMD2   (MMC_INDX(2) | MMC_CMD_WAIT_RESPONSE | MMC_CMD_LONG_RESPONSE)

Definition at line 43 of file MmcHost.h.

◆ MMC_CMD20

#define MMC_CMD20   (MMC_INDX(20) | MMC_CMD_WAIT_RESPONSE)

Definition at line 56 of file MmcHost.h.

◆ MMC_CMD23

#define MMC_CMD23   (MMC_INDX(23) | MMC_CMD_WAIT_RESPONSE)

Definition at line 57 of file MmcHost.h.

◆ MMC_CMD24

#define MMC_CMD24   (MMC_INDX(24) | MMC_CMD_WAIT_RESPONSE)

Definition at line 58 of file MmcHost.h.

◆ MMC_CMD25

#define MMC_CMD25   (MMC_INDX(25) | MMC_CMD_WAIT_RESPONSE)

Definition at line 59 of file MmcHost.h.

◆ MMC_CMD3

#define MMC_CMD3   (MMC_INDX(3) | MMC_CMD_WAIT_RESPONSE)

Definition at line 44 of file MmcHost.h.

◆ MMC_CMD5

#define MMC_CMD5   (MMC_INDX(5) | MMC_CMD_WAIT_RESPONSE | MMC_CMD_NO_CRC_RESPONSE)

Definition at line 45 of file MmcHost.h.

◆ MMC_CMD55

#define MMC_CMD55   (MMC_INDX(55) | MMC_CMD_WAIT_RESPONSE)

Definition at line 60 of file MmcHost.h.

◆ MMC_CMD6

#define MMC_CMD6   (MMC_INDX(6) | MMC_CMD_WAIT_RESPONSE)

Definition at line 46 of file MmcHost.h.

◆ MMC_CMD7

#define MMC_CMD7   (MMC_INDX(7) | MMC_CMD_WAIT_RESPONSE)

Definition at line 47 of file MmcHost.h.

◆ MMC_CMD8

#define MMC_CMD8   (MMC_INDX(8) | MMC_CMD_WAIT_RESPONSE)

Definition at line 48 of file MmcHost.h.

◆ MMC_CMD9

#define MMC_CMD9   (MMC_INDX(9) | MMC_CMD_WAIT_RESPONSE | MMC_CMD_LONG_RESPONSE)

Definition at line 49 of file MmcHost.h.

◆ MMC_CMD_LONG_RESPONSE

#define MMC_CMD_LONG_RESPONSE   (1 << 17)

Definition at line 35 of file MmcHost.h.

◆ MMC_CMD_NO_CRC_RESPONSE

#define MMC_CMD_NO_CRC_RESPONSE   (1 << 18)

Definition at line 36 of file MmcHost.h.

◆ MMC_CMD_WAIT_RESPONSE

#define MMC_CMD_WAIT_RESPONSE   (1 << 16)

Definition at line 34 of file MmcHost.h.

◆ MMC_GET_INDX

#define MMC_GET_INDX (   MmcCmd)    ((MmcCmd) & 0xFFFF)

Definition at line 39 of file MmcHost.h.

◆ MMC_HOST_HAS_ISMULTIBLOCK

#define MMC_HOST_HAS_ISMULTIBLOCK (   Host)
Value:
(Host->Revision >= MMC_HOST_PROTOCOL_REVISION &&\
Host->IsMultiBlock != NULL)
#define NULL
Definition: Base.h:319

Definition at line 176 of file MmcHost.h.

◆ MMC_HOST_HAS_SETIOS

#define MMC_HOST_HAS_SETIOS (   Host)
Value:
(Host->Revision >= MMC_HOST_PROTOCOL_REVISION &&\
Host->SetIos != NULL)

Definition at line 174 of file MmcHost.h.

◆ MMC_HOST_PROTOCOL_REVISION

#define MMC_HOST_PROTOCOL_REVISION   0x00010002

Definition at line 172 of file MmcHost.h.

◆ MMC_INDX

#define MMC_INDX (   Index)    ((Index) & 0xFFFF)

Definition at line 38 of file MmcHost.h.

◆ MMC_RESPONSE_TYPE_CID

#define MMC_RESPONSE_TYPE_CID   1

Definition at line 26 of file MmcHost.h.

◆ MMC_RESPONSE_TYPE_CSD

#define MMC_RESPONSE_TYPE_CSD   1

Definition at line 27 of file MmcHost.h.

◆ MMC_RESPONSE_TYPE_OCR

#define MMC_RESPONSE_TYPE_OCR   0

Definition at line 25 of file MmcHost.h.

◆ MMC_RESPONSE_TYPE_R1

#define MMC_RESPONSE_TYPE_R1   0

Definition at line 19 of file MmcHost.h.

◆ MMC_RESPONSE_TYPE_R1b

#define MMC_RESPONSE_TYPE_R1b   0

Definition at line 20 of file MmcHost.h.

◆ MMC_RESPONSE_TYPE_R2

#define MMC_RESPONSE_TYPE_R2   1

Definition at line 21 of file MmcHost.h.

◆ MMC_RESPONSE_TYPE_R3

#define MMC_RESPONSE_TYPE_R3   0

Definition at line 22 of file MmcHost.h.

◆ MMC_RESPONSE_TYPE_R6

#define MMC_RESPONSE_TYPE_R6   0

Definition at line 23 of file MmcHost.h.

◆ MMC_RESPONSE_TYPE_R7

#define MMC_RESPONSE_TYPE_R7   0

Definition at line 24 of file MmcHost.h.

◆ MMC_RESPONSE_TYPE_RCA

#define MMC_RESPONSE_TYPE_RCA   0

Definition at line 28 of file MmcHost.h.

◆ MMC_STATUS_APP_CMD

#define MMC_STATUS_APP_CMD   (1 << 5)

Definition at line 68 of file MmcHost.h.

Typedef Documentation

◆ EFI_MMC_HOST_PROTOCOL

Forward declaration for EFI_MMC_HOST_PROTOCOL

Definition at line 97 of file MmcHost.h.

◆ MMC_BUILDDEVICEPATH

typedef EFI_STATUS(EFIAPI * MMC_BUILDDEVICEPATH) (IN EFI_MMC_HOST_PROTOCOL *This, OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath)

Definition at line 107 of file MmcHost.h.

◆ MMC_CMD

typedef UINT32 MMC_CMD

Definition at line 32 of file MmcHost.h.

◆ MMC_ISCARDPRESENT

typedef BOOLEAN(EFIAPI * MMC_ISCARDPRESENT) (IN EFI_MMC_HOST_PROTOCOL *This)

Definition at line 99 of file MmcHost.h.

◆ MMC_ISMULTIBLOCK

typedef BOOLEAN(EFIAPI * MMC_ISMULTIBLOCK) (IN EFI_MMC_HOST_PROTOCOL *This)

Definition at line 150 of file MmcHost.h.

◆ MMC_ISREADONLY

typedef BOOLEAN(EFIAPI * MMC_ISREADONLY) (IN EFI_MMC_HOST_PROTOCOL *This)

Definition at line 103 of file MmcHost.h.

◆ MMC_NOTIFYSTATE

typedef EFI_STATUS(EFIAPI * MMC_NOTIFYSTATE) (IN EFI_MMC_HOST_PROTOCOL *This, IN MMC_STATE State)

Definition at line 112 of file MmcHost.h.

◆ MMC_READBLOCKDATA

typedef EFI_STATUS(EFIAPI * MMC_READBLOCKDATA) (IN EFI_MMC_HOST_PROTOCOL *This, IN EFI_LBA Lba, IN UINTN Length, OUT UINT32 *Buffer)

Definition at line 129 of file MmcHost.h.

◆ MMC_RECEIVERESPONSE

typedef EFI_STATUS(EFIAPI * MMC_RECEIVERESPONSE) (IN EFI_MMC_HOST_PROTOCOL *This, IN MMC_RESPONSE_TYPE Type, IN UINT32 *Buffer)

Definition at line 123 of file MmcHost.h.

◆ MMC_RESPONSE_TYPE

typedef UINT32 MMC_RESPONSE_TYPE

Definition at line 30 of file MmcHost.h.

◆ MMC_SENDCOMMAND

typedef EFI_STATUS(EFIAPI * MMC_SENDCOMMAND) (IN EFI_MMC_HOST_PROTOCOL *This, IN MMC_CMD Cmd, IN UINT32 Argument)

Definition at line 117 of file MmcHost.h.

◆ MMC_SETIOS

typedef EFI_STATUS(EFIAPI * MMC_SETIOS) (IN EFI_MMC_HOST_PROTOCOL *This, IN UINT32 BusClockFreq, IN UINT32 BusWidth, IN UINT32 TimingMode)

Definition at line 143 of file MmcHost.h.

◆ MMC_WRITEBLOCKDATA

typedef EFI_STATUS(EFIAPI * MMC_WRITEBLOCKDATA) (IN EFI_MMC_HOST_PROTOCOL *This, IN EFI_LBA Lba, IN UINTN Length, IN UINT32 *Buffer)

Definition at line 136 of file MmcHost.h.

Enumeration Type Documentation

◆ _MMC_STATE

enum _MMC_STATE

Definition at line 70 of file MmcHost.h.