Add some comments for translator parameter
[mirror_edk2.git] / MdePkg / Include / Protocol / Usb2HostController.h
CommitLineData
878ddf1f 1/** @file\r
2 EFI_USB2_HC_PROTOCOL as defined in UEFI 2.0.\r
3\r
4 Copyright (c) 2006, Intel Corporation \r
5 All rights reserved. This program and the accompanying materials \r
6 are licensed and made available under the terms and conditions of the BSD License \r
7 which accompanies this distribution. The full text of the license may be found at \r
8 http://opensource.org/licenses/bsd-license.php \r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
12\r
13 Module Name: Usb2HostController.h\r
14\r
15**/\r
16\r
17#ifndef _USB2_HOSTCONTROLLER_H_\r
18#define _USB2_HOSTCONTROLLER_H_\r
19\r
20#define EFI_USB2_HC_PROTOCOL_GUID \\r
21 { \\r
22 0x3e745226, 0x9818, 0x45b6, {0xa2, 0xac, 0xd7, 0xcd, 0xe, 0x8b, 0xa2, 0xbc } \\r
23 }\r
24\r
25//\r
26// Forward reference for pure ANSI compatability\r
27//\r
28typedef struct _EFI_USB2_HC_PROTOCOL EFI_USB2_HC_PROTOCOL;\r
29\r
30#define EFI_USB_SPEED_FULL 0x0000 // 12 Mb/s, USB 1.1 OHCI and UHCI HC.\r
31#define EFI_USB_SPEED_LOW 0x0001 // 1 Mb/s, USB 1.1 OHCI and UHCI HC.\r
32#define EFI_USB_SPEED_HIGH 0x0002 // 480 Mb/s, USB 2.0 EHCI HC.\r
33\r
34typedef struct {\r
35 UINT8 TranslatorHubAddress;\r
36 UINT8 TranslatorPortNumber;\r
37} EFI_USB2_HC_TRANSACTION_TRANSLATOR;\r
38\r
39//\r
40// Protocol definitions\r
41//\r
42\r
43/**\r
44 Retrieves the Host Controller capabilities.\r
45\r
46 @param This A pointer to the EFI_USB2_HC_PROTOCOL instance.\r
47 @param MaxSpeed Host controller data transfer speed.\r
48 @param PortNumber Number of the root hub ports.\r
49 @param Is64BitCapable TRUE if controller supports 64-bit memory addressing,\r
50 FALSE otherwise.\r
51\r
52 @retval EFI_SUCCESS The host controller capabilities were retrieved successfully.\r
53 @retval EFI_INVALID_PARAMETER One of the input args was NULL.\r
54 @retval EFI_DEVICE_ERROR An error was encountered while attempting to\r
55 retrieve the capabilities.\r
56\r
57**/\r
58typedef\r
59EFI_STATUS\r
60(EFIAPI *EFI_USB2_HC_PROTOCOL_GET_CAPABILITY) (\r
61 IN EFI_USB2_HC_PROTOCOL *This,\r
62 OUT UINT8 *MaxSpeed,\r
63 OUT UINT8 *PortNumber,\r
64 OUT UINT8 *Is64BitCapable\r
65 )\r
66;\r
67\r
68/**\r
69 Provides software reset for the USB host controller.\r
70\r
71 @param This A pointer to the EFI_USB2_HC_PROTOCOL instance.\r
72 @param Attributes A bit mask of the reset operation to perform.\r
73\r
74 @retval EFI_SUCCESS The reset operation succeeded.\r
75 @retval EFI_INVALID_PARAMETER Attributes is not valid.\r
76 @retval EFI_UNSUPPORTED The type of reset specified by Attributes is not currently\r
77 supported by the host controller hardware.\r
78 @retval EFI_ACCESS_DENIED Reset operation is rejected due to the debug port being configured\r
79 and active; only EFI_USB_HC_RESET_GLOBAL_WITH_DEBUG or\r
80 EFI_USB_HC_RESET_HOST_WITH_DEBUG reset Attributes can be used to\r
81 perform reset operation for this host controller.\r
82 @retval EFI_DEVICE_ERROR An error was encountered while attempting to\r
83 retrieve the capabilities.\r
84\r
85**/\r
86typedef\r
87EFI_STATUS\r
88(EFIAPI *EFI_USB2_HC_PROTOCOL_RESET) (\r
89 IN EFI_USB2_HC_PROTOCOL *This,\r
90 IN UINT16 Attributes\r
91 )\r
92;\r
93\r
94/**\r
95 Retrieves current state of the USB host controller.\r
96\r
97 @param This A pointer to the EFI_USB2_HC_PROTOCOL instance.\r
98 @param State A pointer to the EFI_USB_HC_STATE data structure that\r
99 indicates current state of the USB host controller.\r
100\r
101 @retval EFI_SUCCESS The state information of the host controller was returned in State.\r
102 @retval EFI_INVALID_PARAMETER State is NULL.\r
103 @retval EFI_DEVICE_ERROR An error was encountered while attempting to retrieve the\r
104