summaryrefslogtreecommitdiffstats
path: root/ArmPlatformPkg
diff options
context:
space:
mode:
authorUdit Kumar <udit.kumar@nxp.com>2018-06-13 01:44:09 +0530
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2018-06-15 12:57:13 +0200
commit112c6c22376267a79f4a4ac0c4263bf24a548d81 (patch)
tree4c0c44e76b058fc79c5f6e5d46eb6f223e656a34 /ArmPlatformPkg
parent0c805f4f8fe705d7c40c32afb2d09a26bc956ee1 (diff)
downloadedk2-112c6c22376267a79f4a4ac0c4263bf24a548d81.tar.gz
edk2-112c6c22376267a79f4a4ac0c4263bf24a548d81.tar.bz2
edk2-112c6c22376267a79f4a4ac0c4263bf24a548d81.zip
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 <udit.kumar@nxp.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Diffstat (limited to 'ArmPlatformPkg')
-rw-r--r--ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortLib.c5
-rw-r--r--ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortLib.inf1
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 <Library/IoLib.h>
#include <Library/PcdLib.h>
+#include <Library/PL011UartClockLib.h>
#include <Library/PL011UartLib.h>
#include <Library/SerialPortLib.h>
@@ -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