2 Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>
3 SPDX-License-Identifier: BSD-2-Clause-Patent
7 #ifndef _UFS_PCI_HOST_CONTROLLER_PEI_H_
8 #define _UFS_PCI_HOST_CONTROLLER_PEI_H_
12 #include <Ppi/MasterBootMode.h>
13 #include <Ppi/UfsHostController.h>
15 #include <IndustryStandard/Pci.h>
17 #include <Library/DebugLib.h>
18 #include <Library/BaseLib.h>
19 #include <Library/BaseMemoryLib.h>
20 #include <Library/PciLib.h>
21 #include <Library/PeiServicesLib.h>
22 #include <Library/MemoryAllocationLib.h>
24 #define UFS_HC_PEI_SIGNATURE SIGNATURE_32 ('U', 'F', 'S', 'P')
29 EDKII_UFS_HOST_CONTROLLER_PPI UfsHostControllerPpi
;
30 EFI_PEI_PPI_DESCRIPTOR PpiList
;
32 UINTN UfsHcPciAddr
[MAX_UFS_HCS
];
33 } UFS_HC_PEI_PRIVATE_DATA
;
35 #define UFS_HC_PEI_PRIVATE_DATA_FROM_THIS(a) CR (a, UFS_HC_PEI_PRIVATE_DATA, UfsHostControllerPpi, UFS_HC_PEI_SIGNATURE)
38 Get the MMIO base address of UFS host controller.
40 @param[in] This The protocol instance pointer.
41 @param[in] ControllerId The ID of the UFS host controller.
42 @param[out] MmioBar Pointer to the UFS host controller MMIO base address.
44 @retval EFI_SUCCESS The operation succeeds.
45 @retval EFI_INVALID_PARAMETER The parameters are invalid.
51 IN EDKII_UFS_HOST_CONTROLLER_PPI
*This
,
52 IN UINT8 ControllerId
,