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