Files
edk2-platforms/Platform/RaspberryPi/Library/DualSerialPortLib/DualSerialPortDxeLib.inf
Ard Biesheuvel 644e223bb3 Platform/RaspberryPi: create DXE phase SerialPortLib version for RPi3
The Raspberry Pi 3 derives its 16550 baud clock from the variable core
clock, and so any reprogramming of the baud rate needs to take the
actual core clock value into account.

Introduce a DXE phase version of DualSerialPortLib that discovers this
value in its constructor, using the RPi firmware protocol, and wire it
up for the RPi3 platform.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
Reviewed-by: Pete Batard <pete@akeo.ie>
Tested-by: Pete Batard <pete@akeo.ie>
2020-05-06 18:15:29 +02:00

68 lines
2.4 KiB
INI

## @file
#
# DXE phase SerialPortLib instance for both PL011 and 16550 UART.
#
# Copyright (c) 2020, Pete Batard <pete@akeo.ie>
# Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
[Defines]
INF_VERSION = 1.27
BASE_NAME = DualSerialPortDxeLib
FILE_GUID = d586667e-ec50-4bf6-9701-fb4e29055a60
MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 1.0
LIBRARY_CLASS = SerialPortLib|DXE_DRIVER
CONSTRUCTOR = DualSerialPortDxeLibConstructor
[Packages]
ArmPlatformPkg/ArmPlatformPkg.dec
MdeModulePkg/MdeModulePkg.dec
MdePkg/MdePkg.dec
Platform/RaspberryPi/RaspberryPi.dec
Silicon/Broadcom/Bcm283x/Bcm283x.dec
[LibraryClasses]
IoLib
PcdLib
PL011UartClockLib
PL011UartLib
[Sources]
DualSerialPortLib.c
DualSerialPortLib.h
DualSerialPortLibCommon.c
DualSerialPortLibConstructor.c
[Pcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterAccessWidth ## SOMETIMES_CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseMmio ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseHardwareFlowControl ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialDetectCable ## SOMETIMES_CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialBaudRate ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialLineControl ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialFifoControl ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialPciDeviceInfo ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialExtendedTxFifoSize ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterStride ## CONSUMES
[FixedPcd]
gArmPlatformTokenSpaceGuid.PL011UartClkInHz
gBcm283xTokenSpaceGuid.PcdBcm283xRegistersAddress
gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate
gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits
gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity
gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits
[Protocols]
gRaspberryPiFirmwareProtocolGuid ## CONSUMES
[PatchPcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialClockRate ## CONSUMES
[Depex]
gRaspberryPiFirmwareProtocolGuid