2 Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>
3 This program and the accompanying materials
4 are licensed and made available under the terms and conditions of the BSD License
5 which accompanies this distribution. The full text of the license may be found at
6 http://opensource.org/licenses/bsd-license.php.
8 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
9 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13 #ifndef _UFS_PCI_HOST_CONTROLLER_PEI_H_
14 #define _UFS_PCI_HOST_CONTROLLER_PEI_H_
18 #include <Ppi/MasterBootMode.h>
19 #include <Ppi/UfsHostController.h>
21 #include <IndustryStandard/Pci.h>
23 #include <Library/DebugLib.h>
24 #include <Library/BaseLib.h>
25 #include <Library/BaseMemoryLib.h>
26 #include <Library/PciLib.h>
27 #include <Library/PeiServicesLib.h>
28 #include <Library/MemoryAllocationLib.h>
30 #define UFS_HC_PEI_SIGNATURE SIGNATURE_32 ('U', 'F', 'S', 'P')
35 EDKII_UFS_HOST_CONTROLLER_PPI UfsHostControllerPpi
;
36 EFI_PEI_PPI_DESCRIPTOR PpiList
;
38 UINTN UfsHcPciAddr
[MAX_UFS_HCS
];
39 } UFS_HC_PEI_PRIVATE_DATA
;
41 #define UFS_HC_PEI_PRIVATE_DATA_FROM_THIS(a) CR (a, UFS_HC_PEI_PRIVATE_DATA, UfsHostControllerPpi, UFS_HC_PEI_SIGNATURE)
44 Get the MMIO base address of UFS host controller.
46 @param[in] This The protocol instance pointer.
47 @param[in] ControllerId The ID of the UFS host controller.
48 @param[out] MmioBar Pointer to the UFS host controller MMIO base address.
50 @retval EFI_SUCCESS The operation succeeds.
51 @retval EFI_INVALID_PARAMETER The parameters are invalid.
57 IN EDKII_UFS_HOST_CONTROLLER_PPI
*This
,
58 IN UINT8 ControllerId
,