diff options
author | Heyi Guo <heyi.guo@linaro.org> | 2016-03-17 22:36:53 +0800 |
---|---|---|
committer | Ruiyu Ni <ruiyu.ni@intel.com> | 2016-03-29 15:00:30 +0800 |
commit | f423d76021df725814a9bebcfeeb8cf57e3c8beb (patch) | |
tree | 66fd143637b14af6a578cdd9ef0e4c58e602c88d /MdeModulePkg | |
parent | 077af17ad029c326f755c1b44c158e9f75ba0064 (diff) | |
download | edk2-f423d76021df725814a9bebcfeeb8cf57e3c8beb.zip edk2-f423d76021df725814a9bebcfeeb8cf57e3c8beb.tar.gz edk2-f423d76021df725814a9bebcfeeb8cf57e3c8beb.tar.bz2 |
MdeModulePkg/SerialDxe: Set FIFO depth with PCD
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.guo@linaro.org>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Universal/SerialDxe/SerialDxe.inf | 9 | ||||
-rw-r--r-- | 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);
|