Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge master.kernel.org:/home/rmk/linux-2.6-serial

+27 -24
+22 -23
drivers/serial/amba-pl011.c
··· 49 49 #include <linux/serial.h> 50 50 51 51 #include <asm/io.h> 52 - #include <asm/irq.h> 53 52 #include <asm/sizes.h> 54 53 #include <asm/hardware/amba.h> 55 54 #include <asm/hardware/clock.h> ··· 62 63 63 64 #define AMBA_ISR_PASS_LIMIT 256 64 65 65 - #define UART_DUMMY_RSR_RX 256 66 + #define UART_DR_ERROR (UART011_DR_OE|UART011_DR_BE|UART011_DR_PE|UART011_DR_FE) 67 + #define UART_DUMMY_DR_RX (1 << 16) 66 68 67 69 /* 68 70 * We wrap our port structure around the generic uart_port. ··· 116 116 #endif 117 117 { 118 118 struct tty_struct *tty = uap->port.info->tty; 119 - unsigned int status, ch, flag, rsr, max_count = 256; 119 + unsigned int status, ch, flag, max_count = 256; 120 120 121 121 status = readw(uap->port.membase + UART01x_FR); 122 122 while ((status & UART01x_FR_RXFE) == 0 && max_count--) { ··· 129 129 */ 130 130 } 131 131 132 - ch = readw(uap->port.membase + UART01x_DR); 132 + ch = readw(uap->port.membase + UART01x_DR) | UART_DUMMY_DR_RX; 133 133 flag = TTY_NORMAL; 134 134 uap->port.icount.rx++; 135 135 ··· 137 137 * Note that the error handling code is 138 138 * out of the main execution path 139 139 */ 140 - rsr = readw(uap->port.membase + UART01x_RSR) | UART_DUMMY_RSR_RX; 141 - if (unlikely(rsr & UART01x_RSR_ANY)) { 142 - if (rsr & UART01x_RSR_BE) { 143 - rsr &= ~(UART01x_RSR_FE | UART01x_RSR_PE); 140 + if (unlikely(ch & UART_DR_ERROR)) { 141 + if (ch & UART011_DR_BE) { 142 + ch &= ~(UART011_DR_FE | UART011_DR_PE); 144 143 uap->port.icount.brk++; 145 144 if (uart_handle_break(&uap->port)) 146 145 goto ignore_char; 147 - } else if (rsr & UART01x_RSR_PE) 146 + } else if (ch & UART011_DR_PE) 148 147 uap->port.icount.parity++; 149 - else if (rsr & UART01x_RSR_FE) 148 + else if (ch & UART011_DR_FE) 150 149 uap->port.icount.frame++; 151 - if (rsr & UART01x_RSR_OE) 150 + if (ch & UART011_DR_OE) 152 151 uap->port.icount.overrun++; 153 152 154 - rsr &= uap->port.read_status_mask; 153 + ch &= uap->port.read_status_mask; 155 154 156 - if (rsr & UART01x_RSR_BE) 155 + if (ch & UART011_DR_BE) 157 156 flag = TTY_BREAK; 158 - else if (rsr & UART01x_RSR_PE) 157 + else if (ch & UART011_DR_PE) 159 158 flag = TTY_PARITY; 160 - else if (rsr & UART01x_RSR_FE) 159 + else if (ch & UART011_DR_FE) 161 160 flag = TTY_FRAME; 162 161 } 163 162 164 163 if (uart_handle_sysrq_char(&uap->port, ch, regs)) 165 164 goto ignore_char; 166 165 167 - uart_insert_char(&uap->port, rsr, UART01x_RSR_OE, ch, flag); 166 + uart_insert_char(&uap->port, ch, UART011_DR_OE, ch, flag); 168 167 169 168 ignore_char: 170 169 status = readw(uap->port.membase + UART01x_FR); ··· 475 476 */ 476 477 uart_update_timeout(port, termios->c_cflag, baud); 477 478 478 - port->read_status_mask = UART01x_RSR_OE; 479 + port->read_status_mask = UART011_DR_OE | 255; 479 480 if (termios->c_iflag & INPCK) 480 - port->read_status_mask |= UART01x_RSR_FE | UART01x_RSR_PE; 481 + port->read_status_mask |= UART011_DR_FE | UART011_DR_PE; 481 482 if (termios->c_iflag & (BRKINT | PARMRK)) 482 - port->read_status_mask |= UART01x_RSR_BE; 483 + port->read_status_mask |= UART011_DR_BE; 483 484 484 485 /* 485 486 * Characters to ignore 486 487 */ 487 488 port->ignore_status_mask = 0; 488 489 if (termios->c_iflag & IGNPAR) 489 - port->ignore_status_mask |= UART01x_RSR_FE | UART01x_RSR_PE; 490 + port->ignore_status_mask |= UART011_DR_FE | UART011_DR_PE; 490 491 if (termios->c_iflag & IGNBRK) { 491 - port->ignore_status_mask |= UART01x_RSR_BE; 492 + port->ignore_status_mask |= UART011_DR_BE; 492 493 /* 493 494 * If we're ignoring parity and break indicators, 494 495 * ignore overruns too (for real raw support). 495 496 */ 496 497 if (termios->c_iflag & IGNPAR) 497 - port->ignore_status_mask |= UART01x_RSR_OE; 498 + port->ignore_status_mask |= UART011_DR_OE; 498 499 } 499 500 500 501 /* 501 502 * Ignore all characters if CREAD is not set. 502 503 */ 503 504 if ((termios->c_cflag & CREAD) == 0) 504 - port->ignore_status_mask |= UART_DUMMY_RSR_RX; 505 + port->ignore_status_mask |= UART_DUMMY_DR_RX; 505 506 506 507 if (UART_ENABLE_MS(port, termios->c_cflag)) 507 508 pl011_enable_ms(port);
-1
drivers/serial/sa1100.c
··· 161 161 static void sa1100_start_tx(struct uart_port *port) 162 162 { 163 163 struct sa1100_port *sport = (struct sa1100_port *)port; 164 - unsigned long flags; 165 164 u32 utcr3; 166 165 167 166 utcr3 = UART_GET_UTCR3(sport);
+5
include/asm-arm/hardware/amba_serial.h
··· 50 50 #define UART011_ICR 0x44 /* Interrupt clear register. */ 51 51 #define UART011_DMACR 0x48 /* DMA control register. */ 52 52 53 + #define UART011_DR_OE (1 << 11) 54 + #define UART011_DR_BE (1 << 10) 55 + #define UART011_DR_PE (1 << 9) 56 + #define UART011_DR_FE (1 << 8) 57 + 53 58 #define UART01x_RSR_OE 0x08 54 59 #define UART01x_RSR_BE 0x04 55 60 #define UART01x_RSR_PE 0x02