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::242; helo=mail-io0-x242.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-io0-x242.google.com (mail-io0-x242.google.com [IPv6:2607:f8b0:4001:c06::242]) (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 7319A210C6681 for ; Tue, 5 Jun 2018 05:24:36 -0700 (PDT) Received: by mail-io0-x242.google.com with SMTP id l19-v6so3087214ioj.5 for ; Tue, 05 Jun 2018 05:24:36 -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=6Dd5mOKZ0uNzrpjP049GpeBu25oZEoXA0oiTsDBEFus=; b=jP5hRdOguPB5h77VWs+ahWq44NCiIs18B/teBDuAY9D36UcqVVQFOEOzMQrsqrfAlg B2tUr7eUm1X7UNlA037hi5DzDwxJyivVwP+YdCUoRa7PEboK7lyCnx8mDJUFFY6uypd2 t/fy4cYLbM3HJJJynhwaGOkCK3ng6k5AheeZw= 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=6Dd5mOKZ0uNzrpjP049GpeBu25oZEoXA0oiTsDBEFus=; b=SM9GlldTullynGE79REZwftSQvo1ftmlhFIlnPVXbDQ+cVd67epLt8TcAe6NIMG1Da gpX8OL2X9PzKKGkm+xgl11pK06b7Z/gkYZbjEdxgUSe8NEit21nU1V3JOf0GHwh5ysWl iZkX8sYi7eikoYarcZCsxmsFYuJr+H+PHQj7Z6INo5/fuB5gXy83rIFH5RdQ+SR0gph8 d7GulrNRWU5rZoxGPCo9vToo/rarEjjXLXRHyBsOMlye6yGtcUaqUD7Awk8PZ3JfMQAn MFoC/gW58Rw6KYOEIub2o6Ttbhen6kOnyIoTjrZZPGjV3d6EBFMsMuw/SdS7cCP2gcgc 6Blw== X-Gm-Message-State: APt69E3x5FsOIG24bk/7pKg5qe1LZPN//IsDTKtlt0xtn/kaFSLyQ3Nc c4sjl3R+HjNuRZlcoQu4C5hIHz+WQeIk6xWnlKcLyg== X-Google-Smtp-Source: ADUXVKKwYqVezpJmShMTYNwSAaOrXjJ9l0eM3HS3fMdpFwmzio3AQOYjeQXy549OwrN8fAEJb5f8A6YLeXs2RSIhzcc= X-Received: by 2002:a6b:6709:: with SMTP id b9-v6mr24598258ioc.170.1528201475743; Tue, 05 Jun 2018 05:24:35 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a6b:bb86:0:0:0:0:0 with HTTP; Tue, 5 Jun 2018 05:24:35 -0700 (PDT) In-Reply-To: <1528155339-5050-2-git-send-email-udit.kumar@nxp.com> References: <1528155339-5050-1-git-send-email-udit.kumar@nxp.com> <1528155339-5050-2-git-send-email-udit.kumar@nxp.com> From: Ard Biesheuvel Date: Tue, 5 Jun 2018 14:24:35 +0200 Message-ID: To: Udit Kumar Cc: "edk2-devel@lists.01.org" , Leif Lindholm Subject: Re: [PATCH 2/2] ArmPlatformPkg: Include ArmPlatformClock 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: Tue, 05 Jun 2018 12:24:36 -0000 Content-Type: text/plain; charset="UTF-8" On 5 June 2018 at 01:35, Udit Kumar wrote: > This patch includes, ArmPlatformClock in PL011 lib. > > In case of NULL implemenation of 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 | 7 +++++-- > ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortLib.inf | 1 + > 2 files changed, 6 insertions(+), 2 deletions(-) > > diff --git a/ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortLib.c b/ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortLib.c > index 6aa8063..40fa50a 100644 > --- a/ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortLib.c > +++ b/ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortLib.c > @@ -17,11 +17,14 @@ > > #include > > +#include > #include > #include > #include > #include > > + > + Spurious whitespace changes > /** Initialise the serial device hardware with default settings. > > @retval RETURN_SUCCESS The serial device was initialised. > @@ -48,7 +51,7 @@ SerialPortInitialize ( > > return PL011UartInitializePort ( > (UINTN)FixedPcdGet64 (PcdSerialRegisterBase), > - FixedPcdGet32 (PL011UartClkInHz), > + ArmPlatformGetPL011ClockFreq() ? ArmPlatformGetPL011ClockFreq() : FixedPcdGet32 (PL011UartClkInHz), Get rid of this conditional please > &BaudRate, > &ReceiveFifoDepth, > &Parity, > @@ -156,7 +159,7 @@ SerialPortSetAttributes ( > { > return PL011UartInitializePort ( > (UINTN)FixedPcdGet64 (PcdSerialRegisterBase), > - FixedPcdGet32 (PL011UartClkInHz), > + ArmPlatformGetPL011ClockFreq() ? ArmPlatformGetPL011ClockFreq() : FixedPcdGet32 (PL011UartClkInHz), > BaudRate, > ReceiveFifoDepth, > Parity, > diff --git a/ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortLib.inf b/ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortLib.inf > index 3683e06..9820811 100644 > --- a/ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortLib.inf > +++ b/ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortLib.inf > @@ -26,6 +26,7 @@ > PL011SerialPortLib.c > > [LibraryClasses] > + ArmPlatformClockLib > PL011UartLib > PcdLib > > -- > 1.9.1 >