On 5 June 2018 at 19:59, Udit Kumar <[email protected]> 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 <[email protected]> > --- > 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 <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), > + 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. _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

