summaryrefslogtreecommitdiff
path: root/EdkModulePkg/Bus/Pci/IdeBus
diff options
context:
space:
mode:
authorxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>2007-01-25 06:15:58 +0000
committerxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>2007-01-25 06:15:58 +0000
commit1cc8ee7861a59532700a6fd1255689576eda0f52 (patch)
tree7708d058115302ba08d7879965e8864467958e93 /EdkModulePkg/Bus/Pci/IdeBus
parent582510249f2fb1334e507b99421b9485f6b89159 (diff)
downloadedk2-platforms-1cc8ee7861a59532700a6fd1255689576eda0f52.tar.xz
Partially make EdkModulePkg pass intel IPF compiler with /W4 /WX switched on.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2313 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkModulePkg/Bus/Pci/IdeBus')
-rw-r--r--EdkModulePkg/Bus/Pci/IdeBus/Dxe/DriverConfiguration.c3
-rw-r--r--EdkModulePkg/Bus/Pci/IdeBus/Dxe/ata.c2
-rw-r--r--EdkModulePkg/Bus/Pci/IdeBus/Dxe/atapi.c15
-rw-r--r--EdkModulePkg/Bus/Pci/IdeBus/Dxe/ide.c1
-rw-r--r--EdkModulePkg/Bus/Pci/IdeBus/Dxe/idebus.c10
5 files changed, 12 insertions, 19 deletions
diff --git a/EdkModulePkg/Bus/Pci/IdeBus/Dxe/DriverConfiguration.c b/EdkModulePkg/Bus/Pci/IdeBus/Dxe/DriverConfiguration.c
index 75794f8125..6a05562a17 100644
--- a/EdkModulePkg/Bus/Pci/IdeBus/Dxe/DriverConfiguration.c
+++ b/EdkModulePkg/Bus/Pci/IdeBus/Dxe/DriverConfiguration.c
@@ -64,6 +64,7 @@ EFI_DRIVER_CONFIGURATION_PROTOCOL gIDEBusDriverConfiguration = {
@retval EFI_NOT_FOUND TODO: Add description for return value
**/
+STATIC
EFI_STATUS
GetResponse (
VOID
@@ -190,7 +191,7 @@ IDEBusDriverConfigurationSetOptions (
}
if (!EFI_ERROR (Status)) {
- NewValue |= (UINT8) (1 << Index);
+ NewValue = (UINT8) (NewValue | (1 << Index));
}
}
diff --git a/EdkModulePkg/Bus/Pci/IdeBus/Dxe/ata.c b/EdkModulePkg/Bus/Pci/IdeBus/Dxe/ata.c
index 3273380da0..7ea54b9a4f 100644
--- a/EdkModulePkg/Bus/Pci/IdeBus/Dxe/ata.c
+++ b/EdkModulePkg/Bus/Pci/IdeBus/Dxe/ata.c
@@ -2073,7 +2073,7 @@ AtaCommandIssue (
Lba1 = (UINT8) RShiftU64 (LbaAddress, 8);
Lba2 = (UINT8) RShiftU64 (LbaAddress, 16);
Lba3 = (UINT8) RShiftU64 (LbaAddress, 24);
- Device |= Lba3;
+ Device = (UINT8) (Device | Lba3);
//
// Pass parameter into device register block
diff --git a/EdkModulePkg/Bus/Pci/IdeBus/Dxe/atapi.c b/EdkModulePkg/Bus/Pci/IdeBus/Dxe/atapi.c
index a54acf6994..93f7081516 100644
--- a/EdkModulePkg/Bus/Pci/IdeBus/Dxe/atapi.c
+++ b/EdkModulePkg/Bus/Pci/IdeBus/Dxe/atapi.c
@@ -714,11 +714,6 @@ PioReadWriteData (
UINT16 *PtrBuffer;
//
- // containing status byte read from Status Register.
- //
- UINT8 StatusRegister;
-
- //
// No data transfer is premitted.
//
if (ByteCount == 0) {
@@ -750,16 +745,14 @@ PioReadWriteData (
//
// read Status Register will clear interrupt
//
- StatusRegister = IDEReadPortB (IdeDev->PciIo, IdeDev->IoPort->Reg.Status);
+ IDEReadPortB (IdeDev->PciIo, IdeDev->IoPort->Reg.Status);
//
// get current data transfer size from Cylinder Registers.
//
- WordCount =
- (
- (IDEReadPortB (IdeDev->PciIo, IdeDev->IoPort->CylinderMsb) << 8) |
- IDEReadPortB (IdeDev->PciIo, IdeDev->IoPort->CylinderLsb)
- ) & 0xffff;
+ WordCount = IDEReadPortB (IdeDev->PciIo, IdeDev->IoPort->CylinderMsb) << 8;
+ WordCount = WordCount | IDEReadPortB (IdeDev->PciIo, IdeDev->IoPort->CylinderLsb);
+ WordCount = WordCount & 0xffff;
WordCount /= 2;
WordCount = EFI_MIN (WordCount, (RequiredWordCount - ActualWordCount));
diff --git a/EdkModulePkg/Bus/Pci/IdeBus/Dxe/ide.c b/EdkModulePkg/Bus/Pci/IdeBus/Dxe/ide.c
index 0b28c57a03..14cdb251bb 100644
--- a/EdkModulePkg/Bus/Pci/IdeBus/Dxe/ide.c
+++ b/EdkModulePkg/Bus/Pci/IdeBus/Dxe/ide.c
@@ -236,6 +236,7 @@ IDEWritePortWMultiple (
TODO: add return values
**/
+STATIC
BOOLEAN
BadIdeDeviceCheck (
IN IDE_BLK_IO_DEV *IdeDev
diff --git a/EdkModulePkg/Bus/Pci/IdeBus/Dxe/idebus.c b/EdkModulePkg/Bus/Pci/IdeBus/Dxe/idebus.c
index c0cec601b8..fd04b67216 100644
--- a/EdkModulePkg/Bus/Pci/IdeBus/Dxe/idebus.c
+++ b/EdkModulePkg/Bus/Pci/IdeBus/Dxe/idebus.c
@@ -189,7 +189,6 @@ IDEBusDriverBindingStart (
EFI_IDE_CONTROLLER_INIT_PROTOCOL *IdeInit;
BOOLEAN EnumAll;
BOOLEAN ChannelEnabled;
- UINT8 ChannelCount;
UINT8 MaxDevices;
EFI_IDENTIFY_DATA IdentifyData;
EFI_ATA_COLLECTIVE_MODE *SupportedModes;
@@ -239,10 +238,9 @@ IDEBusDriverBindingStart (
}
//
- // Save Enumall and ChannelCount. Step7.2
+ // Save Enumall. Step7.2
//
EnumAll = IdeInit->EnumAll;
- ChannelCount = IdeInit->ChannelCount;
//
// Consume PCI I/O protocol. Note that the OpenProtocol with _GET_PROTOCOL
@@ -453,8 +451,8 @@ IDEBusDriverBindingStart (
ZeroMem (IdeBlkIoDevicePtr, sizeof (IDE_BLK_IO_DEV));
IdeBlkIoDevicePtr->Signature = IDE_BLK_IO_DEV_SIGNATURE;
- IdeBlkIoDevicePtr->Channel = IdeChannel;
- IdeBlkIoDevicePtr->Device = IdeDevice;
+ IdeBlkIoDevicePtr->Channel = (EFI_IDE_CHANNEL) IdeChannel;
+ IdeBlkIoDevicePtr->Device = (EFI_IDE_DEVICE) IdeDevice;
//
// initialize Block IO interface's Media pointer
@@ -666,7 +664,7 @@ IDEBusDriverBindingStart (
//
// Record PIO mode used in private data
//
- IdeBlkIoDevicePtr->PioMode = SupportedModes->PioMode.Mode;
+ IdeBlkIoDevicePtr->PioMode = (ATA_PIO_MODE) SupportedModes->PioMode.Mode;
//
// Set IDE controller Timing Blocks in the PCI Configuration Space