All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hw/char/pl011: fix baud rate calculation
@ 2022-10-06 10:19 Baruch Siach
  2022-10-06 10:51 ` Peter Maydell
  2022-10-14 18:01 ` Peter Maydell
  0 siblings, 2 replies; 4+ messages in thread
From: Baruch Siach @ 2022-10-06 10:19 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-arm, qemu-devel, Baruch Siach

The PL011 TRM says that "UARTIBRD = 0 is invalid and UARTFBRD is ignored
when this is the case". But the code looks at FBRD for the invalid case.
Fix this.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 hw/char/pl011.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/char/pl011.c b/hw/char/pl011.c
index 6e2d7f75095c..c076813423fc 100644
--- a/hw/char/pl011.c
+++ b/hw/char/pl011.c
@@ -176,7 +176,7 @@ static unsigned int pl011_get_baudrate(const PL011State *s)
 {
     uint64_t clk;
 
-    if (s->fbrd == 0) {
+    if (s->ibrd == 0) {
         return 0;
     }
 
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-10-14 18:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-06 10:19 [PATCH] hw/char/pl011: fix baud rate calculation Baruch Siach
2022-10-06 10:51 ` Peter Maydell
2022-10-06 11:12   ` Baruch Siach
2022-10-14 18:01 ` Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.