TianoCore EDK2 master
Loading...
Searching...
No Matches
UfsPciHcDxe.h
Go to the documentation of this file.
1
10#ifndef _EFI_UFS_HOST_CONTROLLER_H_
11#define _EFI_UFS_HOST_CONTROLLER_H_
12
13#include <Uefi.h>
14
17
22#include <Protocol/DevicePath.h>
23#include <Protocol/PciIo.h>
25
26#include <Library/BaseLib.h>
27#include <Library/DebugLib.h>
28#include <Library/UefiLib.h>
32
33extern EFI_DRIVER_BINDING_PROTOCOL gUfsHcDriverBinding;
34extern EFI_COMPONENT_NAME_PROTOCOL gUfsHcComponentName;
35extern EFI_COMPONENT_NAME2_PROTOCOL gUfsHcComponentName2;
36
37//
38// Unique signature for private data structure.
39//
40#define UFS_HC_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('U','F','S','H')
41
43
44//
45// Ufs host controller private data structure.
46//
48 UINT32 Signature;
49
52 UINT8 BarIndex;
53 UINT64 PciAttributes;
54};
55
56#define UFS_HOST_CONTROLLER_PRIVATE_DATA_FROM_UFSHC(a) \
57 CR (a, \
58 UFS_HOST_CONTROLLER_PRIVATE_DATA, \
59 UfsHc, \
60 UFS_HC_PRIVATE_DATA_SIGNATURE \
61 )
62
103EFIAPI
106 IN CHAR8 *Language,
107 OUT CHAR16 **DriverName
108 );
109
179EFIAPI
182 IN EFI_HANDLE ControllerHandle,
183 IN EFI_HANDLE ChildHandle OPTIONAL,
184 IN CHAR8 *Language,
185 OUT CHAR16 **ControllerName
186 );
187
231EFIAPI
234 IN EFI_HANDLE Controller,
235 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
236 );
237
274EFIAPI
277 IN EFI_HANDLE Controller,
278 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
279 );
280
308EFIAPI
311 IN EFI_HANDLE Controller,
312 IN UINTN NumberOfChildren,
313 IN EFI_HANDLE *ChildHandleBuffer
314 );
315
326EFIAPI
329 OUT UINTN *MmioBar
330 );
331
352EFIAPI
353UfsHcMap (
356 IN VOID *HostAddress,
357 IN OUT UINTN *NumberOfBytes,
358 OUT EFI_PHYSICAL_ADDRESS *DeviceAddress,
359 OUT VOID **Mapping
360 );
361
373EFIAPI
376 IN VOID *Mapping
377 );
378
400EFIAPI
404 IN EFI_MEMORY_TYPE MemoryType,
405 IN UINTN Pages,
406 OUT VOID **HostAddress,
407 IN UINT64 Attributes
408 );
409
423EFIAPI
426 IN UINTN Pages,
427 IN VOID *HostAddress
428 );
429
442EFIAPI
445 );
446
466EFIAPI
469 IN EDKII_UFS_HOST_CONTROLLER_PROTOCOL_WIDTH Width,
470 IN UINT64 Offset,
471 IN UINTN Count,
472 IN OUT VOID *Buffer
473 );
474
494EFIAPI
497 IN EDKII_UFS_HOST_CONTROLLER_PROTOCOL_WIDTH Width,
498 IN UINT64 Offset,
499 IN UINTN Count,
500 IN OUT VOID *Buffer
501 );
502
503#endif
UINT64 UINTN
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
EDKII_UFS_HOST_CONTROLLER_OPERATION
UINT64 EFI_PHYSICAL_ADDRESS
Definition: UefiBaseType.h:50
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33
EFI_MEMORY_TYPE
EFI_ALLOCATE_TYPE
Definition: UefiSpec.h:29
EFI_STATUS EFIAPI UfsHcFlush(IN EDKII_UFS_HOST_CONTROLLER_PROTOCOL *This)
Definition: UfsPciHcDxe.c:263
EFI_STATUS EFIAPI UfsHcComponentNameGetControllerName(IN EFI_COMPONENT_NAME_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_HANDLE ChildHandle OPTIONAL, IN CHAR8 *Language, OUT CHAR16 **ControllerName)
EFI_STATUS EFIAPI UfsHcMmioRead(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)
Definition: UfsPciHcDxe.c:298
EFI_STATUS EFIAPI UfsHcMmioWrite(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)
Definition: UfsPciHcDxe.c:340
EFI_STATUS EFIAPI UfsHcGetMmioBar(IN EDKII_UFS_HOST_CONTROLLER_PROTOCOL *This, OUT UINTN *MmioBar)
Definition: UfsPciHcDxe.c:55
EFI_STATUS EFIAPI UfsHcDriverBindingStop(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer)
Definition: UfsPciHcDxe.c:721
EFI_STATUS EFIAPI UfsHcComponentNameGetDriverName(IN EFI_COMPONENT_NAME_PROTOCOL *This, IN CHAR8 *Language, OUT CHAR16 **DriverName)
Definition: ComponentName.c:93
EFI_STATUS EFIAPI UfsHcDriverBindingStart(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
Definition: UfsPciHcDxe.c:551
EFI_STATUS EFIAPI UfsHcAllocateBuffer(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)
Definition: UfsPciHcDxe.c:191
EFI_STATUS EFIAPI UfsHcMap(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)
Definition: UfsPciHcDxe.c:113
EFI_STATUS EFIAPI UfsHcUnmap(IN EDKII_UFS_HOST_CONTROLLER_PROTOCOL *This, IN VOID *Mapping)
Definition: UfsPciHcDxe.c:149
EFI_STATUS EFIAPI UfsHcDriverBindingSupported(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
Definition: UfsPciHcDxe.c:406
EFI_STATUS EFIAPI UfsHcFreeBuffer(IN EDKII_UFS_HOST_CONTROLLER_PROTOCOL *This, IN UINTN Pages, IN VOID *HostAddress)
Definition: UfsPciHcDxe.c:229