From: Udit Kumar <udit.kumar@nxp.com>
To: ard.biesheuvel@linaro.org, leif.lindholm@linaro.org,
edk2-devel@lists.01.org
Subject: [PATCH v3 2/2] ArmPlatformPkg: Include PL011UartClock Lib
Date: Wed, 13 Jun 2018 01:44:09 +0530 [thread overview]
Message-ID: <1528834449-12726-3-git-send-email-udit.kumar@nxp.com> (raw)
In-Reply-To: <1528834449-12726-1-git-send-email-udit.kumar@nxp.com>
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>
---
ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortLib.c | 5 +++--
ArmPlatformPkg/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 6aa8063..212991d 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 3683e06..5ce5b2f 100644
--- a/ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortLib.inf
+++ b/ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortLib.inf
@@ -26,6 +26,7 @@
PL011SerialPortLib.c
[LibraryClasses]
+ PL011UartClockLib
PL011UartLib
PcdLib
--
1.9.1
next prev parent reply other threads:[~2018-06-13 8:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-12 20:14 [PATCH v3 0/2] ArmPlatformPkg: PL011 Dynamic clock freq Support Udit Kumar
2018-06-12 20:14 ` [PATCH v3 1/2] " Udit Kumar
2018-06-12 20:14 ` Udit Kumar [this message]
2018-06-15 10:58 ` [PATCH v3 2/2] ArmPlatformPkg: Include PL011UartClock Lib Ard Biesheuvel
2018-06-13 9:49 ` [PATCH v3 0/2] ArmPlatformPkg: PL011 Dynamic clock freq Support Ard Biesheuvel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1528834449-12726-3-git-send-email-udit.kumar@nxp.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox