From: Sami Mujawar sami.mujawar@arm.com
The generic PL011 driver has been updated to allow for UARTs on a board having different clock sources (as is the case on Juno). See "ArmPlatformPkg: Add support to configure PL011 UART clock"
This change modifies the Juno code to use the new driver options. By replacing Pl011UartInteger with Pl011UartClKInHz, the driver can be used with different serial ports. This replaces an erroneous calculated value with a TRM defined clock rate.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Sami Mujawar sami.mujawar@arm.com Signed-off-by: Evan Lloyd evan.lloyd@arm.com ---
Notes: PL011_v2: - Commit message updated to clarify [Ryan Harking]
PL011_v3: - No code update, just adding a link for Leif [Leif Lindholm]
Code available at: https://github.com/EvanLloyd/OpenPlatformPkg/tree/PL011_v3
Platforms/ARM/Juno/ArmJuno.dsc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/Platforms/ARM/Juno/ArmJuno.dsc b/Platforms/ARM/Juno/ArmJuno.dsc index 3626dfb6e5834f36d136214550ecfde7ed41e4e5..490e08eb9248a4c63ae4580a55037624be435d6c 100644 --- a/Platforms/ARM/Juno/ArmJuno.dsc +++ b/Platforms/ARM/Juno/ArmJuno.dsc @@ -122,8 +122,7 @@ [PcdsFixedAtBuild.common] gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x7FF80000 gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|115200 gEfiMdePkgTokenSpaceGuid.PcdUartDefaultReceiveFifoDepth|0 - gArmPlatformTokenSpaceGuid.PL011UartInteger|4 - gArmPlatformTokenSpaceGuid.PL011UartFractional|0 + gArmPlatformTokenSpaceGuid.PL011UartClkInHz|7372800 gArmPlatformTokenSpaceGuid.PL011UartInterrupt|115
## PL031 RealTimeClock
On 29 June 2016 at 18:44, evan.lloyd@arm.com wrote:
From: Sami Mujawar sami.mujawar@arm.com
The generic PL011 driver has been updated to allow for UARTs on a board having different clock sources (as is the case on Juno). See "ArmPlatformPkg: Add support to configure PL011 UART clock"
This change modifies the Juno code to use the new driver options. By replacing Pl011UartInteger with Pl011UartClKInHz, the driver can be used with different serial ports. This replaces an erroneous calculated value with a TRM defined clock rate.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Sami Mujawar sami.mujawar@arm.com Signed-off-by: Evan Lloyd evan.lloyd@arm.com
Reviewed-by: Ryan Harkin ryan.harkin@linaro.org Tested-by: Ryan Harkin ryan.harkin@linaro.org
I tested this on Juno R0, R1 and R2 after rebasing to the latest EDK2 (05b39ef) and OpenPlatformPkg (a122812) trees.
Notes: PL011_v2: - Commit message updated to clarify [Ryan Harking]
PL011_v3: - No code update, just adding a link for Leif [Leif Lindholm]
Code available at: https://github.com/EvanLloyd/OpenPlatformPkg/tree/PL011_v3
Platforms/ARM/Juno/ArmJuno.dsc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/Platforms/ARM/Juno/ArmJuno.dsc b/Platforms/ARM/Juno/ArmJuno.dsc index 3626dfb6e5834f36d136214550ecfde7ed41e4e5..490e08eb9248a4c63ae4580a55037624be435d6c 100644 --- a/Platforms/ARM/Juno/ArmJuno.dsc +++ b/Platforms/ARM/Juno/ArmJuno.dsc @@ -122,8 +122,7 @@ [PcdsFixedAtBuild.common] gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x7FF80000 gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|115200 gEfiMdePkgTokenSpaceGuid.PcdUartDefaultReceiveFifoDepth|0
- gArmPlatformTokenSpaceGuid.PL011UartInteger|4
- gArmPlatformTokenSpaceGuid.PL011UartFractional|0
gArmPlatformTokenSpaceGuid.PL011UartClkInHz|7372800 gArmPlatformTokenSpaceGuid.PL011UartInterrupt|115
## PL031 RealTimeClock
-- Guid("CE165669-3EF3-493F-B85D-6190EE5B9759")
On Thu, Jun 30, 2016 at 01:37:05PM +0100, Ryan Harkin wrote:
On 29 June 2016 at 18:44, evan.lloyd@arm.com wrote:
From: Sami Mujawar sami.mujawar@arm.com
The generic PL011 driver has been updated to allow for UARTs on a board having different clock sources (as is the case on Juno). See "ArmPlatformPkg: Add support to configure PL011 UART clock"
This change modifies the Juno code to use the new driver options. By replacing Pl011UartInteger with Pl011UartClKInHz, the driver can be used with different serial ports. This replaces an erroneous calculated value with a TRM defined clock rate.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Sami Mujawar sami.mujawar@arm.com Signed-off-by: Evan Lloyd evan.lloyd@arm.com
Reviewed-by: Ryan Harkin ryan.harkin@linaro.org Tested-by: Ryan Harkin ryan.harkin@linaro.org
I tested this on Juno R0, R1 and R2 after rebasing to the latest EDK2 (05b39ef) and OpenPlatformPkg (a122812) trees.
Thanks, Ryan.
Pushed.
Notes: PL011_v2: - Commit message updated to clarify [Ryan Harking]
PL011_v3: - No code update, just adding a link for Leif [Leif Lindholm]
Code available at: https://github.com/EvanLloyd/OpenPlatformPkg/tree/PL011_v3
Platforms/ARM/Juno/ArmJuno.dsc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/Platforms/ARM/Juno/ArmJuno.dsc b/Platforms/ARM/Juno/ArmJuno.dsc index 3626dfb6e5834f36d136214550ecfde7ed41e4e5..490e08eb9248a4c63ae4580a55037624be435d6c 100644 --- a/Platforms/ARM/Juno/ArmJuno.dsc +++ b/Platforms/ARM/Juno/ArmJuno.dsc @@ -122,8 +122,7 @@ [PcdsFixedAtBuild.common] gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x7FF80000 gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|115200 gEfiMdePkgTokenSpaceGuid.PcdUartDefaultReceiveFifoDepth|0
- gArmPlatformTokenSpaceGuid.PL011UartInteger|4
- gArmPlatformTokenSpaceGuid.PL011UartFractional|0
gArmPlatformTokenSpaceGuid.PL011UartClkInHz|7372800 gArmPlatformTokenSpaceGuid.PL011UartInterrupt|115
## PL031 RealTimeClock
-- Guid("CE165669-3EF3-493F-B85D-6190EE5B9759")