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