/* * RX interrupt handler */ static inline void rs_rx_interrupt(int irq, void *dev_id, struct pt_regs *regs) { unsigned long flags, status; save_and_cli(flags); rs_dprintk(TX3912_UART_DEBUG_INTERRUPTS, "rs_rx_interrupt..."); /* Get the interrupts */ status = inl(TX3912_INT2_STATUS); /* Clear any interrupts we might be about to handle */ outl(TX3912_INT2_UARTA_RX_BITS, TX3912_INT2_CLEAR); if(!rs_port || !rs_port->gs.tty) { restore_flags(flags); return; } /* RX Receiver Holding Register Overrun */ if(status & TX3912_INT2_UARTATXOVERRUNINT) { rs_dprintk(TX3912_UART_DEBUG_INTERRUPTS, "overrun"); rs_port->icount.overrun++; } /* RX Frame Error */ if(status & TX3912_INT2_UARTAFRAMEERRINT) { rs_dprintk(TX3912_UART_DEBUG_INTERRUPTS, "frame error"); rs_port->icount.frame++; } /* Break signal received */ if(status & TX3912_INT2_UARTABREAKINT) { rs_dprintk(TX3912_UART_DEBUG_INTERRUPTS, "break"); rs_port->icount.brk++; } /* RX Parity Error */ if(status & TX3912_INT2_UARTAPARITYINT) { rs_dprintk(TX3912_UART_DEBUG_INTERRUPTS, "parity error"); rs_port->icount.parity++; } /* Byte received */ if(status & TX3912_INT2_UARTARXINT) { receive_char_pio(rs_port); } restore_flags(flags); rs_dprintk(TX3912_UART_DEBUG_INTERRUPTS, "end.\n"); }
static inline void rs_rx_interrupt(int irq, void *dev_id, struct pt_regs * regs, int intshift) { struct rs_port * port; unsigned long int2status; unsigned long flags; unsigned long ints; save_and_cli(flags); port = (struct rs_port *)dev_id; rs_dprintk (TX3912_UART_DEBUG_INTERRUPTS, "rs_interrupt (port %p, shift %d)...", port, intshift); /* Get the interrrupts we have enabled */ int2status = IntStatus2 & IntEnable2; /* Get interrupts in easy to use form */ ints = int2status >> intshift; /* Clear any interrupts we might be about to handle */ IntClear2 = int2status & ( (INTTYPE(UART_RXOVERRUN_INT) | INTTYPE(UART_FRAMEERR_INT) | INTTYPE(UART_BREAK_INT) | INTTYPE(UART_PARITYERR_INT) | INTTYPE(UART_RX_INT)) << intshift); if (!port || !port->gs.tty) { restore_flags(flags); return; } /* RX Receiver Holding Register Overrun */ if (ints & INTTYPE(UART_RXOVERRUN_INT)) { rs_dprintk (TX3912_UART_DEBUG_INTERRUPTS, "overrun"); port->icount.overrun++; } /* RX Frame Error */ if (ints & INTTYPE(UART_FRAMEERR_INT)) { rs_dprintk (TX3912_UART_DEBUG_INTERRUPTS, "frame error"); port->icount.frame++; } /* Break signal received */ if (ints & INTTYPE(UART_BREAK_INT)) { rs_dprintk (TX3912_UART_DEBUG_INTERRUPTS, "break"); port->icount.brk++; } /* RX Parity Error */ if (ints & INTTYPE(UART_PARITYERR_INT)) { rs_dprintk (TX3912_UART_DEBUG_INTERRUPTS, "parity error"); port->icount.parity++; } /* Receive byte (non-DMA) */ if (ints & INTTYPE(UART_RX_INT)) { receive_char_pio(port); } restore_flags(flags); rs_dprintk (TX3912_UART_DEBUG_INTERRUPTS, "end.\n"); }