rust: pl011: fix break errors and definition of Data struct
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 4 Dec 2024 16:14:00 +0000 (17:14 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 19 Dec 2024 18:36:38 +0000 (19:36 +0100)
commite1f9353334859ea325f25bd88e01645af63b133b
tree87dc2da72b53ca8f961cfcebcd0b39fad3a3d79a
parentf65314bdd0c287097f7dd4b002c67ceee9729039
rust: pl011: fix break errors and definition of Data struct

The Data struct is wrong, and does not show how bits 8-15 of DR
are the receive status.  Fix it, and use it to fix break
errors ("c >> 8" in the C code does not translate to
"c.to_be_bytes()[3]").

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
rust/hw/char/pl011/src/device.rs
rust/hw/char/pl011/src/lib.rs