diff options
author | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-07-17 01:48:09 +0000 |
---|---|---|
committer | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-07-17 01:48:09 +0000 |
commit | c52fa98ca98ceaab75e8ddf9ebcfbcbd323bab13 (patch) | |
tree | 2aeb7c8043fc83fe480ee6bb7d5ec5a31f12685b /MdeModulePkg/Bus/Usb/UsbBusDxe | |
parent | 0c1f1ad1e9a9fe34dd52bcaca18f46c5488812e0 (diff) | |
download | edk2-c52fa98ca98ceaab75e8ddf9ebcfbcbd323bab13.zip edk2-c52fa98ca98ceaab75e8ddf9ebcfbcbd323bab13.tar.gz edk2-c52fa98ca98ceaab75e8ddf9ebcfbcbd323bab13.tar.bz2 |
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/Usb/UsbBusDxe')
-rw-r--r-- | MdeModulePkg/Bus/Usb/UsbBusDxe/UsbDesc.h | 2 | ||||
-rw-r--r-- | MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c | 2 | ||||
-rw-r--r-- | MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.h | 4 | ||||
-rw-r--r-- | MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c | 24 | ||||
-rw-r--r-- | MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.h | 6 | ||||
-rw-r--r-- | MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c | 6 | ||||
-rw-r--r-- | MdeModulePkg/Bus/Usb/UsbBusDxe/usbbus.h | 14 |
7 files changed, 30 insertions, 28 deletions
diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbDesc.h b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbDesc.h index bdecfcf..14f3c7f 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbDesc.h +++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbDesc.h @@ -26,7 +26,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #define _USB_DESCRIPTOR_H_
enum {
- USB_MAX_INTERFACE_SETTING = 8,
+ USB_MAX_INTERFACE_SETTING = 8
};
//
diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c index 95ad870..9fbaf6b 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c +++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c @@ -888,7 +888,7 @@ UsbEnumeratePort ( // If overcurrent condition is cleared, enable the port again
//
if (!USB_BIT_IS_SET (PortState.PortStatus, USB_PORT_STAT_OVERCURRENT)) {
- HubApi->SetPortFeature (HubIf, Port, USB_HUB_PORT_POWER);
+ HubApi->SetPortFeature (HubIf, Port, (EFI_USB_PORT_FEATURE) USB_HUB_PORT_POWER);
}
} else if (USB_BIT_IS_SET (PortState.PortChangeStatus, USB_PORT_STAT_C_CONNECTION)) {
diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.h b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.h index e14b2d7..3c22a0c 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.h +++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.h @@ -100,7 +100,7 @@ EFI_STATUS IN USB_INTERFACE *UsbIf
);
-typedef struct _USB_HUB_API{
+struct _USB_HUB_API{
USB_HUB_INIT Init;
USB_HUB_GET_PORT_STATUS GetPortStatus;
USB_HUB_CLEAR_PORT_CHANGE ClearPortChange;
@@ -108,7 +108,7 @@ typedef struct _USB_HUB_API{ USB_HUB_CLEAR_PORT_FEATURE ClearPortFeature;
USB_HUB_RESET_PORT ResetPort;
USB_HUB_RELEASE Release;
-} USB_HUB_API;
+};
USB_ENDPOINT_DESC*
UsbGetEndpointDesc (
diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c index 25332f4..cb54f03 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c +++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c @@ -98,7 +98,7 @@ UsbHubCtrlClearPortFeature ( USB_HUB_TARGET_PORT,
USB_HUB_REQ_CLEAR_FEATURE,
Feature,
- Port + 1,
+ (UINT16) (Port + 1),
NULL,
0
);
@@ -140,8 +140,8 @@ UsbHubCtrlClearTTBuffer ( //
// Check USB2.0 spec page 424 for wValue's encoding
//
- Value = (EpNum & 0x0F) | (DevAddr << 4) |
- ((EpType & 0x03) << 11) | ((EpNum & 0x80) << 15);
+ Value = (UINT16) ((EpNum & 0x0F) | (DevAddr << 4) |
+ ((EpType & 0x03) << 11) | ((EpNum & 0x80) << 15));
Status = UsbCtrlRequest (
HubDev,
@@ -150,7 +150,7 @@ UsbHubCtrlClearTTBuffer ( USB_HUB_TARGET_PORT,
USB_HUB_REQ_CLEAR_TT,
Value,
- Port + 1,
+ (UINT16) (Port + 1),
NULL,
0
);
@@ -265,7 +265,7 @@ UsbHubCtrlGetPortStatus ( USB_HUB_TARGET_PORT,
USB_HUB_REQ_GET_STATUS,
0,
- Port + 1,
+ (UINT16) (Port + 1),
State,
4
);
@@ -300,7 +300,7 @@ UsbHubCtrlResetTT ( USB_HUB_TARGET_HUB,
USB_HUB_REQ_RESET_TT,
0,
- Port + 1,
+ (UINT16) (Port + 1),
NULL,
0
);
@@ -376,7 +376,7 @@ UsbHubCtrlSetPortFeature ( USB_HUB_TARGET_PORT,
USB_HUB_REQ_SET_FEATURE,
Feature,
- Port + 1,
+ (UINT16) (Port + 1),
NULL,
0
);
@@ -744,7 +744,7 @@ UsbHubInit ( // for both gang/individual powered hubs.
//
for (Index = 0; Index < HubDesc.NumPorts; Index++) {
- UsbHubCtrlSetPortFeature (HubIf->Device, Index, USB_HUB_PORT_POWER);
+ UsbHubCtrlSetPortFeature (HubIf->Device, Index, (EFI_USB_PORT_FEATURE) USB_HUB_PORT_POWER);
}
gBS->Stall (HubDesc.PwrOn2PwrGood * 2 * USB_STALL_1_MS);
@@ -852,7 +852,7 @@ UsbHubSetPortFeature ( {
EFI_STATUS Status;
- Status = UsbHubCtrlSetPortFeature (HubIf->Device, Port, Feature);
+ Status = UsbHubCtrlSetPortFeature (HubIf->Device, Port, (UINT8) Feature);
return Status;
}
@@ -879,7 +879,7 @@ UsbHubClearPortFeature ( {
EFI_STATUS Status;
- Status = UsbHubCtrlClearPortFeature (HubIf->Device, Port, Feature);
+ Status = UsbHubCtrlClearPortFeature (HubIf->Device, Port, (UINT8) Feature);
return Status;
}
@@ -907,7 +907,7 @@ UsbHubResetPort ( UINTN Index;
EFI_STATUS Status;
- Status = UsbHubSetPortFeature (HubIf, Port, USB_HUB_PORT_RESET);
+ Status = UsbHubSetPortFeature (HubIf, Port, (EFI_USB_PORT_FEATURE) USB_HUB_PORT_RESET);
if (EFI_ERROR (Status)) {
return Status;
@@ -1121,7 +1121,7 @@ UsbRootHubClearPortChange ( Map = &mRootHubFeatureMap[Index];
if (USB_BIT_IS_SET (PortState.PortChangeStatus, Map->ChangedBit)) {
- UsbHcClearRootHubPortFeature (HubIf->Device->Bus, Port, Map->Feature);
+ UsbHcClearRootHubPortFeature (HubIf->Device->Bus, Port, (EFI_USB_PORT_FEATURE) Map->Feature);
}
}
}
diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.h b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.h index 0238ea0..a5bcbb2 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.h +++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.h @@ -25,6 +25,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef _USB_HUB_H_
#define _USB_HUB_H_
+#include <IndustryStandard/Usb.h>
+
#define USB_ENDPOINT_ADDR(EpAddr) ((EpAddr) & 0x7F)
#define USB_ENDPOINT_TYPE(Desc) ((Desc)->Attributes & USB_ENDPOINT_TYPE_MASK)
@@ -89,7 +91,7 @@ enum { USB_HUB_SUBCLASS_CODE = 0x00,
- USB_HUB_LOOP = 50,
+ USB_HUB_LOOP = 50
};
#pragma pack(1)
@@ -110,7 +112,7 @@ typedef struct { typedef struct {
UINT16 ChangedBit;
- EFI_USB_PORT_FEATURE Feature;
+ UINT8 Feature;
} USB_CHANGE_FEATURE_MAP;
diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c index 216f948..28d73da 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c +++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c @@ -518,7 +518,7 @@ UsbHcSyncInterruptTransfer ( UsbResult
);
} else {
- IsSlowDevice = (EFI_USB_SPEED_LOW == DevSpeed) ? TRUE : FALSE;
+ IsSlowDevice = (BOOLEAN) ((EFI_USB_SPEED_LOW == DevSpeed) ? TRUE : FALSE);
Status = UsbBus->UsbHc->SyncInterruptTransfer (
UsbBus->UsbHc,
DevAddr,
@@ -634,7 +634,7 @@ UsbOpenHostProtoByChild ( Status = gBS->OpenProtocol (
Bus->HostHandle,
&gEfiUsb2HcProtocolGuid,
- &Usb2Hc,
+ (VOID **) &Usb2Hc,
mUsbBusDriverBinding.DriverBindingHandle,
Child,
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
@@ -644,7 +644,7 @@ UsbOpenHostProtoByChild ( Status = gBS->OpenProtocol (
Bus->HostHandle,
&gEfiUsbHcProtocolGuid,
- &UsbHc,
+ (VOID **) &UsbHc,
mUsbBusDriverBinding.DriverBindingHandle,
Child,
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/usbbus.h b/MdeModulePkg/Bus/Usb/UsbBusDxe/usbbus.h index 2ecc2c8..7407a36 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusDxe/usbbus.h +++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/usbbus.h @@ -83,7 +83,7 @@ enum { USB_BUS_TPL = TPL_NOTIFY,
USB_INTERFACE_SIGNATURE = EFI_SIGNATURE_32 ('U', 'S', 'B', 'I'),
- USB_BUS_SIGNATURE = EFI_SIGNATURE_32 ('U', 'S', 'B', 'B'),
+ USB_BUS_SIGNATURE = EFI_SIGNATURE_32 ('U', 'S', 'B', 'B')
};
#define USB_BIT(a) ((UINTN)(1 << (a)))
@@ -110,7 +110,7 @@ typedef struct _EFI_USB_BUS_PROTOCOL { // Stands for the real USB device. Each device may
// has several seperately working interfaces.
//
-typedef struct _USB_DEVICE {
+struct _USB_DEVICE {
USB_BUS *Bus;
//
@@ -140,12 +140,12 @@ typedef struct _USB_DEVICE { UINT8 ParentAddr;
USB_INTERFACE *ParentIf;
UINT8 ParentPort; // Start at 0
-} USB_DEVICE;
+};
//
// Stands for different functions of USB device
//
-typedef struct _USB_INTERFACE {
+struct _USB_INTERFACE {
UINTN Signature;
USB_DEVICE *Device;
USB_INTERFACE_DESC *IfDesc;
@@ -179,12 +179,12 @@ typedef struct _USB_INTERFACE { // connected to EHCI.
//
UINT8 MaxSpeed;
-} USB_INTERFACE;
+};
//
// Stands for the current USB Bus
//
-typedef struct _USB_BUS {
+struct _USB_BUS {
UINTN Signature;
EFI_USB_BUS_PROTOCOL BusId;
@@ -201,7 +201,7 @@ typedef struct _USB_BUS { // for root hub. Device with address i is at Devices[i].
//
USB_DEVICE *Devices[USB_MAX_DEVICES];
-} USB_BUS;
+};
extern EFI_USB_IO_PROTOCOL mUsbIoProtocol;
extern EFI_DRIVER_BINDING_PROTOCOL mUsbBusDriverBinding;
|