diff options
author | gikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-07-10 07:55:14 +0000 |
---|---|---|
committer | gikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-07-10 07:55:14 +0000 |
commit | 77b91d896f2183906a8e54dd2a82af3a213883be (patch) | |
tree | 98642f62400fb5d68d03e6f45d1219e74f20756d /IntelFrameworkModulePkg/Bus | |
parent | 10c1a4ca0c7190e724b5850d7d2e98605618e32a (diff) | |
download | edk2-platforms-77b91d896f2183906a8e54dd2a82af3a213883be.tar.xz |
Replace Fixed PCD with Feature PCD for useHalfHandshake to reduce code size.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8862 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg/Bus')
3 files changed, 9 insertions, 9 deletions
diff --git a/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/IsaSerialDxe.inf b/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/IsaSerialDxe.inf index 4c8c08fd53..3429b8f8b8 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/IsaSerialDxe.inf +++ b/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/IsaSerialDxe.inf @@ -65,4 +65,6 @@ gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits|8
gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity|1
gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits|1
+
+[FeaturePcd.common]
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdIsaBusSerialUseHalfHandshake|FALSE
diff --git a/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.c b/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.c index c50e532ee3..4a86257e73 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.c +++ b/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.c @@ -83,8 +83,7 @@ SERIAL_DEV gSerialDevTempate = { FALSE,
FALSE,
Uart16550A,
- NULL,
- FixedPcdGetBool (PcdIsaBusSerialUseHalfHandshake) //UseHalfHandshake
+ NULL
};
/**
@@ -807,7 +806,7 @@ IsaSerialReceiveTransmit ( // if receive buffer is available.
//
if (SerialDevice->HardwareFlowControl &&
- !SerialDevice->UseHalfHandshake &&
+ !FeaturePcdGet(PcdIsaBusSerialUseHalfHandshake)&&
!ReceiveFifoFull
) {
Mcr.Data = READ_MCR (SerialDevice->IsaIo, SerialDevice->BaseAddress);
@@ -844,7 +843,7 @@ IsaSerialReceiveTransmit ( // tell the peer to stop sending data.
//
if (SerialDevice->HardwareFlowControl &&
- !SerialDevice->UseHalfHandshake &&
+ !FeaturePcdGet(PcdIsaBusSerialUseHalfHandshake) &&
IsaSerialFifoFull (&SerialDevice->Receive)
) {
Mcr.Data = READ_MCR (SerialDevice->IsaIo, SerialDevice->BaseAddress);
@@ -873,7 +872,7 @@ IsaSerialReceiveTransmit ( //
// For half handshake flow control assert RTS before sending.
//
- if (SerialDevice->UseHalfHandshake) {
+ if (FeaturePcdGet(PcdIsaBusSerialUseHalfHandshake)) {
Mcr.Data = READ_MCR (SerialDevice->IsaIo, SerialDevice->BaseAddress);
Mcr.Bits.Rts= 0;
WRITE_MCR (SerialDevice->IsaIo, SerialDevice->BaseAddress, Mcr.Data);
@@ -883,7 +882,7 @@ IsaSerialReceiveTransmit ( //
TimeOut = 0;
Msr.Data = READ_MSR (SerialDevice->IsaIo, SerialDevice->BaseAddress);
- while (Msr.Bits.Dcd == 1 && (!Msr.Bits.Cts ^ SerialDevice->UseHalfHandshake)) {
+ while (Msr.Bits.Dcd == 1 && (!Msr.Bits.Cts ^ FeaturePcdGet(PcdIsaBusSerialUseHalfHandshake))) {
gBS->Stall (TIMEOUT_STALL_INTERVAL);
TimeOut++;
if (TimeOut > 5) {
@@ -893,7 +892,7 @@ IsaSerialReceiveTransmit ( Msr.Data = READ_MSR (SerialDevice->IsaIo, SerialDevice->BaseAddress);
}
- if (Msr.Bits.Dcd== 0 || (Msr.Bits.Cts ^ SerialDevice->UseHalfHandshake)) {
+ if (Msr.Bits.Dcd== 0 || (Msr.Bits.Cts ^ FeaturePcdGet(PcdIsaBusSerialUseHalfHandshake))) {
IsaSerialFifoRemove (&SerialDevice->Transmit, &Data);
WRITE_THR (SerialDevice->IsaIo, SerialDevice->BaseAddress, Data);
}
@@ -901,7 +900,7 @@ IsaSerialReceiveTransmit ( //
// For half handshake flow control, tell DCE we are done.
//
- if (SerialDevice->UseHalfHandshake) {
+ if (FeaturePcdGet(PcdIsaBusSerialUseHalfHandshake)) {
Mcr.Data = READ_MCR (SerialDevice->IsaIo, SerialDevice->BaseAddress);
Mcr.Bits.Rts = 1;
WRITE_MCR (SerialDevice->IsaIo, SerialDevice->BaseAddress, Mcr.Data);
diff --git a/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.h b/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.h index 8d985a408f..c7f2105f62 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.h +++ b/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.h @@ -109,7 +109,6 @@ typedef struct { BOOLEAN HardwareFlowControl;
EFI_UART_TYPE Type;
EFI_UNICODE_STRING_TABLE *ControllerNameTable;
- BOOLEAN UseHalfHandshake;
} SERIAL_DEV;
#define SERIAL_DEV_FROM_THIS(a) CR (a, SERIAL_DEV, SerialIo, SERIAL_DEV_SIGNATURE)
|