summaryrefslogtreecommitdiff
path: root/ReferenceCode/Chipset/LynxPoint/PchInit/Dxe/PchUsbPrecondition.h
blob: faaeda9caae506c7b8f1c3ead0bf4d6a3b07d023 (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
/** @file
  Header file for PCH USB precondition feature support in DXE phase

@copyright
  Copyright (c) 2012 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.

  This file contains an 'Intel Peripheral Driver' and uniquely
  identified as "Intel Reference Module" and is
  licensed for Intel CPUs and chipsets under the terms of your
  license agreement with Intel or your vendor.  This file may
  be modified by the user, subject to additional terms of the
  license agreement
**/
#ifndef _PCH_USB_PRECONDITION_H_
#define _PCH_USB_PRECONDITION_H_

#if !defined(EDK_RELEASE_VERSION) || (EDK_RELEASE_VERSION < 0x00020000)
#include "EdkIIGlueBase.h"
#include "PchAccess.h"
#include "UsbHcPortPrecondition.h"
#endif

#define USB_HC_RESET_STALL_US        10 * 1000 ///< 10ms
#define USB_ROOT_PORT_RESET_STALL_US 50 * 1000 ///< 50ms
#define USB_TDRSTR_CHECK_INTERVAL_US 100
#define EHCI_PRECONDITION_DEV_SIGN EFI_SIGNATURE_32 ('e','p','r','e')
#define EHC_PRECONDITION_FROM_THIS(a) CR(a, USB_EHCI_PRECONDITION_DEV, Protocol, EHCI_PRECONDITION_DEV_SIGN)

typedef struct _USB_EHCI_PRECONDITION_DEV {
  UINTN                                 Signature;
  EFI_USB_HC_PORT_PRECONDITION          Protocol;
  UINTN                                 PortResetBitMap;
} USB_EHCI_PRECONDITION_DEV;

#define XHCI_PRECONDITION_DEV_SIGN EFI_SIGNATURE_32 ('x','p','r','e')
#define XHC_PRECONDITION_FROM_THIS(a) CR(a, USB_XHCI_PRECONDITION_DEV, Protocol, XHCI_PRECONDITION_DEV_SIGN)

typedef struct _USB_XHCI_PRECONDITION_DEV {
  UINTN                                 Signature;
  EFI_USB_HC_PORT_PRECONDITION          Protocol;
  UINTN                                 HsPortCount;
  UINTN                                 PortResetBitMap;
  UINTN                                 PortResetDoneBitMap;
  BOOLEAN                               PORTSCxResumeDoneFlag;
} USB_XHCI_PRECONDITION_DEV;

#endif