You've already forked edk2-platforms
mirror of
https://github.com/Dasharo/edk2-platforms.git
synced 2026-03-06 14:51:43 -08:00
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>
68 lines
2.4 KiB
INI
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
|