]>
Commit | Line | Data |
---|---|---|
4b1bf81c | 1 | /** @file\r |
2 | Define APIs to retrieve USB Host Controller Info such as controller type and \r | |
3 | I/O Port Base Address.\r | |
4 | \r | |
5 | Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r | |
6 | \r | |
7 | This program and the accompanying materials\r | |
8 | are licensed and made available under the terms and conditions\r | |
9 | of the BSD License which accompanies this distribution. The\r | |
10 | full text of the license may be found at\r | |
11 | http://opensource.org/licenses/bsd-license.php\r | |
12 | \r | |
13 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
14 | WITHOUT 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 | |
32 | typedef 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 | |
52 | /**\r | |
53 | Retrieve USB Host Controller Info such as controller type and I/O Base Address.\r | |
54 | \r | |
55 | @param[in] PeiServices The pointer to the PEI Services Table.\r | |
56 | @param[in] This The pointer to this instance of the PEI_USB_CONTROLLER_PPI.\r | |
57 | @param[in] ControllerId The ID of the USB controller.\r | |
58 | @param[out] ControllerType On output, returns the type of the USB controller.\r | |
59 | @param[out] BaseAddress On output, returns the base address of UHCI's I/O ports\r | |
60 | if UHCI is enabled or the base address of EHCI's MMIO \r | |
61 | if EHCI is enabled.\r | |
62 | \r | |
63 | @retval EFI_SUCCESS USB controller attributes were returned successfully.\r | |
64 | @retval EFI_INVALID_PARAMETER ControllerId is greater than the maximum number \r | |
65 | of USB controller supported by this platform.\r | |
66 | \r | |
67 | **/\r | |
68 | typedef\r | |
69 | EFI_STATUS\r | |
70 | (EFIAPI *PEI_GET_USB_CONTROLLER)(\r | |
71 | IN EFI_PEI_SERVICES **PeiServices,\r | |
72 | IN PEI_USB_CONTROLLER_PPI *This,\r | |
73 | IN UINT8 UsbControllerId,\r | |
74 | OUT UINTN *ControllerType,\r | |
75 | OUT UINTN *BaseAddress\r | |
76 | );\r | |
77 | \r | |
78 | ///\r | |
79 | /// This PPI contains a single service to retrieve the USB Host Controller type\r | |
80 | /// and the base address of the I/O ports used to access the USB Host Controller.\r | |
81 | ///\r | |
82 | struct _PEI_USB_CONTROLLER_PPI {\r | |
83 | PEI_GET_USB_CONTROLLER GetUsbController;\r | |
84 | };\r | |
85 | \r | |
86 | extern EFI_GUID gPeiUsbControllerPpiGuid;\r | |
87 | \r | |
88 | #endif\r |