From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4001:c06::241; helo=mail-io0-x241.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-io0-x241.google.com (mail-io0-x241.google.com [IPv6:2607:f8b0:4001:c06::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id E037B211A45AB for ; Mon, 11 Jun 2018 03:07:28 -0700 (PDT) Received: by mail-io0-x241.google.com with SMTP id l19-v6so23216110ioj.5 for ; Mon, 11 Jun 2018 03:07:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=50QM/xO8pGMvItmRpXe/l2oNo/8fRFluzxiD1oI1PLU=; b=YPB53m62yEq1D28oT5Oj7sF/pefpV6Ugow82vwR/KOYaocinEzS/mPlF4U99TMTPEq c+TWpznMGRjqkvOc1mgek7mli7jwVIRs8HUA4zCwh10VI0tE2mXtb1lKwI+eAkhu3uma cmrgPgEUoqhyBz5dDRANuGyRQITVR6j/qP0vc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=50QM/xO8pGMvItmRpXe/l2oNo/8fRFluzxiD1oI1PLU=; b=Ygji8mWvi/wmwMnUde3mHEiM4FKeAJV6YdK3Z/i4BnFBFZuJUWTh112NCHWlc2htZa q+0jwmKi2isPNZwnvpkiCQkc+3wkx9nYTbpaHAzLnEkWT+nARJ3iN8MyurgWz1TYEGos 8yc5NIWCEwPkOYpoyJNsxZvMdfXAphgeX9ngwBKFOlHY9QDbGy3FYkIypAwAp6UP4snX oYfnGybspzt22SsdMuX/IVNF9hEUIGL3mqFoMxA25vHmaTtMf5ff9UH1TTlzpsF8QS/P 0fwSQcSHLj57RPt6BLCj80BaqPdl+4oihgGyJ51V7xCrLYqdr/UqzxrebGSiqlEyDbVT 71Ug== X-Gm-Message-State: APt69E2rRhznirmibBfuQJHEEmsyBvYH3MLh0UnnqukEupxSlC3ZuLrj 4JaVjZEFXH7L7r2ua+h35cMlGQa04LaZUhIsbDDmuQ== X-Google-Smtp-Source: ADUXVKJFdWUBp8Z2vyLbbB9EDoXb6MIhNsmNp17zkRTD+rJEgXsq5+hw0V/3f5J+QPHl0DEAIbpxTRyN0O9KmFaJUE4= X-Received: by 2002:a6b:dd0b:: with SMTP id f11-v6mr13375506ioc.173.1528711648038; Mon, 11 Jun 2018 03:07:28 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a6b:bbc7:0:0:0:0:0 with HTTP; Mon, 11 Jun 2018 03:07:27 -0700 (PDT) In-Reply-To: <1528221595-22145-3-git-send-email-udit.kumar@nxp.com> References: <1528221595-22145-1-git-send-email-udit.kumar@nxp.com> <1528221595-22145-3-git-send-email-udit.kumar@nxp.com> From: Ard Biesheuvel Date: Mon, 11 Jun 2018 12:07:27 +0200 Message-ID: To: Udit Kumar Cc: Leif Lindholm , "edk2-devel@lists.01.org" Subject: Re: [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: Mon, 11 Jun 2018 10:07:29 -0000 Content-Type: text/plain; charset="UTF-8" On 5 June 2018 at 19:59, Udit Kumar wrote: > This patch includes, PL011UartClock lib. > > In case of no implemenation of this Clock Lib, > Pcd value will be used for PL011 frequency. > Please improve the commit log. You are modifying the code to obtain the PL011 baud clock frequency from a library instead of a 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..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 > You need to add a library resolution to ArmPlatformPkg/ArmPlatformPkg.dsc for this library or you will break the build.