summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Bus/Pci/UhciDxe
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/UhciDxe
parent0c1f1ad1e9a9fe34dd52bcaca18f46c5488812e0 (diff)
downloadedk2-c52fa98ca98ceaab75e8ddf9ebcfbcbd323bab13.tar.gz
edk2-c52fa98ca98ceaab75e8ddf9ebcfbcbd323bab13.tar.bz2
edk2-c52fa98ca98ceaab75e8ddf9ebcfbcbd323bab13.zip
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/UhciDxe')
-rw-r--r--MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c14
-rw-r--r--MdeModulePkg/Bus/Pci/UhciDxe/Uhci.h6
-rw-r--r--MdeModulePkg/Bus/Pci/UhciDxe/UhciQueue.h8
-rw-r--r--MdeModulePkg/Bus/Pci/UhciDxe/UhciReg.c4
-rw-r--r--MdeModulePkg/Bus/Pci/UhciDxe/UhciReg.h2
-rw-r--r--MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.c2
-rw-r--r--MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.h6
-rw-r--r--MdeModulePkg/Bus/Pci/UhciDxe/UsbHcMem.c2
-rw-r--r--MdeModulePkg/Bus/Pci/UhciDxe/UsbHcMem.h6
9 files changed, 25 insertions, 25 deletions
diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c b/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c
index 1c3e37a7bc..8cda00fbda 100644
--- a/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c
+++ b/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c
@@ -1538,7 +1538,7 @@ Uhci2ControlTransfer (
BOOLEAN IsSlow;
Uhc = UHC_FROM_USB2_HC_PROTO (This);
- IsSlow = (EFI_USB_SPEED_LOW == DeviceSpeed) ? TRUE : FALSE;
+ IsSlow = (BOOLEAN) ((EFI_USB_SPEED_LOW == DeviceSpeed) ? TRUE : FALSE);
return UhciControlTransfer (
&Uhc->UsbHc,
@@ -1668,7 +1668,7 @@ Uhci2AsyncInterruptTransfer (
BOOLEAN IsSlow;
Uhc = UHC_FROM_USB2_HC_PROTO (This);
- IsSlow = (EFI_USB_SPEED_LOW == DeviceSpeed) ? TRUE : FALSE;
+ IsSlow = (BOOLEAN) ((EFI_USB_SPEED_LOW == DeviceSpeed) ? TRUE : FALSE);
return UhciAsyncInterruptTransfer (
&Uhc->UsbHc,
@@ -1736,7 +1736,7 @@ Uhci2SyncInterruptTransfer (
}
Uhc = UHC_FROM_USB2_HC_PROTO (This);
- IsSlow = (EFI_USB_SPEED_LOW == DeviceSpeed) ? TRUE : FALSE;
+ IsSlow = (BOOLEAN) ((EFI_USB_SPEED_LOW == DeviceSpeed) ? TRUE : FALSE);
return UhciSyncInterruptTransfer (
&Uhc->UsbHc,
@@ -1897,7 +1897,7 @@ UhciDriverBindingSupported (
OpenStatus = gBS->OpenProtocol (
Controller,
&gEfiPciIoProtocolGuid,
- &PciIo,
+ (VOID **) &PciIo,
This->DriverBindingHandle,
Controller,
EFI_OPEN_PROTOCOL_BY_DRIVER
@@ -2148,7 +2148,7 @@ UhciDriverBindingStart (
Status = gBS->OpenProtocol (
Controller,
&gEfiPciIoProtocolGuid,
- &PciIo,
+ (VOID **) &PciIo,
This->DriverBindingHandle,
Controller,
EFI_OPEN_PROTOCOL_BY_DRIVER
@@ -2277,7 +2277,7 @@ UhciDriverBindingStop (
Status = gBS->OpenProtocol (
Controller,
&gEfiUsbHcProtocolGuid,
- &UsbHc,
+ (VOID **) &UsbHc,
This->DriverBindingHandle,
Controller,
EFI_OPEN_PROTOCOL_GET_PROTOCOL
@@ -2294,7 +2294,7 @@ UhciDriverBindingStop (
Status = gBS->OpenProtocol (
Controller,
&gEfiUsb2HcProtocolGuid,
- &Usb2Hc,
+ (VOID **) &Usb2Hc,
This->DriverBindingHandle,
Controller,
EFI_OPEN_PROTOCOL_GET_PROTOCOL
diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.h b/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.h
index c37894d3a8..5a810a3259 100644
--- a/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.h
+++ b/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.h
@@ -75,7 +75,7 @@ enum {
//
UHCI_TPL = TPL_NOTIFY,
- USB_HC_DEV_SIGNATURE = EFI_SIGNATURE_32 ('u', 'h', 'c', 'i'),
+ USB_HC_DEV_SIGNATURE = EFI_SIGNATURE_32 ('u', 'h', 'c', 'i')
};
#pragma pack(1)
@@ -100,7 +100,7 @@ typedef struct {
// or bulk transfer can reclaim the unused bandwidth. Some USB
// device requires this bandwidth reclamation capability.
//
-typedef struct _USB_HC_DEV {
+struct _USB_HC_DEV {
UINT32 Signature;
EFI_USB_HC_PROTOCOL UsbHc;
EFI_USB2_HC_PROTOCOL Usb2Hc;
@@ -132,7 +132,7 @@ typedef struct _USB_HC_DEV {
USBHC_MEM_POOL *MemPool;
EFI_UNICODE_STRING_TABLE *CtrlNameTable;
VOID *FrameMapping;
-} USB_HC_DEV;
+};
extern EFI_DRIVER_BINDING_PROTOCOL gUhciDriverBinding;
extern EFI_COMPONENT_NAME_PROTOCOL gUhciComponentName;
diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/UhciQueue.h b/MdeModulePkg/Bus/Pci/UhciDxe/UhciQueue.h
index 8b03ec6959..1b60ad7ff9 100644
--- a/MdeModulePkg/Bus/Pci/UhciDxe/UhciQueue.h
+++ b/MdeModulePkg/Bus/Pci/UhciDxe/UhciQueue.h
@@ -88,19 +88,19 @@ typedef struct {
typedef struct _UHCI_TD_SW UHCI_TD_SW;
typedef struct _UHCI_QH_SW UHCI_QH_SW;
-typedef struct _UHCI_QH_SW {
+struct _UHCI_QH_SW {
UHCI_QH_HW QhHw;
UHCI_QH_SW *NextQh;
UHCI_TD_SW *TDs;
UINTN Interval;
-} UHCI_QH_SW;
+};
-typedef struct _UHCI_TD_SW {
+struct _UHCI_TD_SW {
UHCI_TD_HW TdHw;
UHCI_TD_SW *NextTd;
UINT8 *Data;
UINT16 DataLen;
-} UHCI_TD_SW;
+};
/**
diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/UhciReg.c b/MdeModulePkg/Bus/Pci/UhciDxe/UhciReg.c
index 63326292f3..8bb0f2b19a 100644
--- a/MdeModulePkg/Bus/Pci/UhciDxe/UhciReg.c
+++ b/MdeModulePkg/Bus/Pci/UhciDxe/UhciReg.c
@@ -116,7 +116,7 @@ UhciSetRegBit (
UINT16 Data;
Data = UhciReadReg (PciIo, Offset);
- Data |= Bit;
+ Data = (UINT16) (Data |Bit);
UhciWriteReg (PciIo, Offset, Data);
}
@@ -141,7 +141,7 @@ UhciClearRegBit (
UINT16 Data;
Data = UhciReadReg (PciIo, Offset);
- Data &= ~Bit;
+ Data = (UINT16) (Data & ~Bit);
UhciWriteReg (PciIo, Offset, Data);
}
diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/UhciReg.h b/MdeModulePkg/Bus/Pci/UhciDxe/UhciReg.h
index 95a98dbab9..dd0103aadc 100644
--- a/MdeModulePkg/Bus/Pci/UhciDxe/UhciReg.h
+++ b/MdeModulePkg/Bus/Pci/UhciDxe/UhciReg.h
@@ -98,7 +98,7 @@ enum {
USBTD_BABBLE = BIT(4), // Babble condition
USBTD_NAK = BIT(3), // NAK is received
USBTD_CRC = BIT(2), // CRC/Time out error
- USBTD_BITSTUFF = BIT(1), // Bit stuff error
+ USBTD_BITSTUFF = BIT(1) // Bit stuff error
};
diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.c b/MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.c
index 222322a2b0..e1b602e7e2 100644
--- a/MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.c
+++ b/MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.c
@@ -498,7 +498,7 @@ UhciCheckTdStatus (
// next to the last known-good TD's data toggle if
// any TD is executed OK
//
- QhResult->NextToggle = 1 - (UINT8)TdHw->DataToggle;
+ QhResult->NextToggle = (UINT8) (1 - (UINT8)TdHw->DataToggle);
//
// This TD is finished OK or met short packet read. Update the
diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.h b/MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.h
index cba65c661b..61e459b976 100644
--- a/MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.h
+++ b/MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.h
@@ -38,7 +38,7 @@ enum {
USB_ERR_FAIL_MASK = EFI_USB_ERR_STALL | EFI_USB_ERR_BUFFER |
EFI_USB_ERR_BABBLE | EFI_USB_ERR_CRC |
EFI_USB_ERR_TIMEOUT | EFI_USB_ERR_BITSTUFF |
- EFI_USB_ERR_SYSTEM,
+ EFI_USB_ERR_SYSTEM
};
@@ -59,7 +59,7 @@ typedef struct _UHCI_ASYNC_REQUEST UHCI_ASYNC_REQUEST;
//
// Structure used to manager the asynchronous interrupt transfers.
//
-typedef struct _UHCI_ASYNC_REQUEST{
+struct _UHCI_ASYNC_REQUEST{
UINTN Signature;
LIST_ENTRY Link;
UHCI_ASYNC_REQUEST *Recycle;
@@ -86,7 +86,7 @@ typedef struct _UHCI_ASYNC_REQUEST{
//
EFI_ASYNC_USB_TRANSFER_CALLBACK Callback;
VOID *Context;
-} UHCI_ASYNC_REQUEST;
+};
#define UHCI_ASYNC_INT_FROM_LINK(a) \
CR (a, UHCI_ASYNC_REQUEST, Link, UHCI_ASYNC_INT_SIGNATURE)
diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/UsbHcMem.c b/MdeModulePkg/Bus/Pci/UhciDxe/UsbHcMem.c
index 32082b15bf..7c598e2bbb 100644
--- a/MdeModulePkg/Bus/Pci/UhciDxe/UsbHcMem.c
+++ b/MdeModulePkg/Bus/Pci/UhciDxe/UsbHcMem.c
@@ -519,7 +519,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/UhciDxe/UsbHcMem.h b/MdeModulePkg/Bus/Pci/UhciDxe/UsbHcMem.h
index df9ab0ec38..4df144be84 100644
--- a/MdeModulePkg/Bus/Pci/UhciDxe/UsbHcMem.h
+++ b/MdeModulePkg/Bus/Pci/UhciDxe/UsbHcMem.h
@@ -36,7 +36,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;
@@ -44,7 +44,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
@@ -62,7 +62,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))