mirror of
https://github.com/mborgerson/xemu.git
synced 2026-03-30 11:04:07 +00:00
While we model a 16-elements RX FIFO since the PL011 model was introduced in commitcdbdb648b7("ARM Versatile Platform Baseboard emulation"), we only read 1 char at a time! Have can_receive() return how many elements are available, and use that in receive(). This is the Rust version of commit3e0f118f82("hw/char/pl011: Really use RX FIFO depth"); but it also adds back a comment that is present in commitf576e0733c("hw/char/pl011: Add support for loopback") and absent in the Rust code. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>