summaryrefslogtreecommitdiff
path: root/Include/PPI/UsbHostController.h
blob: e8fdb0a3b6a66e621f3f9a2ff52568ae20b93ae6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
//**********************************************************************
//**********************************************************************
//**                                                                  **
//**        (C)Copyright 1985-2006, American Megatrends, Inc.         **
//**                                                                  **
//**                       All Rights Reserved.                       **
//**                                                                  **
//**         5555 Oakbrook Pkwy, Suite 200, Norcross, GA 30093        **
//**                                                                  **
//**                       Phone: (770)-246-8600                      **
//**                                                                  **
//**********************************************************************
//**********************************************************************
//**********************************************************************
//
// $Header: /Alaska/SOURCE/Modules/USBRecovery/UhcPeimSrc/UsbHostController.h 8     1/18/11 1:04a Ryanchou $
//
// $Revision: 8 $
//
// $Date: 1/18/11 1:04a $
//
//**********************************************************************
// Revision History
// ----------------
// $Log: /Alaska/SOURCE/Modules/USBRecovery/UhcPeimSrc/UsbHostController.h $
// 
// 8     1/18/11 1:04a Ryanchou
// [TAG]  		EIP47931
// [Category]  	Improvement
// [Description]  	Added USB 3.0 hub support.
// [Files]  		EhciPei.c, EhciPei.h, HubPeim.c, HubPeim.h, OhciPei.c,
// OhciPei.h, UhcPeim.c, UhcPeim.h, usb.h, UsbHostController.h,
// UsbIoPeim.c, UsbPeim.c, UsbPeim.h, XhciPei.c, XhciPei.h
// 
// 7     10/22/10 2:56a Rameshr
// [TAG]- EIP 43687
// [Category]-IMPROVEMENT
// [Description]- Build warning from UsbRecovery driver -
// UsbHostController.obj : warning LNK4221: no public symbols found;
// archive member will be inaccessible. 
// [Files]- uhcpeim.c, usbpeim.c, UsbHostcontroller.h
// 
// 6     10/12/10 11:19a Olegi
// XHCI support added.
// 
// 5     4/26/10 4:17p Krishnakumarg
// DebugRx causes the system to hang in Recovery mode EIP#34401
// 
// 4     3/17/09 5:08p Olegi
// Added TransactionTranslator for slow/full speed devices behind USB2
// hub.
// 
// 3     3/03/09 7:27p Olegi
// MaximumPacketLength changed from UINT8 to UINT16.
// 
// 2     7/10/08 6:37p Michaela
// Updated to support OHCI controllers
//
// 1     9/22/06 12:21p Sivagarn
//
//*****************************************************************************

//<AMI_FHDR_START>
//----------------------------------------------------------------------------
//
// Name:        UsbHostController.h
//
// Description: This file belongs to "Framework".
//              This file is modified by AMI to include copyright message,
//              appropriate header and integration code.
//
//----------------------------------------------------------------------------
//<AMI_FHDR_END>

//
// This file contains 'Framework Code' and is licensed as such
// under the terms of your license agreement with Intel or your
// vendor.  This file may not be modified, except as allowed by
// additional terms of your license agreement.
//

/*++

   Copyright (c)  1999 - 2002 Intel Corporation. All rights reserved
   This software and associated documentation (if any) is furnished
   under a license and may only be used or copied in accordance
   with the terms of the license. Except as permitted by such
   license, no part of this software or documentation may be
   reproduced, stored in a retrieval system, or transmitted in any
   form or by any means without the express written consent of
   Intel Corporation.


   Module Name:

   UsbHostController.h

   Abstract:

   Usb Host Controller PPI as defined in EFI 2.0

   This code abstracts the PEI core to provide Usb Host Contrller
   access services.

   --*/

#ifndef _PEI_USB_HOST_CONTROLLER_PPI_H_
#define _PEI_USB_HOST_CONTROLLER_PPI_H_

#include "core\em\usbrecovery\usb.h"

#define PEI_USB_HOST_CONTROLLER_PPI_GUID  {\
        0x652b38a9, 0x77f4, 0x453f, 0x89, 0xd5, 0xe7, \
        0xbd, 0xc3, 0x52, 0xfc, 0x53}

GUID_VARIABLE_DECLARATION(gPeiUsbHostControllerPpiGuid,PEI_USB_HOST_CONTROLLER_PPI_GUID);
EFI_FORWARD_DECLARATION( PEI_USB_HOST_CONTROLLER_PPI );

typedef
EFI_STATUS
(EFIAPI * PEI_USB_HOST_CONTROLLER_CONTROL_TRANSFER)(
    IN EFI_PEI_SERVICES            **PeiServices,
    IN PEI_USB_HOST_CONTROLLER_PPI *This,
    IN UINT8                       DeviceAddress,
    IN UINT8                       DeviceSpeed,
    IN UINT8                       MaximumPacketLength,
    IN UINT16                      TransactionTranslator,
    IN EFI_USB_DEVICE_REQUEST      *Request,
    IN EFI_USB_DATA_DIRECTION      TransferDirection,
    IN OUT VOID *Data              OPTIONAL,
    IN OUT UINTN *DataLength       OPTIONAL,
    IN UINTN                       TimeOut,
    OUT UINT32                     *TransferResult
);

