ArmVirtPkg/FdtPL011SerialPortLib: Set the PL011 UART clock rate

The interface to PL011UartInitializePort has changed in
ArmPlatformPkg/Drivers/PL011Uart with the title:
"ArmPlatformPkg: Add support to configure PL011 UART clock"

This patch updates the calls to PL011UartInitializePort(), in line with
that change, adding a parameter value using the PCD previously used
directly by the driver.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
Evan Lloyd 2016-06-15 13:52:42 +01:00 committed by Ard Biesheuvel
parent f63005282c
commit 090916d8bc
4 changed files with 17 additions and 3 deletions

View File

@ -112,7 +112,13 @@ SerialPortGetBaseAddress (
Status = PL011UartInitializePort ( Status = PL011UartInitializePort (
UartBase, UartBase,
&BaudRate, &ReceiveFifoDepth, &Parity, &DataBits, &StopBits); FixedPcdGet32 (PL011UartClkInHz),
&BaudRate,
&ReceiveFifoDepth,
&Parity,
&DataBits,
&StopBits
);
if (!EFI_ERROR (Status)) { if (!EFI_ERROR (Status)) {
return UartBase; return UartBase;
} }

View File

@ -44,3 +44,4 @@
gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits
gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity
gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits
gArmPlatformTokenSpaceGuid.PL011UartClkInHz

View File

@ -81,8 +81,14 @@ FdtPL011SerialPortLibInitialize (
StopBits = (EFI_STOP_BITS_TYPE) PcdGet8 (PcdUartDefaultStopBits); StopBits = (EFI_STOP_BITS_TYPE) PcdGet8 (PcdUartDefaultStopBits);
return PL011UartInitializePort ( return PL011UartInitializePort (
mSerialBaseAddress, &BaudRate, &ReceiveFifoDepth, mSerialBaseAddress,
&Parity, &DataBits, &StopBits); FixedPcdGet32 (PL011UartClkInHz),
&BaudRate,
&ReceiveFifoDepth,
&Parity,
&DataBits,
&StopBits
);
} }
/** /**

View File

@ -43,6 +43,7 @@
gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits
gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity
gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits
gArmPlatformTokenSpaceGuid.PL011UartClkInHz
[Guids] [Guids]
gEarlyPL011BaseAddressGuid gEarlyPL011BaseAddressGuid