From 112c6c22376267a79f4a4ac0c4263bf24a548d81 Mon Sep 17 00:00:00 2001 From: Udit Kumar Date: Wed, 13 Jun 2018 01:44:09 +0530 Subject: [PATCH] ArmPlatformPkg: Include PL011UartClock Lib This patch gets PL011 baud rate clock from pl011 uart clock lib instead of Pcd. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Udit Kumar Reviewed-by: Ard Biesheuvel --- .../Library/PL011SerialPortLib/PL011SerialPortLib.c | 5 +++-- .../Library/PL011SerialPortLib/PL011SerialPortLib.inf | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortLib.c b/ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortLib.c index 6aa80631bb..212991d638 100644 --- a/ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortLib.c +++ b/ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortLib.c @@ -19,6 +19,7 @@ #include #include +#include #include #include @@ -48,7 +49,7 @@ SerialPortInitialize ( return PL011UartInitializePort ( (UINTN)FixedPcdGet64 (PcdSerialRegisterBase), - FixedPcdGet32 (PL011UartClkInHz), + PL011UartClockGetFreq(), &BaudRate, &ReceiveFifoDepth, &Parity, @@ -156,7 +157,7 @@ SerialPortSetAttributes ( { return PL011UartInitializePort ( (UINTN)FixedPcdGet64 (PcdSerialRegisterBase), - FixedPcdGet32 (PL011UartClkInHz), + PL011UartClockGetFreq(), BaudRate, ReceiveFifoDepth, Parity, diff --git a/ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortLib.inf b/ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortLib.inf index 3683e06d27..5ce5b2f530 100644 --- a/ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortLib.inf +++ b/ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortLib.inf @@ -26,6 +26,7 @@ PL011SerialPortLib.c [LibraryClasses] + PL011UartClockLib PL011UartLib PcdLib -- 2.39.2