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 8FF04213281E2 for ; Wed, 13 Jun 2018 01:17:54 -0700 (PDT) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 4903420018E; Wed, 13 Jun 2018 10:17:53 +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 146652001A8; Wed, 13 Jun 2018 10:17:53 +0200 (CEST) Received: from az84smr01.freescale.net (az84smr01.freescale.net [10.64.34.197]) by inv1260.na-rdc02.nxp.com (Postfix) with ESMTP id C9C5440C72; Wed, 13 Jun 2018 01:17:52 -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 w5D8HkLQ003760; Wed, 13 Jun 2018 01:17:51 -0700 From: Udit Kumar To: ard.biesheuvel@linaro.org, leif.lindholm@linaro.org, edk2-devel@lists.01.org Date: Wed, 13 Jun 2018 01:44:09 +0530 Message-Id: <1528834449-12726-3-git-send-email-udit.kumar@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1528834449-12726-1-git-send-email-udit.kumar@nxp.com> References: <1528834449-12726-1-git-send-email-udit.kumar@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [PATCH v3 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, 13 Jun 2018 08:17:54 -0000 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 --- 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 #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 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