summaryrefslogtreecommitdiff
path: root/Include/PPI/UsbIo.h
blob: 99f7713fa29e748c69623a4921f9a08ced786fdc (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
//**********************************************************************
//**********************************************************************
//**                                                                  **
//**        (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/UsbPeimSrc/UsbIo.h 2     7/10/08 6:37p Michaela $
//
// $Revision: 2 $
//
// $Date: 7/10/08 6:37p $
//
//**********************************************************************
// Revision History
// ----------------
// $Log: /Alaska/SOURCE/Modules/USBRecovery/UsbPeimSrc/UsbIo.h $
// 
// 2     7/10/08 6:37p Michaela
// Updated to support OHCI controllers
//
// 1     9/22/06 12:19p Sivagarn
// - Initial Check-in
// - Included Recovery code in Source
//
//*****************************************************************************

//<AMI_FHDR_START>
//----------------------------------------------------------------------------
//
// Name:        UsbIo.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:

   UsbIo.h

   Abstract:

   Usb access PPI as defined in EFI 2.0

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

   --*/

#ifndef _PEI_USB_IO_PPI_H_
#define _PEI_USB_IO_PPI_H_

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

#define PEI_USB_IO_PPI_GUID \
    {\
        0x7c29785c, 0x66b9, 0x49fc, 0xb7, 0x97, 0x1c, 0xa5, 0x55, 0xe, 0xf2,\
        0x83 \
    }

EFI_FORWARD_DECLARATION( PEI_USB_IO_PPI );

typedef
EFI_STATUS
(EFIAPI * PEI_USB_CONTROL_TRANSFER)(
    IN EFI_PEI_SERVICES       **PeiServices,
    IN PEI_USB_IO_PPI         *This,
    IN EFI_USB_DEVICE_REQUEST *Request,
    IN EFI_USB_DATA_DIRECTION Direction,
    IN UINT32                 Timeout,
    IN OUT VOID *Data         OPTIONAL,
    IN UINTN DataLength       OPTIONAL
);

typedef
EFI_STATUS
(EFIAPI * PEI_USB_BULK_TRANSFER)(
    IN EFI_PEI_SERVICES **PeiServices,
    IN PEI_USB_IO_PPI   *This,
    IN UINT8            DeviceEndpoint,
    IN OUT VOID         *Data,
    IN OUT UINTN        *DataLength,
    IN UINTN            Timeout
);

typedef
EFI_STATUS
(EFIAPI * PEI_USB_GET_INTERFACE_DESCRIPTOR)(
    IN EFI_PEI_SERVICES             **PeiServices,
    IN PEI_USB_IO_PPI               *This,
    IN EFI_USB_INTERFACE_DESCRIPTOR **InterfaceDescriptor
);

typedef
EFI_STATUS
(EFIAPI * PEI_USB_GET_ENDPOINT_DESCRIPTOR)(
    IN EFI_PEI_SERVICES            **PeiServices,
    IN PEI_USB_IO_PPI              *This,
    IN UINT8                       EndpointIndex,
    IN EFI_USB_ENDPOINT_DESCRIPTOR **EndpointDescriptor
);

typedef
EFI_STATUS
(EFIAPI * PEI_USB_PORT_RESET)(
    IN EFI_PEI_SERVICES **PeiServices,
    IN PEI_USB_IO_PPI   *This
);

typedef struct _PEI_USB_IO_PPI
{
    PEI_USB_CONTROL_TRANSFER UsbControlTransfer;
    PEI_USB_BULK_TRANSFER    UsbBulkTransfer;
    PEI_USB_GET_INTERFACE_DESCRIPTOR UsbGetInterfaceDescriptor;
    PEI_USB_GET_ENDPOINT_DESCRIPTOR UsbGetEndpointDescriptor;
    PEI_USB_PORT_RESET UsbPortReset;
} PEI_USB_IO_PPI;

extern EFI_GUID gPeiUsbIoPpiGuid;

#endif

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