diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-09-24 16:22:33 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-09-24 16:22:33 -0400 |
commit | baea7b946f00a291b166ccae7fcfed6c01530cc6 (patch) | |
tree | 4aa275fbdbec9c7b9b4629e8bee2bbecd3c6a6af /drivers/serial/8250.c | |
parent | ae19ffbadc1b2100285a5b5b3d0a4e0a11390904 (diff) | |
parent | 94e0fb086fc5663c38bbc0fe86d698be8314f82f (diff) |
Merge branch 'origin' into for-linus
Conflicts:
MAINTAINERS
Diffstat (limited to 'drivers/serial/8250.c')
-rw-r--r-- | drivers/serial/8250.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index fb867a9f55e9..2209620d2349 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c | |||
@@ -1382,7 +1382,7 @@ static void serial8250_enable_ms(struct uart_port *port) | |||
1382 | static void | 1382 | static void |
1383 | receive_chars(struct uart_8250_port *up, unsigned int *status) | 1383 | receive_chars(struct uart_8250_port *up, unsigned int *status) |
1384 | { | 1384 | { |
1385 | struct tty_struct *tty = up->port.info->port.tty; | 1385 | struct tty_struct *tty = up->port.state->port.tty; |
1386 | unsigned char ch, lsr = *status; | 1386 | unsigned char ch, lsr = *status; |
1387 | int max_count = 256; | 1387 | int max_count = 256; |
1388 | char flag; | 1388 | char flag; |
@@ -1457,7 +1457,7 @@ ignore_char: | |||
1457 | 1457 | ||
1458 | static void transmit_chars(struct uart_8250_port *up) | 1458 | static void transmit_chars(struct uart_8250_port *up) |
1459 | { | 1459 | { |
1460 | struct circ_buf *xmit = &up->port.info->xmit; | 1460 | struct circ_buf *xmit = &up->port.state->xmit; |
1461 | int count; | 1461 | int count; |
1462 | 1462 | ||
1463 | if (up->port.x_char) { | 1463 | if (up->port.x_char) { |
@@ -1500,7 +1500,7 @@ static unsigned int check_modem_status(struct uart_8250_port *up) | |||
1500 | status |= up->msr_saved_flags; | 1500 | status |= up->msr_saved_flags; |
1501 | up->msr_saved_flags = 0; | 1501 | up->msr_saved_flags = 0; |
1502 | if (status & UART_MSR_ANY_DELTA && up->ier & UART_IER_MSI && | 1502 | if (status & UART_MSR_ANY_DELTA && up->ier & UART_IER_MSI && |
1503 | up->port.info != NULL) { | 1503 | up->port.state != NULL) { |
1504 | if (status & UART_MSR_TERI) | 1504 | if (status & UART_MSR_TERI) |
1505 | up->port.icount.rng++; | 1505 | up->port.icount.rng++; |
1506 | if (status & UART_MSR_DDSR) | 1506 | if (status & UART_MSR_DDSR) |
@@ -1510,7 +1510,7 @@ static unsigned int check_modem_status(struct uart_8250_port *up) | |||
1510 | if (status & UART_MSR_DCTS) | 1510 | if (status & UART_MSR_DCTS) |
1511 | uart_handle_cts_change(&up->port, status & UART_MSR_CTS); | 1511 | uart_handle_cts_change(&up->port, status & UART_MSR_CTS); |
1512 | 1512 | ||
1513 | wake_up_interruptible(&up->port.info->delta_msr_wait); | 1513 | wake_up_interruptible(&up->port.state->port.delta_msr_wait); |
1514 | } | 1514 | } |
1515 | 1515 | ||
1516 | return status; | 1516 | return status; |
@@ -1677,7 +1677,7 @@ static int serial_link_irq_chain(struct uart_8250_port *up) | |||
1677 | INIT_LIST_HEAD(&up->list); | 1677 | INIT_LIST_HEAD(&up->list); |
1678 | i->head = &up->list; | 1678 | i->head = &up->list; |
1679 | spin_unlock_irq(&i->lock); | 1679 | spin_unlock_irq(&i->lock); |
1680 | 1680 | irq_flags |= up->port.irqflags; | |
1681 | ret = request_irq(up->port.irq, serial8250_interrupt, | 1681 | ret = request_irq(up->port.irq, serial8250_interrupt, |
1682 | irq_flags, "serial", i); | 1682 | irq_flags, "serial", i); |
1683 | if (ret < 0) | 1683 | if (ret < 0) |
@@ -1764,7 +1764,7 @@ static void serial8250_backup_timeout(unsigned long data) | |||
1764 | up->lsr_saved_flags |= lsr & LSR_SAVE_FLAGS; | 1764 | up->lsr_saved_flags |= lsr & LSR_SAVE_FLAGS; |
1765 | spin_unlock_irqrestore(&up->port.lock, flags); | 1765 | spin_unlock_irqrestore(&up->port.lock, flags); |
1766 | if ((iir & UART_IIR_NO_INT) && (up->ier & UART_IER_THRI) && | 1766 | if ((iir & UART_IIR_NO_INT) && (up->ier & UART_IER_THRI) && |
1767 | (!uart_circ_empty(&up->port.info->xmit) || up->port.x_char) && | 1767 | (!uart_circ_empty(&up->port.state->xmit) || up->port.x_char) && |
1768 | (lsr & UART_LSR_THRE)) { | 1768 | (lsr & UART_LSR_THRE)) { |
1769 | iir &= ~(UART_IIR_ID | UART_IIR_NO_INT); | 1769 | iir &= ~(UART_IIR_ID | UART_IIR_NO_INT); |
1770 | iir |= UART_IIR_THRI; | 1770 | iir |= UART_IIR_THRI; |
@@ -2026,7 +2026,7 @@ static int serial8250_startup(struct uart_port *port) | |||
2026 | * allow register changes to become visible. | 2026 | * allow register changes to become visible. |
2027 | */ | 2027 | */ |
2028 | spin_lock_irqsave(&up->port.lock, flags); | 2028 | spin_lock_irqsave(&up->port.lock, flags); |
2029 | if (up->port.flags & UPF_SHARE_IRQ) | 2029 | if (up->port.irqflags & IRQF_SHARED) |
2030 | disable_irq_nosync(up->port.irq); | 2030 | disable_irq_nosync(up->port.irq); |
2031 | 2031 | ||
2032 | wait_for_xmitr(up, UART_LSR_THRE); | 2032 | wait_for_xmitr(up, UART_LSR_THRE); |
@@ -2039,7 +2039,7 @@ static int serial8250_startup(struct uart_port *port) | |||
2039 | iir = serial_in(up, UART_IIR); | 2039 | iir = serial_in(up, UART_IIR); |
2040 | serial_out(up, UART_IER, 0); | 2040 | serial_out(up, UART_IER, 0); |
2041 | 2041 | ||
2042 | if (up->port.flags & UPF_SHARE_IRQ) | 2042 | if (up->port.irqflags & IRQF_SHARED) |
2043 | enable_irq(up->port.irq); | 2043 | enable_irq(up->port.irq); |
2044 | spin_unlock_irqrestore(&up->port.lock, flags); | 2044 | spin_unlock_irqrestore(&up->port.lock, flags); |
2045 | 2045 | ||
@@ -2272,7 +2272,9 @@ serial8250_set_termios(struct uart_port *port, struct ktermios *termios, | |||
2272 | /* | 2272 | /* |
2273 | * Ask the core to calculate the divisor for us. | 2273 | * Ask the core to calculate the divisor for us. |
2274 | */ | 2274 | */ |
2275 | baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16); | 2275 | baud = uart_get_baud_rate(port, termios, old, |
2276 | port->uartclk / 16 / 0xffff, | ||
2277 | port->uartclk / 16); | ||
2276 | quot = serial8250_get_divisor(port, baud); | 2278 | quot = serial8250_get_divisor(port, baud); |
2277 | 2279 | ||
2278 | /* | 2280 | /* |
@@ -2671,6 +2673,7 @@ static void __init serial8250_isa_init_ports(void) | |||
2671 | i++, up++) { | 2673 | i++, up++) { |
2672 | up->port.iobase = old_serial_port[i].port; | 2674 | up->port.iobase = old_serial_port[i].port; |
2673 | up->port.irq = irq_canonicalize(old_serial_port[i].irq); | 2675 | up->port.irq = irq_canonicalize(old_serial_port[i].irq); |
2676 | up->port.irqflags = old_serial_port[i].irqflags; | ||
2674 | up->port.uartclk = old_serial_port[i].baud_base * 16; | 2677 | up->port.uartclk = old_serial_port[i].baud_base * 16; |
2675 | up->port.flags = old_serial_port[i].flags; | 2678 | up->port.flags = old_serial_port[i].flags; |
2676 | up->port.hub6 = old_serial_port[i].hub6; | 2679 | up->port.hub6 = old_serial_port[i].hub6; |
@@ -2679,7 +2682,7 @@ static void __init serial8250_isa_init_ports(void) | |||
2679 | up->port.regshift = old_serial_port[i].iomem_reg_shift; | 2682 | up->port.regshift = old_serial_port[i].iomem_reg_shift; |
2680 | set_io_from_upio(&up->port); | 2683 | set_io_from_upio(&up->port); |
2681 | if (share_irqs) | 2684 | if (share_irqs) |
2682 | up->port.flags |= UPF_SHARE_IRQ; | 2685 | up->port.irqflags |= IRQF_SHARED; |
2683 | } | 2686 | } |
2684 | } | 2687 | } |
2685 | 2688 | ||
@@ -2869,6 +2872,7 @@ int __init early_serial_setup(struct uart_port *port) | |||
2869 | p->iobase = port->iobase; | 2872 | p->iobase = port->iobase; |
2870 | p->membase = port->membase; | 2873 | p->membase = port->membase; |
2871 | p->irq = port->irq; | 2874 | p->irq = port->irq; |
2875 | p->irqflags = port->irqflags; | ||
2872 | p->uartclk = port->uartclk; | 2876 | p->uartclk = port->uartclk; |
2873 | p->fifosize = port->fifosize; | 2877 | p->fifosize = port->fifosize; |
2874 | p->regshift = port->regshift; | 2878 | p->regshift = port->regshift; |
@@ -2942,6 +2946,7 @@ static int __devinit serial8250_probe(struct platform_device *dev) | |||
2942 | port.iobase = p->iobase; | 2946 | port.iobase = p->iobase; |
2943 | port.membase = p->membase; | 2947 | port.membase = p->membase; |
2944 | port.irq = p->irq; | 2948 | port.irq = p->irq; |
2949 | port.irqflags = p->irqflags; | ||
2945 | port.uartclk = p->uartclk; | 2950 | port.uartclk = p->uartclk; |
2946 | port.regshift = p->regshift; | 2951 | port.regshift = p->regshift; |
2947 | port.iotype = p->iotype; | 2952 | port.iotype = p->iotype; |
@@ -2954,7 +2959,7 @@ static int __devinit serial8250_probe(struct platform_device *dev) | |||
2954 | port.serial_out = p->serial_out; | 2959 | port.serial_out = p->serial_out; |
2955 | port.dev = &dev->dev; | 2960 | port.dev = &dev->dev; |
2956 | if (share_irqs) | 2961 | if (share_irqs) |
2957 | port.flags |= UPF_SHARE_IRQ; | 2962 | port.irqflags |= IRQF_SHARED; |
2958 | ret = serial8250_register_port(&port); | 2963 | ret = serial8250_register_port(&port); |
2959 | if (ret < 0) { | 2964 | if (ret < 0) { |
2960 | dev_err(&dev->dev, "unable to register port at index %d " | 2965 | dev_err(&dev->dev, "unable to register port at index %d " |
@@ -3096,6 +3101,7 @@ int serial8250_register_port(struct uart_port *port) | |||
3096 | uart->port.iobase = port->iobase; | 3101 | uart->port.iobase = port->iobase; |
3097 | uart->port.membase = port->membase; | 3102 | uart->port.membase = port->membase; |
3098 | uart->port.irq = port->irq; | 3103 | uart->port.irq = port->irq; |
3104 | uart->port.irqflags = port->irqflags; | ||
3099 | uart->port.uartclk = port->uartclk; | 3105 | uart->port.uartclk = port->uartclk; |
3100 | uart->port.fifosize = port->fifosize; | 3106 | uart->port.fifosize = port->fifosize; |
3101 | uart->port.regshift = port->regshift; | 3107 | uart->port.regshift = port->regshift; |