arm/xen: vpl011: Fix the slow early console SBSA UART output
authorBhupinder Thakur <bhupinder.thakur@linaro.org>
Tue, 24 Oct 2017 17:09:21 +0000 (18:09 +0100)
committerStefano Stabellini <sstabellini@kernel.org>
Fri, 27 Oct 2017 17:11:05 +0000 (10:11 -0700)
commit393a541f7d151242f186ad2fb9b6c20db1db6cb9
tree5fcc4cd2a1486cc6b19a140c2535379130d3f498
parent6c1a029aef07f6962716a5a7b3d6b942281f4e4e
arm/xen: vpl011: Fix the slow early console SBSA UART output

The early console output uses pl011_early_write() to write data. This
function waits for BUSY bit to get cleared before writing the next byte.

In the SBSA UART emulation logic, the BUSY bit was set as soon one
byte was written in the FIFO and it remained set until the FIFO was
emptied. This meant that the output was delayed as each character needed
the BUSY to get cleared.

Since the SBSA UART is getting emulated in Xen using ring buffers, it
ensures that once the data is enqueued in the FIFO, it will be received
by xenconsole so it is safe to set the BUSY bit only when FIFO becomes
full. This will ensure that pl011_early_write() is not delayed unduly
to write the data.

Signed-off-by: Bhupinder Thakur <bhupinder.thakur@linaro.org>
Reviewed-by: Andre Przywara <andre.przywara@linaro.org>
Signed-off-by: Andre Przywara <andre.przywara@linaro.org>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Release-acked-by: Julien Grall <julien.grall@linaro.org>
xen/arch/arm/vpl011.c