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