summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Bus/Pci/EhciDxe
diff options
context:
space:
mode:
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2007-07-17 01:48:09 +0000
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2007-07-17 01:48:09 +0000
commitc52fa98ca98ceaab75e8ddf9ebcfbcbd323bab13 (patch)
tree2aeb7c8043fc83fe480ee6bb7d5ec5a31f12685b /MdeModulePkg/Bus/Pci/EhciDxe
parent0c1f1ad1e9a9fe34dd52bcaca18f46c5488812e0 (diff)
downloadedk2-platforms-c52fa98ca98ceaab75e8ddf9ebcfbcbd323bab13.tar.xz
1. Fixed tools_def.template to meet ICC build for IA32
2. Modified some source files to meet ICC build for IA32 and IPF. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3271 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Bus/Pci/EhciDxe')
-rw-r--r--MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c12
-rw-r--r--MdeModulePkg/Bus/Pci/EhciDxe/Ehci.h6
-rw-r--r--MdeModulePkg/Bus/Pci/EhciDxe/EhciDebug.h2
-rw-r--r--MdeModulePkg/Bus/Pci/EhciDxe/EhciReg.h2
-rw-r--r--MdeModulePkg/Bus/Pci/EhciDxe/EhciUrb.c4
-rw-r--r--MdeModulePkg/Bus/Pci/EhciDxe/EhciUrb.h14
-rw-r--r--MdeModulePkg/Bus/Pci/EhciDxe/UsbHcMem.c2
-rw-r--r--MdeModulePkg/Bus/Pci/EhciDxe/UsbHcMem.h6
8 files changed, 24 insertions, 24 deletions
diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c
index 093388d45f..2e3edfd831 100644
--- a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c
+++ b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c
@@ -351,7 +351,7 @@ EhcGetRootHubPortStatus (
for (Index = 0; Index < MapSize; Index++) {
if (EHC_BIT_IS_SET (State, mUsbPortStateMap[Index].HwState)) {
- PortStatus->PortStatus |= mUsbPortStateMap[Index].UefiState;
+ PortStatus->PortStatus = (UINT16) (PortStatus->PortStatus | mUsbPortStateMap[Index].UefiState);
}
}
@@ -359,7 +359,7 @@ EhcGetRootHubPortStatus (
for (Index = 0; Index < MapSize; Index++) {
if (EHC_BIT_IS_SET (State, mUsbPortChangeMap[Index].HwState)) {
- PortStatus->PortChangeStatus |= mUsbPortChangeMap[Index].UefiState;
+ PortStatus->PortChangeStatus = (UINT16) (PortStatus->PortChangeStatus | mUsbPortChangeMap[Index].UefiState);
}
}
@@ -707,7 +707,7 @@ EhcControlTransfer (
// endpoint is bidirectional. EhcCreateUrb expects this
// combination of Ep addr and its direction.
//
- Endpoint = 0 | ((TransferDirection == EfiUsbDataIn) ? 0x80 : 0);
+ Endpoint = (UINT8) (0 | ((TransferDirection == EfiUsbDataIn) ? 0x80 : 0));
Urb = EhcCreateUrb (
Ehc,
DeviceAddress,
@@ -1340,7 +1340,7 @@ EhcDriverBindingSupported (
Status = gBS->OpenProtocol (
Controller,
&gEfiPciIoProtocolGuid,
- &PciIo,
+ (VOID **) &PciIo,
This->DriverBindingHandle,
Controller,
EFI_OPEN_PROTOCOL_BY_DRIVER
@@ -1491,7 +1491,7 @@ EhcDriverBindingStart (
Status = gBS->OpenProtocol (
Controller,
&gEfiPciIoProtocolGuid,
- &PciIo,
+ (VOID **) &PciIo,
This->DriverBindingHandle,
Controller,
EFI_OPEN_PROTOCOL_BY_DRIVER
@@ -1636,7 +1636,7 @@ EhcDriverBindingStop (
Status = gBS->OpenProtocol (
Controller,
&gEfiUsb2HcProtocolGuid,
- &Usb2Hc,
+ (VOID **) &Usb2Hc,
This->DriverBindingHandle,
Controller,
EFI_OPEN_PROTOCOL_GET_PROTOCOL
diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.h b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.h
index 57c0c00084..2b0e4c956c 100644
--- a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.h
+++ b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.h
@@ -66,7 +66,7 @@ enum {
EHC_SYNC_POLL_TIME = 20 * EHC_STALL_1_MICROSECOND,
EHC_ASYNC_POLL_TIME = 50 * 10000UL, // The unit of time is 100us
- EHC_TPL = TPL_NOTIFY,
+ EHC_TPL = TPL_NOTIFY
};
//
@@ -95,7 +95,7 @@ enum {
#define EHC_FROM_THIS(a) CR(a, USB2_HC_DEV, Usb2Hc, USB2_HC_DEV_SIGNATURE)
-typedef struct _USB2_HC_DEV {
+struct _USB2_HC_DEV {
UINTN Signature;
EFI_USB2_HC_PROTOCOL Usb2Hc;
@@ -143,7 +143,7 @@ typedef struct _USB2_HC_DEV {
// Misc
//
EFI_UNICODE_STRING_TABLE *ControllerNameTable;
-} USB2_HC_DEV;
+};
extern EFI_DRIVER_BINDING_PROTOCOL gEhciDriverBinding;
diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/EhciDebug.h b/MdeModulePkg/Bus/Pci/EhciDxe/EhciDebug.h
index be4bcd6556..247021b40d 100644
--- a/MdeModulePkg/Bus/Pci/EhciDxe/EhciDebug.h
+++ b/MdeModulePkg/Bus/Pci/EhciDxe/EhciDebug.h
@@ -30,7 +30,7 @@ enum {
EHC_DEBUG_QH = (UINTN)(1 << 8),
EHC_DEBUG_QTD = (UINTN)(1 << 9),
- EHC_DEBUG_BUF = (UINTN)(1 << 10),
+ EHC_DEBUG_BUF = (UINTN)(1 << 10)
};
diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/EhciReg.h b/MdeModulePkg/Bus/Pci/EhciDxe/EhciReg.h
index 2ac27eb39c..929bd22a37 100644
--- a/MdeModulePkg/Bus/Pci/EhciDxe/EhciReg.h
+++ b/MdeModulePkg/Bus/Pci/EhciDxe/EhciReg.h
@@ -93,7 +93,7 @@ enum {
//
EHC_PCI_CLASSC = 0x09,
EHC_PCI_CLASSC_PI = 0x20,
- EHC_BAR_INDEX = 0, /* how many bytes away from USB_BASE to 0x10 */
+ EHC_BAR_INDEX = 0 /* how many bytes away from USB_BASE to 0x10 */
};
#define EHC_LINK_TERMINATED(Link) (((Link) & 0x01) != 0)
diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/EhciUrb.c b/MdeModulePkg/Bus/Pci/EhciDxe/EhciUrb.c
index 7b8b7b58f2..005e0596b6 100644
--- a/MdeModulePkg/Bus/Pci/EhciDxe/EhciUrb.c
+++ b/MdeModulePkg/Bus/Pci/EhciDxe/EhciUrb.c
@@ -486,7 +486,7 @@ EhcCreateQtds (
// Switch the Toggle bit if odd number of packets are included in the QTD.
//
if (((Qtd->DataLen + Ep->MaxPacket - 1) / Ep->MaxPacket) % 2) {
- Toggle = 1 - Toggle;
+ Toggle = (UINT8) (1 - Toggle);
}
Len += Qtd->DataLen;
@@ -588,7 +588,7 @@ EhcCreateUrb (
Ep = &Urb->Ep;
Ep->DevAddr = DevAddr;
- Ep->EpAddr = EpAddr & 0x0F;
+ Ep->EpAddr = (UINT8) (EpAddr & 0x0F);
Ep->Direction = ((EpAddr & 0x80) ? EfiUsbDataIn : EfiUsbDataOut);
Ep->DevSpeed = DevSpeed;
Ep->MaxPacket = MaxPacket;
diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/EhciUrb.h b/MdeModulePkg/Bus/Pci/EhciDxe/EhciUrb.h
index a2a5826de8..a1dc8e6c0a 100644
--- a/MdeModulePkg/Bus/Pci/EhciDxe/EhciUrb.h
+++ b/MdeModulePkg/Bus/Pci/EhciDxe/EhciUrb.h
@@ -83,7 +83,7 @@ enum {
QH_MICROFRAME_6 = 0x40,
QH_MICROFRAME_7 = 0x80,
- USB_ERR_SHORT_PACKET = 0x200,
+ USB_ERR_SHORT_PACKET = 0x200
};
//
@@ -180,13 +180,13 @@ typedef struct _USB_ENDPOINT {
// Software QTD strcture, this is used to manage all the
// QTD generated from a URB. Don't add fields before QtdHw.
//
-typedef struct _EHC_QTD {
+struct _EHC_QTD {
QTD_HW QtdHw;
UINT32 Signature;
LIST_ENTRY QtdList; // The list of QTDs to one end point
UINT8 *Data; // Buffer of the original data
UINTN DataLen; // Original amount of data in this QTD
-} EHC_QTD;
+};
//
// Software QH structure. All three different transaction types
@@ -203,19 +203,19 @@ typedef struct _EHC_QTD {
// transfer is supported. A dummy QH is linked to EHCI AsyncListAddr
// as the reclamation header. New transfer is inserted after this QH.
//
-typedef struct _EHC_QH {
+struct _EHC_QH {
QH_HW QhHw;
UINT32 Signature;
EHC_QH *NextQh; // The queue head pointed to by horizontal link
LIST_ENTRY Qtds; // The list of QTDs to this queue head
UINTN Interval;
-} EHC_QH;
+};
//
// URB (Usb Request Block) contains information for all kinds of
// usb requests.
//
-typedef struct _URB {
+struct _URB {
UINT32 Signature;
LIST_ENTRY UrbList;
@@ -244,7 +244,7 @@ typedef struct _URB {
UINT32 Result;
UINTN Completed; // completed data length
UINT8 DataToggle;
-} URB;
+};
diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/UsbHcMem.c b/MdeModulePkg/Bus/Pci/EhciDxe/UsbHcMem.c
index b7e7d66025..22556e7ef8 100644
--- a/MdeModulePkg/Bus/Pci/EhciDxe/UsbHcMem.c
+++ b/MdeModulePkg/Bus/Pci/EhciDxe/UsbHcMem.c
@@ -520,7 +520,7 @@ UsbHcFreeMem (
for (Count = 0; Count < (AllocSize / USBHC_MEM_UNIT); Count++) {
ASSERT (USB_HC_BIT_IS_SET (Block->Bits[Byte], Bit));
- Block->Bits[Byte] ^= (UINT8) USB_HC_BIT (Bit);
+ Block->Bits[Byte] = (UINT8) (Block->Bits[Byte] ^ USB_HC_BIT (Bit));
NEXT_BIT (Byte, Bit);
}
diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/UsbHcMem.h b/MdeModulePkg/Bus/Pci/EhciDxe/UsbHcMem.h
index 10d3545feb..09fd162529 100644
--- a/MdeModulePkg/Bus/Pci/EhciDxe/UsbHcMem.h
+++ b/MdeModulePkg/Bus/Pci/EhciDxe/UsbHcMem.h
@@ -37,7 +37,7 @@ Revision History
typedef struct _USBHC_MEM_BLOCK USBHC_MEM_BLOCK;
-typedef struct _USBHC_MEM_BLOCK {
+struct _USBHC_MEM_BLOCK {
UINT8 *Bits; // Bit array to record which unit is allocated
UINTN BitsLen;
UINT8 *Buf;
@@ -45,7 +45,7 @@ typedef struct _USBHC_MEM_BLOCK {
UINTN BufLen; // Memory size in bytes
VOID *Mapping;
USBHC_MEM_BLOCK *Next;
-} USBHC_MEM_BLOCK;
+};
//
// USBHC_MEM_POOL is used to manage the memory used by USB
@@ -63,7 +63,7 @@ enum {
USBHC_MEM_UNIT = 64, // Memory allocation unit, must be 2^n, n>4
USBHC_MEM_UNIT_MASK = USBHC_MEM_UNIT - 1,
- USBHC_MEM_DEFAULT_PAGES = 16,
+ USBHC_MEM_DEFAULT_PAGES = 16
};
#define USBHC_MEM_ROUND(Len) (((Len) + USBHC_MEM_UNIT_MASK) & (~USBHC_MEM_UNIT_MASK))