X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdeModulePkg%2FBus%2FPci%2FEhciDxe%2FEhciUrb.h;h=02e9af81be391d873d975a68ba09d70600248ca4;hb=2dda77a650cf350751b5536a48d586a3ae02d515;hp=1079be003b77891c36eca3f57d5d6eb18f0c4a69;hpb=597f4ee21c004a25d77d0417e9de7f6d5f9aace5;p=mirror_edk2.git diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/EhciUrb.h b/MdeModulePkg/Bus/Pci/EhciDxe/EhciUrb.h index 1079be003b..02e9af81be 100644 --- a/MdeModulePkg/Bus/Pci/EhciDxe/EhciUrb.h +++ b/MdeModulePkg/Bus/Pci/EhciDxe/EhciUrb.h @@ -3,8 +3,8 @@ This file contains URB request, each request is warpped in a URB (Usb Request Block). -Copyright (c) 2007 - 2009, Intel Corporation -All rights reserved. This program and the accompanying materials +Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php @@ -22,61 +22,59 @@ typedef struct _EHC_QTD EHC_QTD; typedef struct _EHC_QH EHC_QH; typedef struct _URB URB; -typedef enum { - // - // Transfer types, used in URB to identify the transfer type - // - EHC_CTRL_TRANSFER = 0x01, - EHC_BULK_TRANSFER = 0x02, - EHC_INT_TRANSFER_SYNC = 0x04, - EHC_INT_TRANSFER_ASYNC = 0x08, +// +// Transfer types, used in URB to identify the transfer type +// +#define EHC_CTRL_TRANSFER 0x01 +#define EHC_BULK_TRANSFER 0x02 +#define EHC_INT_TRANSFER_SYNC 0x04 +#define EHC_INT_TRANSFER_ASYNC 0x08 - EHC_QTD_SIG = SIGNATURE_32 ('U', 'S', 'B', 'T'), - EHC_QH_SIG = SIGNATURE_32 ('U', 'S', 'B', 'H'), - EHC_URB_SIG = SIGNATURE_32 ('U', 'S', 'B', 'R'), +#define EHC_QTD_SIG SIGNATURE_32 ('U', 'S', 'B', 'T') +#define EHC_QH_SIG SIGNATURE_32 ('U', 'S', 'B', 'H') +#define EHC_URB_SIG SIGNATURE_32 ('U', 'S', 'B', 'R') - // - // Hardware related bit definitions - // - EHC_TYPE_ITD = 0x00, - EHC_TYPE_QH = 0x02, - EHC_TYPE_SITD = 0x04, - EHC_TYPE_FSTN = 0x06, - - QH_NAK_RELOAD = 3, - QH_HSHBW_MULTI = 1, - - QTD_MAX_ERR = 3, - QTD_PID_OUTPUT = 0x00, - QTD_PID_INPUT = 0x01, - QTD_PID_SETUP = 0x02, - - QTD_STAT_DO_OUT = 0, - QTD_STAT_DO_SS = 0, - QTD_STAT_DO_PING = 0x01, - QTD_STAT_DO_CS = 0x02, - QTD_STAT_TRANS_ERR = 0x08, - QTD_STAT_BABBLE_ERR = 0x10, - QTD_STAT_BUFF_ERR = 0x20, - QTD_STAT_HALTED = 0x40, - QTD_STAT_ACTIVE = 0x80, - QTD_STAT_ERR_MASK = QTD_STAT_TRANS_ERR | QTD_STAT_BABBLE_ERR | QTD_STAT_BUFF_ERR, - - QTD_MAX_BUFFER = 4, - QTD_BUF_LEN = 4096, - QTD_BUF_MASK = 0x0FFF, - - QH_MICROFRAME_0 = 0x01, - QH_MICROFRAME_1 = 0x02, - QH_MICROFRAME_2 = 0x04, - QH_MICROFRAME_3 = 0x08, - QH_MICROFRAME_4 = 0x10, - QH_MICROFRAME_5 = 0x20, - QH_MICROFRAME_6 = 0x40, - QH_MICROFRAME_7 = 0x80, - - USB_ERR_SHORT_PACKET = 0x200 -}EHCI_URB_FLAG_VALUE; +// +// Hardware related bit definitions +// +#define EHC_TYPE_ITD 0x00 +#define EHC_TYPE_QH 0x02 +#define EHC_TYPE_SITD 0x04 +#define EHC_TYPE_FSTN 0x06 + +#define QH_NAK_RELOAD 3 +#define QH_HSHBW_MULTI 1 + +#define QTD_MAX_ERR 3 +#define QTD_PID_OUTPUT 0x00 +#define QTD_PID_INPUT 0x01 +#define QTD_PID_SETUP 0x02 + +#define QTD_STAT_DO_OUT 0 +#define QTD_STAT_DO_SS 0 +#define QTD_STAT_DO_PING 0x01 +#define QTD_STAT_DO_CS 0x02 +#define QTD_STAT_TRANS_ERR 0x08 +#define QTD_STAT_BABBLE_ERR 0x10 +#define QTD_STAT_BUFF_ERR 0x20 +#define QTD_STAT_HALTED 0x40 +#define QTD_STAT_ACTIVE 0x80 +#define QTD_STAT_ERR_MASK (QTD_STAT_TRANS_ERR | QTD_STAT_BABBLE_ERR | QTD_STAT_BUFF_ERR) + +#define QTD_MAX_BUFFER 4 +#define QTD_BUF_LEN 4096 +#define QTD_BUF_MASK 0x0FFF + +#define QH_MICROFRAME_0 0x01 +#define QH_MICROFRAME_1 0x02 +#define QH_MICROFRAME_2 0x04 +#define QH_MICROFRAME_3 0x08 +#define QH_MICROFRAME_4 0x10 +#define QH_MICROFRAME_5 0x20 +#define QH_MICROFRAME_6 0x40 +#define QH_MICROFRAME_7 0x80 + +#define USB_ERR_SHORT_PACKET 0x200 // // Fill in the hardware link point: pass in a EHC_QH/QH_HW @@ -102,7 +100,7 @@ typedef struct { UINT32 Pid : 2; UINT32 ErrCnt : 2; UINT32 CurPage : 3; - UINT32 IOC : 1; + UINT32 Ioc : 1; UINT32 TotalBytes : 15; UINT32 DataToggle : 1; @@ -142,7 +140,7 @@ typedef struct { UINT32 Pid : 2; UINT32 ErrCnt : 2; UINT32 CurPage : 3; - UINT32 IOC : 1; + UINT32 Ioc : 1; UINT32 TotalBytes : 15; UINT32 DataToggle : 1; @@ -244,7 +242,8 @@ struct _URB { Create a single QTD to hold the data. @param Ehc The EHCI device. - @param Data Current data not associated with a QTD. + @param Data The cpu memory address of current data not associated with a QTD. + @param DataPhy The pci bus address of current data not associated with a QTD. @param DataLen The length of the data. @param PktId Packet ID to use in the QTD. @param Toggle Data toggle to use in the QTD. @@ -257,6 +256,7 @@ EHC_QTD * EhcCreateQtd ( IN USB2_HC_DEV *Ehc, IN UINT8 *Data, + IN UINT8 *DataPhy, IN UINTN DataLen, IN UINT8 PktId, IN UINT8 Toggle,