]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>\r | |
3 | This program and the accompanying materials\r | |
4 | are licensed and made available under the terms and conditions of the BSD License\r | |
5 | which accompanies this distribution. The full text of the license may be found at\r | |
6 | http://opensource.org/licenses/bsd-license.php.\r | |
7 | \r | |
8 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
9 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
10 | \r | |
11 | **/\r | |
12 | \r | |
13 | #ifndef _UFS_PCI_HOST_CONTROLLER_PEI_H_\r | |
14 | #define _UFS_PCI_HOST_CONTROLLER_PEI_H_\r | |
15 | \r | |
16 | #include <PiPei.h>\r | |
17 | \r | |
18 | #include <Ppi/MasterBootMode.h>\r | |
19 | #include <Ppi/UfsHostController.h>\r | |
20 | \r | |
21 | #include <IndustryStandard/Pci.h>\r | |
22 | \r | |
23 | #include <Library/DebugLib.h>\r | |
24 | #include <Library/BaseLib.h>\r | |
25 | #include <Library/BaseMemoryLib.h>\r | |
26 | #include <Library/PciLib.h>\r | |
27 | #include <Library/PeiServicesLib.h>\r | |
28 | #include <Library/MemoryAllocationLib.h>\r | |
29 | \r | |
30 | #define UFS_HC_PEI_SIGNATURE SIGNATURE_32 ('U', 'F', 'S', 'P')\r | |
31 | #define MAX_UFS_HCS 8\r | |
32 | \r | |
33 | typedef struct {\r | |
34 | UINTN Signature;\r | |
35 | EDKII_UFS_HOST_CONTROLLER_PPI UfsHostControllerPpi;\r | |
36 | EFI_PEI_PPI_DESCRIPTOR PpiList;\r | |
37 | UINTN TotalUfsHcs;\r | |
38 | UINTN UfsHcPciAddr[MAX_UFS_HCS];\r | |
39 | } UFS_HC_PEI_PRIVATE_DATA;\r | |
40 | \r | |
41 | #define UFS_HC_PEI_PRIVATE_DATA_FROM_THIS(a) CR (a, UFS_HC_PEI_PRIVATE_DATA, UfsHostControllerPpi, UFS_HC_PEI_SIGNATURE)\r | |
42 | \r | |
43 | /**\r | |
44 | Get the MMIO base address of UFS host controller.\r | |
45 | \r | |
46 | @param[in] This The protocol instance pointer.\r | |
47 | @param[in] ControllerId The ID of the UFS host controller.\r | |
48 | @param[out] MmioBar Pointer to the UFS host controller MMIO base address.\r | |
49 | \r | |
50 | @retval EFI_SUCCESS The operation succeeds.\r | |
51 | @retval EFI_INVALID_PARAMETER The parameters are invalid.\r | |
52 | \r | |
53 | **/\r | |
54 | EFI_STATUS\r | |
55 | EFIAPI\r | |
56 | GetUfsHcMmioBar (\r | |
57 | IN EDKII_UFS_HOST_CONTROLLER_PPI *This,\r | |
58 | IN UINT8 ControllerId,\r | |
59 | OUT UINTN *MmioBar\r | |
60 | );\r | |
61 | \r | |
62 | #endif\r |