From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=92.121.34.21; helo=inva021.nxp.com; envelope-from=udit.kumar@nxp.com; receiver=edk2-devel@lists.01.org Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id E145A2110D503 for ; Tue, 5 Jun 2018 23:03:34 -0700 (PDT) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id A683D2000D8; Wed, 6 Jun 2018 08:03:32 +0200 (CEST) Received: from smtp.na-rdc02.nxp.com (inv1260.us-phx01.nxp.com [134.27.49.11]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 70D5A20009A; Wed, 6 Jun 2018 08:03:32 +0200 (CEST) Received: from az84smr01.freescale.net (az84smr01.freescale.net [10.64.34.197]) by inv1260.na-rdc02.nxp.com (Postfix) with ESMTP id 2FE8440A6F; Tue, 5 Jun 2018 23:03:32 -0700 (MST) Received: from uefi-OptiPlex-790.ap.freescale.net ([10.232.132.56]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id w5663ORI005217; Tue, 5 Jun 2018 23:03:30 -0700 From: Udit Kumar To: ard.biesheuvel@linaro.org, leif.lindholm@linaro.org, edk2-devel@lists.01.org Date: Tue, 5 Jun 2018 23:29:55 +0530 Message-Id: <1528221595-22145-3-git-send-email-udit.kumar@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1528221595-22145-1-git-send-email-udit.kumar@nxp.com> References: <1528221595-22145-1-git-send-email-udit.kumar@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [PATCH 2/2] ArmPlatformPkg: Include PL011UartClock Lib X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jun 2018 06:03:35 -0000 This patch includes, PL011UartClock lib. In case of no implemenation of this Clock Lib, Pcd value will be used for PL011 frequency. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Udit Kumar --- 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..c73e8db 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), + ArmPlatformGetPL011ClockFreq(), &BaudRate, &ReceiveFifoDepth, &Parity, @@ -156,7 +157,7 @@ SerialPortSetAttributes ( { return PL011UartInitializePort ( (UINTN)FixedPcdGet64 (PcdSerialRegisterBase), - FixedPcdGet32 (PL011UartClkInHz), + ArmPlatformGetPL011ClockFreq(), 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