]> sourceware.org Git - newlib-cygwin.git/commitdiff
or1k: UART also accept timeout interrupt
authorJeff Johnston <jjohnstn@redhat.com>
Tue, 26 May 2015 19:27:02 +0000 (15:27 -0400)
committerJeff Johnston <jjohnstn@redhat.com>
Tue, 26 May 2015 19:27:02 +0000 (15:27 -0400)
- The UART interrupt only handled receiver FIFO full interrupts, but we
  also want to handle timeout interrupts.

    * or1k/or1k_uart.c: Fix interrupts

libgloss/ChangeLog
libgloss/or1k/or1k_uart.c

index 77137f02b24704e5d77721b7a41d904a438aa9f0..6b3fe3c4e00ed95ce9481ea5f6dd10dd5a42c5f5 100644 (file)
@@ -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>
 
        * or1k/timer.c: Properly set interrupt flags
index e5b539af422049b268c892bd0a20c8939287c749..0a991e6baf2ea54d9a7fe7b9feebcdfee38ed85d 100644 (file)
@@ -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;
        }
 
This page took 0.037225 seconds and 5 git commands to generate.