]> git.proxmox.com Git - mirror_edk2.git/blame - Vlv2TbltDevicePkg/Include/Ppi/UsbController.h
ArmPkg/CompilerIntrinsicsLib: Add uread, uwrite GCC assembly sources
[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
9dc8036d
MK
5 SPDX-License-Identifier: BSD-2-Clause-Patent\r
6\r
3cbfba02
DW
7 \r\r
8\r
9 Define APIs to retrieve USB Host Controller Info such as controller type and\r
10 I/O Port Base Address.\r
11\r
12\r
13**/\r
14\r
15#ifndef _PEI_USB_CONTROLLER_PPI_H_\r
16#define _PEI_USB_CONTROLLER_PPI_H_\r
17\r
18//\r
19// Global ID for the PEI_USB_CONTROLLER_PPI.\r
20//\r
21#define PEI_USB_CONTROLLER_PPI_GUID \\r
22 { \\r
23 0x3bc1f6de, 0x693e, 0x4547,{ 0xa3, 0x0, 0x21, 0x82, 0x3c, 0xa4, 0x20, 0xb2} \\r
24 }\r
25\r
26//\r
27// Forward declaration for the PEI_USB_CONTROLLER_PPI.\r
28//\r
29typedef struct _PEI_USB_CONTROLLER_PPI PEI_USB_CONTROLLER_PPI;\r
30\r
31//\r
32// This bit is used in the ControllerType return parameter of GetUsbController()\r
33// to identify the USB Host Controller type as UHCI\r
34//\r
35#define PEI_UHCI_CONTROLLER 0x01\r
36\r
37//\r
38// This bit is used in the ControllerType return parameter of GetUsbController()\r
39// to identify the USB Host Controller type as OHCI\r
40//\r
41#define PEI_OHCI_CONTROLLER 0x02\r
42\r
43//\r
44// This bit is used in the ControllerType return parameter of GetUsbController()\r
45// to identify the USB Host Controller type as EHCI\r
46//\r
47#define PEI_EHCI_CONTROLLER 0x03\r
48\r
49/**\r
50 Retrieve USB Host Controller Info such as controller type and I/O Base Address.\r
51\r
52 @param[in] PeiServices The pointer to the PEI Services Table.\r
53 @param[in] This The pointer to this instance of the PEI_USB_CONTROLLER_PPI.\r
54 @param[in] ControllerId The ID of the USB controller.\r
55 @param[out] ControllerType On output, returns the type of the USB controller.\r
56 @param[out] BaseAddress On output, returns the base address of UHCI's I/O ports\r
57 if UHCI is enabled or the base address of EHCI's MMIO\r
58 if EHCI is enabled.\r
59\r
60 @retval EFI_SUCCESS USB controller attributes were returned successfully.\r
61 @retval EFI_INVALID_PARAMETER ControllerId is greater than the maximum number\r
62 of USB controller supported by this platform.\r
63\r
64**/\r
65typedef\r
66EFI_STATUS\r
67(EFIAPI *PEI_GET_USB_CONTROLLER)(\r
68 IN EFI_PEI_SERVICES **PeiServices,\r
69 IN PEI_USB_CONTROLLER_PPI *This,\r
70 IN UINT8 UsbControllerId,\r
71 OUT UINTN *ControllerType,\r
72 OUT UINTN *BaseAddress\r
73 );\r
74\r
75//\r
76// This PPI contains a single service to retrieve the USB Host Controller type\r
77// and the base address of the I/O ports used to access the USB Host Controller.\r
78//\r
79struct _PEI_USB_CONTROLLER_PPI {\r
80 PEI_GET_USB_CONTROLLER GetUsbController;\r
81};\r
82\r
83extern EFI_GUID gPeiUsbControllerPpiGuid;\r
84\r
85#endif\r