typedef
EFI_STATUS
(EFIAPI * PEI_USB_HOST_CONTROLLER_BULK_TRANSFER)(
    IN EFI_PEI_SERVICES            **PeiServices,
    IN PEI_USB_HOST_CONTROLLER_PPI *This,
    IN UINT8                       DeviceAddress,
    IN UINT8                       EndPointAddress,
    IN UINT8                       DeviceSpeed,
    IN UINT16                      MaximumPacketLength,
    IN UINT16                      TransactionTranslator,
    IN OUT VOID                    *Data,
    IN OUT UINTN                   *DataLength,
    IN OUT UINT8                   *DataToggle,
    IN UINTN                       TimeOut,
    OUT UINT32                     *TransferResult
);

typedef
EFI_STATUS
(EFIAPI * PEI_USB_HOST_CONTROLLER_GET_ROOTHUB_PORT_NUMBER)(
    IN EFI_PEI_SERVICES            **PeiServices,
    IN PEI_USB_HOST_CONTROLLER_PPI *This,
    OUT UINT8                      *PortNumber
);

typedef
EFI_STATUS
(EFIAPI * PEI_USB_HOST_CONTROLLER_GET_ROOTHUB_PORT_STATUS)(
    IN EFI_PEI_SERVICES            **PeiServices,
    IN PEI_USB_HOST_CONTROLLER_PPI *This,
    IN UINT8                       PortNumber,
    OUT EFI_USB_PORT_STATUS        *PortStatus
);

typedef
EFI_STATUS
(EFIAPI * PEI_USB_HOST_CONTROLLER_SET_ROOTHUB_PORT_FEATURE)(
    IN EFI_PEI_SERVICES            **PeiServices,
    IN PEI_USB_HOST_CONTROLLER_PPI *This,
    IN UINT8                       PortNumber,
    IN EFI_USB_PORT_FEATURE        PortFeature
);

typedef
EFI_STATUS
(EFIAPI * PEI_USB_HOST_CONTROLLER_CLEAR_ROOTHUB_PORT_FEATURE)(
    IN EFI_PEI_SERVICES            **PeiServices,
    IN PEI_USB_HOST_CONTROLLER_PPI *This,
    IN UINT8                       PortNumber,
    IN EFI_USB_PORT_FEATURE        PortFeature
);

typedef
EFI_STATUS
(EFIAPI * PEI_USB_HOST_CONTROLLER_PRECONFIGURE_DEVICE) (
    IN EFI_PEI_SERVICES            **PeiServices,
    IN PEI_USB_HOST_CONTROLLER_PPI *This,
    IN UINT8                       PortNumber,
    IN UINT8                       Speed,
    IN UINT16                      TransactionTranslator 
);

typedef
EFI_STATUS
(EFIAPI * PEI_USB_HOST_CONTROLLER_ENABLE_ENDPOINTS) (
    IN EFI_PEI_SERVICES            **PeiServices,
    IN PEI_USB_HOST_CONTROLLER_PPI *This,
    IN UINT8                       *ConfigurationData
);

typedef struct _PEI_USB_HOST_CONTROLLER_PPI
{
    PEI_USB_HOST_CONTROLLER_CONTROL_TRANSFER ControlTransfer;
    PEI_USB_HOST_CONTROLLER_BULK_TRANSFER    BulkTransfer;
    PEI_USB_HOST_CONTROLLER_GET_ROOTHUB_PORT_NUMBER    GetRootHubPortNumber;
    PEI_USB_HOST_CONTROLLER_GET_ROOTHUB_PORT_STATUS    GetRootHubPortStatus;
    PEI_USB_HOST_CONTROLLER_SET_ROOTHUB_PORT_FEATURE   SetRootHubPortFeature;
    PEI_USB_HOST_CONTROLLER_CLEAR_ROOTHUB_PORT_FEATURE
    ClearRootHubPortFeature;
    BOOLEAN         DebugPortUsed;
    PEI_USB_HOST_CONTROLLER_PRECONFIGURE_DEVICE     PreConfigureDevice;
    PEI_USB_HOST_CONTROLLER_ENABLE_ENDPOINTS        EnableEndpoints;
} PEI_USB_HOST_CONTROLLER_PPI;


#endif

//**********************************************************************
//**********************************************************************
//**                                                                  **
//**        (C)Copyright 1985-2006, American Megatrends, Inc.         **
//**                                                                  **
//**                       All Rights Reserved.                       **
//**                                                                  **
//**         5555 Oakbrook Pkwy, Suite 200, Norcross, GA 30093        **
//**                                                                  **
//**                       Phone: (770)-246-8600                      **
//**                                                                  **
//**********************************************************************
//**********************************************************************
//**********************************************************************