mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-31 11:30:56 +08:00
or1k: UART also accept timeout interrupt
- The UART interrupt only handled receiver FIFO full interrupts, but we also want to handle timeout interrupts. * or1k/or1k_uart.c: Fix interrupts
This commit is contained in:
parent
67a2ed864a
commit
65ff3ce7fb
@ -1,3 +1,7 @@
|
|||||||
|
2015-05-26 Stefan Wallentowitz <stefan.wallentowitz@tum.de>
|
||||||
|
|
||||||
|
* or1k/or1k_uart.c: Fix interrupts
|
||||||
|
|
||||||
2015-05-26 Stefan Wallentowitz <stefan.wallentowitz@tum.de>
|
2015-05-26 Stefan Wallentowitz <stefan.wallentowitz@tum.de>
|
||||||
|
|
||||||
* or1k/timer.c: Properly set interrupt flags
|
* or1k/timer.c: Properly set interrupt flags
|
||||||
|
@ -94,9 +94,11 @@ void _or1k_uart_interrupt_handler(uint32_t data)
|
|||||||
{
|
{
|
||||||
uint8_t iir = REG8(IIR);
|
uint8_t iir = REG8(IIR);
|
||||||
|
|
||||||
// Check if this is a read fifo interrupt, bit 0 indicates pending
|
// Check if this is a read fifo or timeout interrupt, bit 0
|
||||||
// interrupt and the other bits are IIR_RDA
|
// indicates pending interrupt and the other bits are IIR_RDA
|
||||||
if (!(iir & 0x1) || ((iir & 0xfe) != IIR_RDA)) {
|
// or IIR_TO
|
||||||
|
if (!(iir & 0x1) || ((iir & 0xfe) != IIR_RDA) ||
|
||||||
|
((iir & 0xfe) != IIR_TO)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user