diff options
author | Ard Biesheuvel <ard.biesheuvel@arm.com> | 2020-05-05 15:29:29 +0200 |
---|---|---|
committer | Ard Biesheuvel <ard.biesheuvel@arm.com> | 2020-05-06 14:49:14 +0200 |
commit | 3c29ba327dd2bb77af04c35ea02946ac653354ee (patch) | |
tree | cfe7930e146d47bc057f663919a87aba07e429c8 /Platform/RaspberryPi/RPi3 | |
parent | 1301a831554fb49a2843a9a08a985e25cb260aab (diff) |
Platform/RaspberryPi: fix 16550 divisor calculation logic
The 16550 'miniUART' on the Raspberry Pi gets its input clock from
different sources on RPi3 and RPi4. Fix the logic that derives the
divisor for the 16550 baud clock on the respective platforms.
While at it, make the input clock PCD patchable for RPi3 so we can
manipulate it at runtime in a future patch.
Co-authored-by: Pete Batard <pete@akeo.ie>
Co-authored-by: Andrei Warkentin <andrey.warkentin@gmail.com>
Co-authored-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
Signed-off-by: Pete Batard <pete@akeo.ie>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
Reviewed-by: Pete Batard <pete@akeo.ie>
Tested-by: Pete Batard <pete@akeo.ie>
Diffstat (limited to 'Platform/RaspberryPi/RPi3')
-rw-r--r-- | Platform/RaspberryPi/RPi3/RPi3.dsc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Platform/RaspberryPi/RPi3/RPi3.dsc b/Platform/RaspberryPi/RPi3/RPi3.dsc index d7218219..96b27400 100644 --- a/Platform/RaspberryPi/RPi3/RPi3.dsc +++ b/Platform/RaspberryPi/RPi3/RPi3.dsc @@ -409,7 +409,6 @@ gArmPlatformTokenSpaceGuid.PL011UartClkInHz|48000000
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseMmio|TRUE
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterStride|4
- gEfiMdeModulePkgTokenSpaceGuid.PcdSerialClockRate|500000000
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialFifoControl|0x27
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialExtendedTxFifoSize|8
gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|115200
@@ -441,6 +440,9 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVendor|L"EDK2"
gEfiMdeModulePkgTokenSpaceGuid.PcdSetNxForStack|TRUE
+[PcdsPatchableInModule]
+ gEfiMdeModulePkgTokenSpaceGuid.PcdSerialClockRate|250000000
+
[PcdsDynamicHii.common.DEFAULT]
#
|