]> git.proxmox.com Git - mirror_edk2.git/commit
ArmPlatformPkg: Fix PL011 Glitches.
authorEvan Lloyd <evan.lloyd@arm.com>
Wed, 15 Jun 2016 12:52:43 +0000 (13:52 +0100)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Wed, 15 Jun 2016 14:17:10 +0000 (16:17 +0200)
commit16146b984db10f87e30a6f6ac08ba9716a9eea79
treeef127b1c4b117b2da529d46c84198583268efb83
parent090916d8bc8962d191e67cba24bfe46ad1cc892a
ArmPlatformPkg: Fix PL011 Glitches.

This change corrects 3 problems in the PL011 driver.
1. The TRM states "The UARTLCR_H, UARTIBRD, and UARTFBRD registers must
   not be changed:...when the UART is enabled"
2. The TRM (3.3.8) describes logic requiring the UART to be disabled and
   flushed before adjusting UARTCR.
3. Several redundant calls get made to PL011UartInitializePort, where
   the characteristics do not change, but updating the registers can
   cause glitches in the output stream.

The parameters are compared to the current state and no action taken if
no change of state is required.
Where an update is required, the specified logic is followed, and the
register updates only made when the UART is disabled.

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>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org>
ArmPlatformPkg/Drivers/PL011Uart/PL011Uart.c