UINT32 Divisor;\r
UINT32 Integer;\r
UINT32 Fractional;\r
+ UINT32 HardwareFifoDepth;\r
\r
+ HardwareFifoDepth = (PL011_UARTPID2_VER (MmioRead32 (UartBase + UARTPID2)) \\r
+ > PL011_VER_R1P4) \\r
+ ? 32 : 16 ;\r
// The PL011 supports a buffer of 1, 16 or 32 chars. Therefore we can accept\r
// 1 char buffer as the minimum FIFO size. Because everything can be rounded\r
// down, there is no maximum FIFO size.\r
- if ((*ReceiveFifoDepth == 0) || (*ReceiveFifoDepth >= 32)) {\r
+ if ((*ReceiveFifoDepth == 0) || (*ReceiveFifoDepth >= HardwareFifoDepth)) {\r
// Enable FIFO\r
LineControl = PL011_UARTLCR_H_FEN;\r
- if (PL011_UARTPID2_VER (MmioRead32 (UartBase + UARTPID2)) > PL011_VER_R1P4)\r
- *ReceiveFifoDepth = 32;\r
- else\r
- *ReceiveFifoDepth = 16;\r
+ *ReceiveFifoDepth = HardwareFifoDepth;\r
} else {\r
// Disable FIFO\r
LineControl = 0;\r