提交 cdee7bdf 编写于 作者: A Aurelien Jarno

hw/serial.c: fix THRE interrupt clearing

UART_IIR_THRI is not a mask, but a possible value for the IIR ID.
Use UART_IIR_ID to extract this value.

Broken by commit 71e605f8.
Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
上级 2f4f22bd
......@@ -541,7 +541,7 @@ static uint32_t serial_ioport_read(void *opaque, uint32_t addr)
break;
case 2:
ret = s->iir;
if (ret & UART_IIR_THRI) {
if ((ret & UART_IIR_ID) == UART_IIR_THRI) {
s->thr_ipending = 0;
serial_update_irq(s);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册