]> Git Repo - qemu.git/commitdiff
hw: fix mask for ColdFire UART command register
authorPaolo Bonzini <[email protected]>
Wed, 24 Jun 2015 11:55:51 +0000 (13:55 +0200)
committerPaolo Bonzini <[email protected]>
Fri, 14 Aug 2015 21:40:32 +0000 (23:40 +0200)
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 <[email protected]>
hw/char/mcf_uart.c

index 98fd44e66adbfff0bb1843d7dcdd05ac92b1eeee..cda22eea5dfeca612f1b0ab3ecffe196d7520b10 100644 (file)
@@ -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.  */
This page took 0.02649 seconds and 4 git commands to generate.