rust/pl011: Use correct masks for IBRD and FBRD
authorManos Pitsidianakis <manos.pitsidianakis@linaro.org>
Thu, 24 Oct 2024 14:03:07 +0000 (17:03 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 5 Nov 2024 13:18:16 +0000 (14:18 +0100)
Port fix from commit cd247eae16ab1b9ce97fd34c000c1b883feeda45
"hw/char/pl011: Use correct masks for IBRD and FBRD"

Related issue: <https://gitlab.com/qemu-project/qemu/-/issues/2610>

Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Link: https://lore.kernel.org/r/20241024-rust-round-2-v1-9-051e7a25b978@linaro.org
rust/hw/char/pl011/src/device.rs

index 98357db04e886efc09952bff08f14d93ad62258d..788b47203b1b74eaef1e6d4e799fe33e52748e4b 100644 (file)
@@ -19,10 +19,10 @@ use crate::{
 };
 
 /// Integer Baud Rate Divider, `UARTIBRD`
-const IBRD_MASK: u32 = 0x3f;
+const IBRD_MASK: u32 = 0xffff;
 
 /// Fractional Baud Rate Divider, `UARTFBRD`
-const FBRD_MASK: u32 = 0xffff;
+const FBRD_MASK: u32 = 0x3f;
 
 const DATA_BREAK: u32 = 1 << 10;