summaryrefslogtreecommitdiffstats
path: root/ArmPlatformPkg/Include
diff options
context:
space:
mode:
authorLeif Lindholm <leif.lindholm@linaro.org>2015-01-23 16:10:00 +0000
committeroliviermartin <oliviermartin@Edk2>2015-01-23 16:10:00 +0000
commit48edf6be7fd35467b77e6ebf3707094db4da6d6f (patch)
tree83d1cf6b3627f48192017e2dba026e0693019119 /ArmPlatformPkg/Include
parentac83357a4311e008b229a8db43d2f1726cfe326d (diff)
downloadedk2-48edf6be7fd35467b77e6ebf3707094db4da6d6f.tar.gz
edk2-48edf6be7fd35467b77e6ebf3707094db4da6d6f.tar.bz2
edk2-48edf6be7fd35467b77e6ebf3707094db4da6d6f.zip
ArmPlatformPkg: detect correct pl011 fifo depth
pl011 releases earlier than r1p5 has a fifo depth of 16 bytes, whereas version r1p5 upwards has a fifo depth of 32 bytes. The pl011 driver was hardwired to 32 byte depth, causing dropped characters on some platforms (including default settings on FVP Base and Foundation models). Update driver to select 16 or 32 on port initialization by checking the component revision. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16656 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPlatformPkg/Include')
-rw-r--r--ArmPlatformPkg/Include/Drivers/PL011Uart.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/ArmPlatformPkg/Include/Drivers/PL011Uart.h b/ArmPlatformPkg/Include/Drivers/PL011Uart.h
index 6675cefeb3..2fe796f9e4 100644
--- a/ArmPlatformPkg/Include/Drivers/PL011Uart.h
+++ b/ArmPlatformPkg/Include/Drivers/PL011Uart.h
@@ -35,6 +35,11 @@
#define UARTICR 0x044
#define UARTDMACR 0x048
+#define UARTPID0 0xFE0
+#define UARTPID1 0xFE4
+#define UARTPID2 0xFE8
+#define UARTPID3 0xFEC
+
// Data status bits
#define UART_DATA_ERROR_MASK 0x0F00
@@ -81,6 +86,9 @@
#define PL011_UARTLCR_H_PEN (1 << 1) // Parity Enable
#define PL011_UARTLCR_H_BRK (1 << 0) // Send break
+#define PL011_UARTPID2_VER(X) (((X) >> 4) & 0xF)
+#define PL011_VER_R1P4 0x2
+
/*
Programmed hardware of Serial port.