From 19bf20e11acd88a02922201f97e6d64edcd16390 Mon Sep 17 00:00:00 2001 From: lgao4 Date: Tue, 21 Jul 2009 07:57:29 +0000 Subject: Clean up code git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8975 6f19259b-4bc3-4df7-8a09-765794883524 --- IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/IsaSerialDxe.inf | 2 -- IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.c | 11 +++-------- IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.h | 1 - 3 files changed, 3 insertions(+), 11 deletions(-) (limited to 'IntelFrameworkModulePkg/Bus') diff --git a/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/IsaSerialDxe.inf b/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/IsaSerialDxe.inf index 3429b8f8b8..81f02ecd10 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/IsaSerialDxe.inf +++ b/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/IsaSerialDxe.inf @@ -39,7 +39,6 @@ [Packages] MdePkg/MdePkg.dec - MdeModulePkg/MdeModulePkg.dec IntelFrameworkPkg/IntelFrameworkPkg.dec IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec @@ -51,7 +50,6 @@ BaseMemoryLib DevicePathLib UefiLib - BaseLib UefiDriverEntryPoint DebugLib diff --git a/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.c b/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.c index 4a86257e73..cf895c8802 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.c +++ b/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.c @@ -882,7 +882,7 @@ IsaSerialReceiveTransmit ( // TimeOut = 0; Msr.Data = READ_MSR (SerialDevice->IsaIo, SerialDevice->BaseAddress); - while (Msr.Bits.Dcd == 1 && (!Msr.Bits.Cts ^ FeaturePcdGet(PcdIsaBusSerialUseHalfHandshake))) { + while ((Msr.Bits.Dcd == 1) && ((Msr.Bits.Cts == 0) || FeaturePcdGet(PcdIsaBusSerialUseHalfHandshake))) { gBS->Stall (TIMEOUT_STALL_INTERVAL); TimeOut++; if (TimeOut > 5) { @@ -892,7 +892,7 @@ IsaSerialReceiveTransmit ( Msr.Data = READ_MSR (SerialDevice->IsaIo, SerialDevice->BaseAddress); } - if (Msr.Bits.Dcd== 0 || (Msr.Bits.Cts ^ FeaturePcdGet(PcdIsaBusSerialUseHalfHandshake))) { + if ((Msr.Bits.Dcd == 0) && ((Msr.Bits.Cts == 1) || FeaturePcdGet(PcdIsaBusSerialUseHalfHandshake))) { IsaSerialFifoRemove (&SerialDevice->Transmit, &Data); WRITE_THR (SerialDevice->IsaIo, SerialDevice->BaseAddress, Data); } @@ -1188,12 +1188,7 @@ IsaSerialSetAttributes ( if ((StopBits < OneStopBit) || (StopBits > TwoStopBits)) { return EFI_INVALID_PARAMETER; } - // - // for DataBits = 5, StopBits can not set TwoStopBits - // - // if ((DataBits == 5) && (StopBits == TwoStopBits)) { - // return EFI_INVALID_PARAMETER; - // } + // // for DataBits = 6,7,8, StopBits can not set OneFiveStopBits // diff --git a/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.h b/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.h index 68569991bc..deb7926526 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.h +++ b/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.h @@ -24,7 +24,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include -#include #include #include #include -- cgit v1.2.3