3 Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
9 Define APIs to retrieve USB Host Controller Info such as controller type and
10 I/O Port Base Address.
15 #ifndef _PEI_USB_CONTROLLER_PPI_H_
16 #define _PEI_USB_CONTROLLER_PPI_H_
19 // Global ID for the PEI_USB_CONTROLLER_PPI.
21 #define PEI_USB_CONTROLLER_PPI_GUID \
23 0x3bc1f6de, 0x693e, 0x4547,{ 0xa3, 0x0, 0x21, 0x82, 0x3c, 0xa4, 0x20, 0xb2} \
27 // Forward declaration for the PEI_USB_CONTROLLER_PPI.
29 typedef struct _PEI_USB_CONTROLLER_PPI PEI_USB_CONTROLLER_PPI
;
32 // This bit is used in the ControllerType return parameter of GetUsbController()
33 // to identify the USB Host Controller type as UHCI
35 #define PEI_UHCI_CONTROLLER 0x01
38 // This bit is used in the ControllerType return parameter of GetUsbController()
39 // to identify the USB Host Controller type as OHCI
41 #define PEI_OHCI_CONTROLLER 0x02
44 // This bit is used in the ControllerType return parameter of GetUsbController()
45 // to identify the USB Host Controller type as EHCI
47 #define PEI_EHCI_CONTROLLER 0x03
50 Retrieve USB Host Controller Info such as controller type and I/O Base Address.
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
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.
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
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.
79 struct _PEI_USB_CONTROLLER_PPI
{
80 PEI_GET_USB_CONTROLLER GetUsbController
;
83 extern EFI_GUID gPeiUsbControllerPpiGuid
;