]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Include/Ppi/UsbController.h
MdeModulePkg/S3SmmInitDone.h: Fix copyright coding style error.
[mirror_edk2.git] / MdeModulePkg / Include / Ppi / UsbController.h
CommitLineData
4b1bf81c 1/** @file\r
d1102dba 2 Define APIs to retrieve USB Host Controller Info such as controller type and\r
4b1bf81c 3 I/O Port Base Address.\r
4\r
d1102dba 5Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
4b1bf81c 6\r
7This program and the accompanying materials\r
8are licensed and made available under the terms and conditions\r
9of the BSD License which accompanies this distribution. The\r
10full text of the license may be found at\r
11http://opensource.org/licenses/bsd-license.php\r
12\r
13THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
14WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
15\r
16**/\r
17\r
18#ifndef _PEI_USB_CONTROLLER_PPI_H_\r
19#define _PEI_USB_CONTROLLER_PPI_H_\r
20\r
21///\r
22/// Global ID for the PEI_USB_CONTROLLER_PPI.\r
23///\r
24#define PEI_USB_CONTROLLER_PPI_GUID \\r
25 { \\r
26 0x3bc1f6de, 0x693e, 0x4547,{ 0xa3, 0x0, 0x21, 0x82, 0x3c, 0xa4, 0x20, 0xb2} \\r
27 }\r
28\r
29///\r
30/// Forward declaration for the PEI_USB_CONTROLLER_PPI.\r
31///\r
32typedef struct _PEI_USB_CONTROLLER_PPI PEI_USB_CONTROLLER_PPI;\r
33\r
34///\r
35/// This bit is used in the ControllerType return parameter of GetUsbController()\r
36/// to identify the USB Host Controller type as UHCI\r
37///\r
38#define PEI_UHCI_CONTROLLER 0x01\r
39\r
40///\r
41/// This bit is used in the ControllerType return parameter of GetUsbController()\r
42/// to identify the USB Host Controller type as OHCI\r
43///\r
44#define PEI_OHCI_CONTROLLER 0x02\r
45\r
46///\r
47/// This bit is used in the ControllerType return parameter of GetUsbController()\r
48/// to identify the USB Host Controller type as EHCI\r
49///\r
50#define PEI_EHCI_CONTROLLER 0x03\r
51\r
d987459f
SZ
52///\r
53/// This bit is used in the ControllerType return parameter of GetUsbController()\r
54/// to identify the USB Host Controller type as XHCI\r
55///\r
56#define PEI_XHCI_CONTROLLER 0x04\r
57\r
4b1bf81c 58/**\r
59 Retrieve USB Host Controller Info such as controller type and I/O Base Address.\r
60\r
61 @param[in] PeiServices The pointer to the PEI Services Table.\r
62 @param[in] This The pointer to this instance of the PEI_USB_CONTROLLER_PPI.\r
63 @param[in] ControllerId The ID of the USB controller.\r
64 @param[out] ControllerType On output, returns the type of the USB controller.\r
65 @param[out] BaseAddress On output, returns the base address of UHCI's I/O ports\r
d1102dba 66 if UHCI is enabled or the base address of EHCI's MMIO\r
4b1bf81c 67 if EHCI is enabled.\r
68\r
69 @retval EFI_SUCCESS USB controller attributes were returned successfully.\r
d1102dba 70 @retval EFI_INVALID_PARAMETER ControllerId is greater than the maximum number\r
4b1bf81c 71 of USB controller supported by this platform.\r
72\r
73**/\r
74typedef\r
75EFI_STATUS\r
76(EFIAPI *PEI_GET_USB_CONTROLLER)(\r
77 IN EFI_PEI_SERVICES **PeiServices,\r
78 IN PEI_USB_CONTROLLER_PPI *This,\r
79 IN UINT8 UsbControllerId,\r
80 OUT UINTN *ControllerType,\r
81 OUT UINTN *BaseAddress\r
82 );\r
83\r
84///\r
85/// This PPI contains a single service to retrieve the USB Host Controller type\r
86/// and the base address of the I/O ports used to access the USB Host Controller.\r
87///\r
88struct _PEI_USB_CONTROLLER_PPI {\r
89 PEI_GET_USB_CONTROLLER GetUsbController;\r
90};\r
91\r
92extern EFI_GUID gPeiUsbControllerPpiGuid;\r
93\r
94#endif\r