* [Qemu-devel] [PATCH] hw: fix mask for ColdFire UART command register
@ 2015-06-24 11:56 Paolo Bonzini
2015-06-24 12:55 ` Laurent Vivier
0 siblings, 1 reply; 2+ messages in thread
From: Paolo Bonzini @ 2015-06-24 11:56 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial
The "miscellaneous commands" part of the register is 3 bits wide.
Spotted by Coverity and confirmed in the datasheet, downloadable from
http://cache.freescale.com/files/32bit/doc/ref_manual/MCF5307BUM.pdf
(figure 14-6).
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/char/mcf_uart.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/char/mcf_uart.c b/hw/char/mcf_uart.c
index 98fd44e..cda22ee 100644
--- a/hw/char/mcf_uart.c
+++ b/hw/char/mcf_uart.c
@@ -126,7 +126,7 @@ static void mcf_uart_do_tx(mcf_uart_state *s)
static void mcf_do_command(mcf_uart_state *s, uint8_t cmd)
{
/* Misc command. */
- switch ((cmd >> 4) & 3) {
+ switch ((cmd >> 4) & 7) {
case 0: /* No-op. */
break;
case 1: /* Reset mode register pointer. */
--
2.4.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] hw: fix mask for ColdFire UART command register
2015-06-24 11:56 [Qemu-devel] [PATCH] hw: fix mask for ColdFire UART command register Paolo Bonzini
@ 2015-06-24 12:55 ` Laurent Vivier
0 siblings, 0 replies; 2+ messages in thread
From: Laurent Vivier @ 2015-06-24 12:55 UTC (permalink / raw)
To: Paolo Bonzini, qemu-devel; +Cc: qemu-trivial
Le 24/06/2015 13:56, Paolo Bonzini a écrit :
> The "miscellaneous commands" part of the register is 3 bits wide.
> Spotted by Coverity and confirmed in the datasheet, downloadable from
> http://cache.freescale.com/files/32bit/doc/ref_manual/MCF5307BUM.pdf
> (figure 14-6).
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-06-24 12:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-24 11:56 [Qemu-devel] [PATCH] hw: fix mask for ColdFire UART command register Paolo Bonzini
2015-06-24 12:55 ` Laurent Vivier
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.