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
This commit is contained in:
vanjeff
2007-07-17 01:48:09 +00:00
parent 0c1f1ad1e9
commit c52fa98ca9
40 changed files with 230 additions and 244 deletions

View File

@@ -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
};
//

View File

@@ -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)) {

View File

@@ -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 (

View File

@@ -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);
}
}
}

View File

@@ -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;

View File

@@ -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

View File

@@ -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;