hw/char/mcf_uart: Really use RX FIFO depth
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Wed, 19 Feb 2025 15:25:17 +0000 (16:25 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 4 Mar 2025 13:45:34 +0000 (14:45 +0100)
commit3ca8af5445b493ae3bc1520c71de3fd7e4555af4
tree919b4f9848494e0d0b440f01328c11ab28ee2ad1
parent3d978e7b9b25913620d57eb73256f395ab1c18a0
hw/char/mcf_uart: Really use RX FIFO depth

While we model a 4-elements RX FIFO since the MCF UART model
was introduced in commit 20dcee94833 ("MCF5208 emulation"),
we only read 1 char at a time!

Have the IOCanReadHandler handler return how many elements are
available, and use that in the IOReadHandler handler.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Luc Michel <luc.michel@amd.com>
Tested-by: Thomas Huth <huth@tuxfamily.org>
Reviewed-by: Thomas Huth <huth@tuxfamily.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20250220092903.3726-9-philmd@linaro.org>
hw/char/mcf_uart.c