aboutsummaryrefslogtreecommitdiff
path: root/libgloss/or1k
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2015-05-26 15:27:02 -0400
committerCorinna Vinschen <corinna@vinschen.de>2015-05-27 13:30:20 +0200
commitaa26b784620268135cab52d77ffb39129cd1fb1f (patch)
treec8784a9129d7d498831f0f3c690c864f869a6f46 /libgloss/or1k
parent58e5719a0e448d0c5cd1b670d9a099655ecfa77c (diff)
downloadnewlib-aa26b784620268135cab52d77ffb39129cd1fb1f.zip
newlib-aa26b784620268135cab52d77ffb39129cd1fb1f.tar.gz
newlib-aa26b784620268135cab52d77ffb39129cd1fb1f.tar.bz2
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
Diffstat (limited to 'libgloss/or1k')
-rw-r--r--libgloss/or1k/or1k_uart.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libgloss/or1k/or1k_uart.c b/libgloss/or1k/or1k_uart.c
index e5b539a..0a991e6 100644
--- a/libgloss/or1k/or1k_uart.c
+++ b/libgloss/or1k/or1k_uart.c
@@ -94,9 +94,11 @@ void _or1k_uart_interrupt_handler(uint32_t data)
{
uint8_t iir = REG8(IIR);
- // Check if this is a read fifo interrupt, bit 0 indicates pending
- // interrupt and the other bits are IIR_RDA
- if (!(iir & 0x1) || ((iir & 0xfe) != IIR_RDA)) {
+ // Check if this is a read fifo or timeout interrupt, bit 0
+ // indicates pending interrupt and the other bits are IIR_RDA
+ // or IIR_TO
+ if (!(iir & 0x1) || ((iir & 0xfe) != IIR_RDA) ||
+ ((iir & 0xfe) != IIR_TO)) {
return;
}