There was an error while loading. Please reload this page.
2 parents 737787f + d62d307 commit d4568f6Copy full SHA for d4568f6
1 file changed
riscv/ns16550.cc
@@ -93,17 +93,17 @@ void ns16550_t::update_interrupt(void)
93
uint8_t interrupts = 0;
94
95
/* Handle clear rx */
96
- if (lcr & UART_FCR_CLEAR_RCVR) {
97
- lcr &= ~UART_FCR_CLEAR_RCVR;
+ if (fcr & UART_FCR_CLEAR_RCVR) {
+ fcr &= ~UART_FCR_CLEAR_RCVR;
98
while (!rx_queue.empty()) {
99
rx_queue.pop();
100
}
101
lsr &= ~UART_LSR_DR;
102
103
104
/* Handle clear tx */
105
- if (lcr & UART_FCR_CLEAR_XMIT) {
106
- lcr &= ~UART_FCR_CLEAR_XMIT;
+ if (fcr & UART_FCR_CLEAR_XMIT) {
+ fcr &= ~UART_FCR_CLEAR_XMIT;
107
lsr |= UART_LSR_TEMT | UART_LSR_THRE;
108
109
0 commit comments