Set UART receive FIFO depth with PCD instead of fixed number "1". The default value of PCD is also 1, so it makes no difference for platforms which do not explicitly set this PCD.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Heyi Guo <heyi....@linaro.org> Cc: Feng Tian <feng.t...@intel.com> Cc: Star Zeng <star.z...@intel.com> --- MdeModulePkg/Universal/SerialDxe/SerialDxe.inf | 9 +++++---- MdeModulePkg/Universal/SerialDxe/SerialIo.c | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/MdeModulePkg/Universal/SerialDxe/SerialDxe.inf b/MdeModulePkg/Universal/SerialDxe/SerialDxe.inf index 164060b..a1453bd 100644 --- a/MdeModulePkg/Universal/SerialDxe/SerialDxe.inf +++ b/MdeModulePkg/Universal/SerialDxe/SerialDxe.inf @@ -41,10 +41,11 @@ gEfiDevicePathProtocolGuid ## PRODUCES [Pcd] - gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate ## CONSUMES - gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits ## CONSUMES - gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity ## CONSUMES - gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits ## CONSUMES + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate ## CONSUMES + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits ## CONSUMES + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity ## CONSUMES + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits ## CONSUMES + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultReceiveFifoDepth ## CONSUMES [Depex] TRUE diff --git a/MdeModulePkg/Universal/SerialDxe/SerialIo.c b/MdeModulePkg/Universal/SerialDxe/SerialIo.c index f5b3064..d2383e5 100644 --- a/MdeModulePkg/Universal/SerialDxe/SerialIo.c +++ b/MdeModulePkg/Universal/SerialDxe/SerialIo.c @@ -236,7 +236,7 @@ SerialReset ( // // Set the Serial I/O mode // - This->Mode->ReceiveFifoDepth = 1; + This->Mode->ReceiveFifoDepth = PcdGet16 (PcdUartDefaultReceiveFifoDepth); This->Mode->Timeout = 1000 * 1000; This->Mode->BaudRate = PcdGet64 (PcdUartDefaultBaudRate); This->Mode->DataBits = (UINT32) PcdGet8 (PcdUartDefaultDataBits); @@ -508,6 +508,7 @@ SerialDxeInitialize ( mSerialIoMode.DataBits = (UINT32) PcdGet8 (PcdUartDefaultDataBits); mSerialIoMode.Parity = (UINT32) PcdGet8 (PcdUartDefaultParity); mSerialIoMode.StopBits = (UINT32) PcdGet8 (PcdUartDefaultStopBits); + mSerialIoMode.ReceiveFifoDepth = PcdGet16 (PcdUartDefaultReceiveFifoDepth); mSerialDevicePath.Uart.BaudRate = PcdGet64 (PcdUartDefaultBaudRate); mSerialDevicePath.Uart.DataBits = PcdGet8 (PcdUartDefaultDataBits); mSerialDevicePath.Uart.Parity = PcdGet8 (PcdUartDefaultParity); -- 2.7.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel