TianoCore EDK2 master
Loading...
Searching...
No Matches
UfsHostController.h
Go to the documentation of this file.
1
10#ifndef __EDKII_UFS_HC_PROTOCOL_H__
11#define __EDKII_UFS_HC_PROTOCOL_H__
12
13//
14// UFS Host Controller Protocol GUID value
15//
16#define EDKII_UFS_HOST_CONTROLLER_PROTOCOL_GUID \
17 { \
18 0xebc01af5, 0x7a9, 0x489e, { 0xb7, 0xce, 0xdc, 0x8, 0x9e, 0x45, 0x9b, 0x2f } \
19 }
20
21//
22// Forward reference for pure ANSI compatability
23//
25
36typedef
40 OUT UINTN *MmioBar
41 );
42
48typedef enum {
62 EdkiiUfsHcOperationMaximum
64
84typedef
86(EFIAPI *EDKII_UFS_HC_MAP)(
89 IN VOID *HostAddress,
90 IN OUT UINTN *NumberOfBytes,
91 OUT EFI_PHYSICAL_ADDRESS *DeviceAddress,
92 OUT VOID **Mapping
93 );
94
105typedef
107(EFIAPI *EDKII_UFS_HC_UNMAP)(
109 IN VOID *Mapping
110 );
111
132typedef
137 IN EFI_MEMORY_TYPE MemoryType,
138 IN UINTN Pages,
139 OUT VOID **HostAddress,
140 IN UINT64 Attributes
141 );
142
155typedef
159 IN UINTN Pages,
160 IN VOID *HostAddress
161 );
162
174typedef
176(EFIAPI *EDKII_UFS_HC_FLUSH)(
178 );
179
180typedef enum {
181 EfiUfsHcWidthUint8 = 0,
182 EfiUfsHcWidthUint16,
183 EfiUfsHcWidthUint32,
184 EfiUfsHcWidthUint64,
185 EfiUfsHcWidthMaximum
186} EDKII_UFS_HOST_CONTROLLER_PROTOCOL_WIDTH;
187
206typedef
210 IN EDKII_UFS_HOST_CONTROLLER_PROTOCOL_WIDTH Width,
211 IN UINT64 Offset,
212 IN UINTN Count,
213 IN OUT VOID *Buffer
214 );
215
220 EDKII_UFS_HC_GET_MMIO_BAR GetUfsHcMmioBar;
221 EDKII_UFS_HC_ALLOCATE_BUFFER AllocateBuffer;
222 EDKII_UFS_HC_FREE_BUFFER FreeBuffer;
224 EDKII_UFS_HC_UNMAP Unmap;
225 EDKII_UFS_HC_FLUSH Flush;
228};
229
234
235#endif
UINT64 UINTN
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
EFI_STATUS(EFIAPI * EDKII_UFS_HC_GET_MMIO_BAR)(IN EDKII_UFS_HOST_CONTROLLER_PPI *This, IN UINT8 ControllerId, OUT UINTN *MmioBar)
EFI_STATUS(EFIAPI * EDKII_UFS_HC_MMIO_READ_WRITE)(IN EDKII_UFS_HOST_CONTROLLER_PROTOCOL *This, IN EDKII_UFS_HOST_CONTROLLER_PROTOCOL_WIDTH Width, IN UINT64 Offset, IN UINTN Count, IN OUT VOID *Buffer)
EFI_STATUS(EFIAPI * EDKII_UFS_HC_MAP)(IN EDKII_UFS_HOST_CONTROLLER_PROTOCOL *This, IN EDKII_UFS_HOST_CONTROLLER_OPERATION Operation, IN VOID *HostAddress, IN OUT UINTN *NumberOfBytes, OUT EFI_PHYSICAL_ADDRESS *DeviceAddress, OUT VOID **Mapping)
EFI_GUID gEdkiiUfsHostControllerProtocolGuid
EDKII_UFS_HOST_CONTROLLER_OPERATION
@ EdkiiUfsHcOperationBusMasterWrite
@ EdkiiUfsHcOperationBusMasterRead
@ EdkiiUfsHcOperationBusMasterCommonBuffer
EFI_STATUS(EFIAPI * EDKII_UFS_HC_GET_MMIO_BAR)(IN EDKII_UFS_HOST_CONTROLLER_PROTOCOL *This, OUT UINTN *MmioBar)
EFI_STATUS(EFIAPI * EDKII_UFS_HC_UNMAP)(IN EDKII_UFS_HOST_CONTROLLER_PROTOCOL *This, IN VOID *Mapping)
EFI_STATUS(EFIAPI * EDKII_UFS_HC_FREE_BUFFER)(IN EDKII_UFS_HOST_CONTROLLER_PROTOCOL *This, IN UINTN Pages, IN VOID *HostAddress)
EFI_STATUS(EFIAPI * EDKII_UFS_HC_FLUSH)(IN EDKII_UFS_HOST_CONTROLLER_PROTOCOL *This)
EFI_STATUS(EFIAPI * EDKII_UFS_HC_ALLOCATE_BUFFER)(IN EDKII_UFS_HOST_CONTROLLER_PROTOCOL *This, IN EFI_ALLOCATE_TYPE Type, IN EFI_MEMORY_TYPE MemoryType, IN UINTN Pages, OUT VOID **HostAddress, IN UINT64 Attributes)
UINT64 EFI_PHYSICAL_ADDRESS
Definition: UefiBaseType.h:50
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
EFI_MEMORY_TYPE
EFI_ALLOCATE_TYPE
Definition: UefiSpec.h:29
Definition: Base.h:213