pxa.c (b10778a00d40b3d9fdaaf5891e802794781ff71c) | pxa.c (50d1e7d1077b276e8faa9eebf8b710edf31fdeea) |
---|---|
1/* 2 * Based on drivers/serial/8250.c by Russell King. 3 * 4 * Author: Nicolas Pitre 5 * Created: Feb 20, 2003 6 * Copyright: (C) 2003 Monta Vista Software, Inc. 7 * 8 * This program is free software; you can redistribute it and/or modify --- 209 unchanged lines hidden (view full) --- 218 struct uart_pxa_port *up = (struct uart_pxa_port *)port; 219 220 if (!(up->ier & UART_IER_THRI)) { 221 up->ier |= UART_IER_THRI; 222 serial_out(up, UART_IER, up->ier); 223 } 224} 225 | 1/* 2 * Based on drivers/serial/8250.c by Russell King. 3 * 4 * Author: Nicolas Pitre 5 * Created: Feb 20, 2003 6 * Copyright: (C) 2003 Monta Vista Software, Inc. 7 * 8 * This program is free software; you can redistribute it and/or modify --- 209 unchanged lines hidden (view full) --- 218 struct uart_pxa_port *up = (struct uart_pxa_port *)port; 219 220 if (!(up->ier & UART_IER_THRI)) { 221 up->ier |= UART_IER_THRI; 222 serial_out(up, UART_IER, up->ier); 223 } 224} 225 |
226/* should hold up->port.lock */ |
|
226static inline void check_modem_status(struct uart_pxa_port *up) 227{ 228 int status; 229 230 status = serial_in(up, UART_MSR); 231 232 if ((status & UART_MSR_ANY_DELTA) == 0) 233 return; --- 16 unchanged lines hidden (view full) --- 250static inline irqreturn_t serial_pxa_irq(int irq, void *dev_id) 251{ 252 struct uart_pxa_port *up = dev_id; 253 unsigned int iir, lsr; 254 255 iir = serial_in(up, UART_IIR); 256 if (iir & UART_IIR_NO_INT) 257 return IRQ_NONE; | 227static inline void check_modem_status(struct uart_pxa_port *up) 228{ 229 int status; 230 231 status = serial_in(up, UART_MSR); 232 233 if ((status & UART_MSR_ANY_DELTA) == 0) 234 return; --- 16 unchanged lines hidden (view full) --- 251static inline irqreturn_t serial_pxa_irq(int irq, void *dev_id) 252{ 253 struct uart_pxa_port *up = dev_id; 254 unsigned int iir, lsr; 255 256 iir = serial_in(up, UART_IIR); 257 if (iir & UART_IIR_NO_INT) 258 return IRQ_NONE; |
259 spin_lock(&up->port.lock); |
|
258 lsr = serial_in(up, UART_LSR); 259 if (lsr & UART_LSR_DR) 260 receive_chars(up, &lsr); 261 check_modem_status(up); 262 if (lsr & UART_LSR_THRE) 263 transmit_chars(up); | 260 lsr = serial_in(up, UART_LSR); 261 if (lsr & UART_LSR_DR) 262 receive_chars(up, &lsr); 263 check_modem_status(up); 264 if (lsr & UART_LSR_THRE) 265 transmit_chars(up); |
266 spin_unlock(&up->port.lock); |
|
264 return IRQ_HANDLED; 265} 266 267static unsigned int serial_pxa_tx_empty(struct uart_port *port) 268{ 269 struct uart_pxa_port *up = (struct uart_pxa_port *)port; 270 unsigned long flags; 271 unsigned int ret; --- 695 unchanged lines hidden --- | 267 return IRQ_HANDLED; 268} 269 270static unsigned int serial_pxa_tx_empty(struct uart_port *port) 271{ 272 struct uart_pxa_port *up = (struct uart_pxa_port *)port; 273 unsigned long flags; 274 unsigned int ret; --- 695 unchanged lines hidden --- |