Revision | 5510f30955a75545e699c8d530139d05199e8b22 (tree) |
---|---|
Time | 2019-01-13 22:52:39 |
Author | Yoshinori Sato <ysato@user...> |
Commiter | Yoshinori Sato |
SCI interrupt fix
@@ -62,8 +62,8 @@ static void send_byte(RSCIState *sci) | ||
62 | 62 | static void txend(void *opaque) |
63 | 63 | { |
64 | 64 | RSCIState *sci= RSCI(opaque); |
65 | - if (sci->scr & 0x80 && (sci->ssr & 0x80) == 0) | |
66 | - send_byte(sci); | |
65 | + if ((sci->ssr & 0x80) == 0) | |
66 | + send_byte(sci); | |
67 | 67 | else { |
68 | 68 | sci->ssr |= 0x04; |
69 | 69 | if (sci->scr & 0x04) |
@@ -104,8 +104,11 @@ static void sci_write(void *opaque, hwaddr addr, uint64_t val, unsigned size) | ||
104 | 104 | break; |
105 | 105 | case 2: /* SCR */ |
106 | 106 | sci->scr = val; |
107 | - if ((sci->scr & 0x20) == 0) | |
107 | + if (sci->scr & 0x20) { | |
108 | 108 | sci->ssr |= 0x84; |
109 | + qemu_set_irq(sci->irq[TXI], 1); | |
110 | + qemu_set_irq(sci->irq[TXI], 0); | |
111 | + } | |
109 | 112 | if ((sci->scr & 0x04) == 0) |
110 | 113 | qemu_set_irq(sci->irq[TEI], 0); |
111 | 114 | if ((sci->scr & 0x40) == 0) |