diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-10-18 21:23:11 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-10-18 21:23:11 -0400 |
commit | 4e0e329d9a2011f9f7a7c0a378dc3bff7b0a0283 (patch) | |
tree | a802614e01460631c694dfa118642d54c3d5fc79 /drivers/serial | |
parent | e33b9dfa3008fcaa908dc0c8c472a812c400f839 (diff) | |
parent | 59a10b172fccaea793352c00fd9065f0a5b4ef70 (diff) |
Merge branch 'upstream'
Diffstat (limited to 'drivers/serial')
-rw-r--r-- | drivers/serial/8250_pnp.c | 2 | ||||
-rw-r--r-- | drivers/serial/imx.c | 48 | ||||
-rw-r--r-- | drivers/serial/pxa.c | 2 | ||||
-rw-r--r-- | drivers/serial/s3c2410.c | 18 | ||||
-rw-r--r-- | drivers/serial/sh-sci.c | 2 | ||||
-rw-r--r-- | drivers/serial/sunsab.c | 1 | ||||
-rw-r--r-- | drivers/serial/sunzilog.c | 5 |
7 files changed, 54 insertions, 24 deletions
diff --git a/drivers/serial/8250_pnp.c b/drivers/serial/8250_pnp.c index 6b321e82cafb..c2786fc41cc5 100644 --- a/drivers/serial/8250_pnp.c +++ b/drivers/serial/8250_pnp.c | |||
@@ -272,6 +272,8 @@ static const struct pnp_device_id pnp_dev_table[] = { | |||
272 | { "SUP1421", 0 }, | 272 | { "SUP1421", 0 }, |
273 | /* SupraExpress 33.6 Data/Fax PnP modem */ | 273 | /* SupraExpress 33.6 Data/Fax PnP modem */ |
274 | { "SUP1590", 0 }, | 274 | { "SUP1590", 0 }, |
275 | /* SupraExpress 336i Sp ASVD */ | ||
276 | { "SUP1620", 0 }, | ||
275 | /* SupraExpress 33.6 Data/Fax PnP modem */ | 277 | /* SupraExpress 33.6 Data/Fax PnP modem */ |
276 | { "SUP1760", 0 }, | 278 | { "SUP1760", 0 }, |
277 | /* Phoebe Micro */ | 279 | /* Phoebe Micro */ |
diff --git a/drivers/serial/imx.c b/drivers/serial/imx.c index 4e1e80adaf11..bdb4e454b8b0 100644 --- a/drivers/serial/imx.c +++ b/drivers/serial/imx.c | |||
@@ -73,7 +73,7 @@ struct imx_port { | |||
73 | struct uart_port port; | 73 | struct uart_port port; |
74 | struct timer_list timer; | 74 | struct timer_list timer; |
75 | unsigned int old_status; | 75 | unsigned int old_status; |
76 | int txirq,rxirq; | 76 | int txirq,rxirq,rtsirq; |
77 | }; | 77 | }; |
78 | 78 | ||
79 | /* | 79 | /* |
@@ -181,6 +181,22 @@ static void imx_start_tx(struct uart_port *port) | |||
181 | imx_transmit_buffer(sport); | 181 | imx_transmit_buffer(sport); |
182 | } | 182 | } |
183 | 183 | ||
184 | static irqreturn_t imx_rtsint(int irq, void *dev_id, struct pt_regs *regs) | ||
185 | { | ||
186 | struct imx_port *sport = (struct imx_port *)dev_id; | ||
187 | unsigned int val = USR1((u32)sport->port.membase)&USR1_RTSS; | ||
188 | unsigned long flags; | ||
189 | |||
190 | spin_lock_irqsave(&sport->port.lock, flags); | ||
191 | |||
192 | USR1((u32)sport->port.membase) = USR1_RTSD; | ||
193 | uart_handle_cts_change(&sport->port, !!val); | ||
194 | wake_up_interruptible(&sport->port.info->delta_msr_wait); | ||
195 | |||
196 | spin_unlock_irqrestore(&sport->port.lock, flags); | ||
197 | return IRQ_HANDLED; | ||
198 | } | ||
199 | |||
184 | static irqreturn_t imx_txint(int irq, void *dev_id, struct pt_regs *regs) | 200 | static irqreturn_t imx_txint(int irq, void *dev_id, struct pt_regs *regs) |
185 | { | 201 | { |
186 | struct imx_port *sport = (struct imx_port *)dev_id; | 202 | struct imx_port *sport = (struct imx_port *)dev_id; |
@@ -383,18 +399,24 @@ static int imx_startup(struct uart_port *port) | |||
383 | */ | 399 | */ |
384 | retval = request_irq(sport->rxirq, imx_rxint, 0, | 400 | retval = request_irq(sport->rxirq, imx_rxint, 0, |
385 | DRIVER_NAME, sport); | 401 | DRIVER_NAME, sport); |
386 | if (retval) goto error_out2; | 402 | if (retval) goto error_out1; |
387 | 403 | ||
388 | retval = request_irq(sport->txirq, imx_txint, 0, | 404 | retval = request_irq(sport->txirq, imx_txint, 0, |
389 | "imx-uart", sport); | 405 | DRIVER_NAME, sport); |
390 | if (retval) goto error_out1; | 406 | if (retval) goto error_out2; |
407 | |||
408 | retval = request_irq(sport->rtsirq, imx_rtsint, 0, | ||
409 | DRIVER_NAME, sport); | ||
410 | if (retval) goto error_out3; | ||
411 | set_irq_type(sport->rtsirq, IRQT_BOTHEDGE); | ||
391 | 412 | ||
392 | /* | 413 | /* |
393 | * Finally, clear and enable interrupts | 414 | * Finally, clear and enable interrupts |
394 | */ | 415 | */ |
395 | 416 | ||
417 | USR1((u32)sport->port.membase) = USR1_RTSD; | ||
396 | UCR1((u32)sport->port.membase) |= | 418 | UCR1((u32)sport->port.membase) |= |
397 | (UCR1_TXMPTYEN | UCR1_RRDYEN | UCR1_UARTEN); | 419 | (UCR1_TXMPTYEN | UCR1_RRDYEN | UCR1_RTSDEN | UCR1_UARTEN); |
398 | 420 | ||
399 | UCR2((u32)sport->port.membase) |= (UCR2_RXEN | UCR2_TXEN); | 421 | UCR2((u32)sport->port.membase) |= (UCR2_RXEN | UCR2_TXEN); |
400 | /* | 422 | /* |
@@ -406,10 +428,11 @@ static int imx_startup(struct uart_port *port) | |||
406 | 428 | ||
407 | return 0; | 429 | return 0; |
408 | 430 | ||
409 | error_out1: | 431 | error_out3: |
410 | free_irq(sport->rxirq, sport); | ||
411 | error_out2: | ||
412 | free_irq(sport->txirq, sport); | 432 | free_irq(sport->txirq, sport); |
433 | error_out2: | ||
434 | free_irq(sport->rxirq, sport); | ||
435 | error_out1: | ||
413 | return retval; | 436 | return retval; |
414 | } | 437 | } |
415 | 438 | ||
@@ -425,6 +448,7 @@ static void imx_shutdown(struct uart_port *port) | |||
425 | /* | 448 | /* |
426 | * Free the interrupts | 449 | * Free the interrupts |
427 | */ | 450 | */ |
451 | free_irq(sport->rtsirq, sport); | ||
428 | free_irq(sport->txirq, sport); | 452 | free_irq(sport->txirq, sport); |
429 | free_irq(sport->rxirq, sport); | 453 | free_irq(sport->rxirq, sport); |
430 | 454 | ||
@@ -433,7 +457,7 @@ static void imx_shutdown(struct uart_port *port) | |||
433 | */ | 457 | */ |
434 | 458 | ||
435 | UCR1((u32)sport->port.membase) &= | 459 | UCR1((u32)sport->port.membase) &= |
436 | ~(UCR1_TXMPTYEN | UCR1_RRDYEN | UCR1_UARTEN); | 460 | ~(UCR1_TXMPTYEN | UCR1_RRDYEN | UCR1_RTSDEN | UCR1_UARTEN); |
437 | } | 461 | } |
438 | 462 | ||
439 | static void | 463 | static void |
@@ -523,7 +547,7 @@ imx_set_termios(struct uart_port *port, struct termios *termios, | |||
523 | * disable interrupts and drain transmitter | 547 | * disable interrupts and drain transmitter |
524 | */ | 548 | */ |
525 | old_ucr1 = UCR1((u32)sport->port.membase); | 549 | old_ucr1 = UCR1((u32)sport->port.membase); |
526 | UCR1((u32)sport->port.membase) &= ~(UCR1_TXMPTYEN | UCR1_RRDYEN); | 550 | UCR1((u32)sport->port.membase) &= ~(UCR1_TXMPTYEN | UCR1_RRDYEN | UCR1_RTSDEN); |
527 | 551 | ||
528 | while ( !(USR2((u32)sport->port.membase) & USR2_TXDC)) | 552 | while ( !(USR2((u32)sport->port.membase) & USR2_TXDC)) |
529 | barrier(); | 553 | barrier(); |
@@ -644,6 +668,7 @@ static struct imx_port imx_ports[] = { | |||
644 | { | 668 | { |
645 | .txirq = UART1_MINT_TX, | 669 | .txirq = UART1_MINT_TX, |
646 | .rxirq = UART1_MINT_RX, | 670 | .rxirq = UART1_MINT_RX, |
671 | .rtsirq = UART1_MINT_RTS, | ||
647 | .port = { | 672 | .port = { |
648 | .type = PORT_IMX, | 673 | .type = PORT_IMX, |
649 | .iotype = SERIAL_IO_MEM, | 674 | .iotype = SERIAL_IO_MEM, |
@@ -659,6 +684,7 @@ static struct imx_port imx_ports[] = { | |||
659 | }, { | 684 | }, { |
660 | .txirq = UART2_MINT_TX, | 685 | .txirq = UART2_MINT_TX, |
661 | .rxirq = UART2_MINT_RX, | 686 | .rxirq = UART2_MINT_RX, |
687 | .rtsirq = UART2_MINT_RTS, | ||
662 | .port = { | 688 | .port = { |
663 | .type = PORT_IMX, | 689 | .type = PORT_IMX, |
664 | .iotype = SERIAL_IO_MEM, | 690 | .iotype = SERIAL_IO_MEM, |
@@ -738,7 +764,7 @@ imx_console_write(struct console *co, const char *s, unsigned int count) | |||
738 | 764 | ||
739 | UCR1((u32)sport->port.membase) = | 765 | UCR1((u32)sport->port.membase) = |
740 | (old_ucr1 | UCR1_UARTCLKEN | UCR1_UARTEN) | 766 | (old_ucr1 | UCR1_UARTCLKEN | UCR1_UARTEN) |
741 | & ~(UCR1_TXMPTYEN | UCR1_RRDYEN); | 767 | & ~(UCR1_TXMPTYEN | UCR1_RRDYEN | UCR1_RTSDEN); |
742 | UCR2((u32)sport->port.membase) = old_ucr2 | UCR2_TXEN; | 768 | UCR2((u32)sport->port.membase) = old_ucr2 | UCR2_TXEN; |
743 | 769 | ||
744 | /* | 770 | /* |
diff --git a/drivers/serial/pxa.c b/drivers/serial/pxa.c index 672b359b07ce..90c2a86c421b 100644 --- a/drivers/serial/pxa.c +++ b/drivers/serial/pxa.c | |||
@@ -499,7 +499,7 @@ serial_pxa_set_termios(struct uart_port *port, struct termios *termios, | |||
499 | /* | 499 | /* |
500 | * Update the per-port timeout. | 500 | * Update the per-port timeout. |
501 | */ | 501 | */ |
502 | uart_update_timeout(port, termios->c_cflag, quot); | 502 | uart_update_timeout(port, termios->c_cflag, baud); |
503 | 503 | ||
504 | up->port.read_status_mask = UART_LSR_OE | UART_LSR_THRE | UART_LSR_DR; | 504 | up->port.read_status_mask = UART_LSR_OE | UART_LSR_THRE | UART_LSR_DR; |
505 | if (termios->c_iflag & INPCK) | 505 | if (termios->c_iflag & INPCK) |
diff --git a/drivers/serial/s3c2410.c b/drivers/serial/s3c2410.c index 50d7870d92bb..52692aa345ec 100644 --- a/drivers/serial/s3c2410.c +++ b/drivers/serial/s3c2410.c | |||
@@ -1092,8 +1092,8 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport, | |||
1092 | 1092 | ||
1093 | static int probe_index = 0; | 1093 | static int probe_index = 0; |
1094 | 1094 | ||
1095 | int s3c24xx_serial_probe(struct device *_dev, | 1095 | static int s3c24xx_serial_probe(struct device *_dev, |
1096 | struct s3c24xx_uart_info *info) | 1096 | struct s3c24xx_uart_info *info) |
1097 | { | 1097 | { |
1098 | struct s3c24xx_uart_port *ourport; | 1098 | struct s3c24xx_uart_port *ourport; |
1099 | struct platform_device *dev = to_platform_device(_dev); | 1099 | struct platform_device *dev = to_platform_device(_dev); |
@@ -1120,7 +1120,7 @@ int s3c24xx_serial_probe(struct device *_dev, | |||
1120 | return ret; | 1120 | return ret; |
1121 | } | 1121 | } |
1122 | 1122 | ||
1123 | int s3c24xx_serial_remove(struct device *_dev) | 1123 | static int s3c24xx_serial_remove(struct device *_dev) |
1124 | { | 1124 | { |
1125 | struct uart_port *port = s3c24xx_dev_to_port(_dev); | 1125 | struct uart_port *port = s3c24xx_dev_to_port(_dev); |
1126 | 1126 | ||
@@ -1134,7 +1134,8 @@ int s3c24xx_serial_remove(struct device *_dev) | |||
1134 | 1134 | ||
1135 | #ifdef CONFIG_PM | 1135 | #ifdef CONFIG_PM |
1136 | 1136 | ||
1137 | int s3c24xx_serial_suspend(struct device *dev, pm_message_t state, u32 level) | 1137 | static int s3c24xx_serial_suspend(struct device *dev, pm_message_t state, |
1138 | u32 level) | ||
1138 | { | 1139 | { |
1139 | struct uart_port *port = s3c24xx_dev_to_port(dev); | 1140 | struct uart_port *port = s3c24xx_dev_to_port(dev); |
1140 | 1141 | ||
@@ -1144,7 +1145,7 @@ int s3c24xx_serial_suspend(struct device *dev, pm_message_t state, u32 level) | |||
1144 | return 0; | 1145 | return 0; |
1145 | } | 1146 | } |
1146 | 1147 | ||
1147 | int s3c24xx_serial_resume(struct device *dev, u32 level) | 1148 | static int s3c24xx_serial_resume(struct device *dev, u32 level) |
1148 | { | 1149 | { |
1149 | struct uart_port *port = s3c24xx_dev_to_port(dev); | 1150 | struct uart_port *port = s3c24xx_dev_to_port(dev); |
1150 | struct s3c24xx_uart_port *ourport = to_ourport(port); | 1151 | struct s3c24xx_uart_port *ourport = to_ourport(port); |
@@ -1165,8 +1166,8 @@ int s3c24xx_serial_resume(struct device *dev, u32 level) | |||
1165 | #define s3c24xx_serial_resume NULL | 1166 | #define s3c24xx_serial_resume NULL |
1166 | #endif | 1167 | #endif |
1167 | 1168 | ||
1168 | int s3c24xx_serial_init(struct device_driver *drv, | 1169 | static int s3c24xx_serial_init(struct device_driver *drv, |
1169 | struct s3c24xx_uart_info *info) | 1170 | struct s3c24xx_uart_info *info) |
1170 | { | 1171 | { |
1171 | dbg("s3c24xx_serial_init(%p,%p)\n", drv, info); | 1172 | dbg("s3c24xx_serial_init(%p,%p)\n", drv, info); |
1172 | return driver_register(drv); | 1173 | return driver_register(drv); |
@@ -1235,6 +1236,7 @@ static int s3c2400_serial_probe(struct device *dev) | |||
1235 | 1236 | ||
1236 | static struct device_driver s3c2400_serial_drv = { | 1237 | static struct device_driver s3c2400_serial_drv = { |
1237 | .name = "s3c2400-uart", | 1238 | .name = "s3c2400-uart", |
1239 | .owner = THIS_MODULE, | ||
1238 | .bus = &platform_bus_type, | 1240 | .bus = &platform_bus_type, |
1239 | .probe = s3c2400_serial_probe, | 1241 | .probe = s3c2400_serial_probe, |
1240 | .remove = s3c24xx_serial_remove, | 1242 | .remove = s3c24xx_serial_remove, |
@@ -1338,6 +1340,7 @@ static int s3c2410_serial_probe(struct device *dev) | |||
1338 | 1340 | ||
1339 | static struct device_driver s3c2410_serial_drv = { | 1341 | static struct device_driver s3c2410_serial_drv = { |
1340 | .name = "s3c2410-uart", | 1342 | .name = "s3c2410-uart", |
1343 | .owner = THIS_MODULE, | ||
1341 | .bus = &platform_bus_type, | 1344 | .bus = &platform_bus_type, |
1342 | .probe = s3c2410_serial_probe, | 1345 | .probe = s3c2410_serial_probe, |
1343 | .remove = s3c24xx_serial_remove, | 1346 | .remove = s3c24xx_serial_remove, |
@@ -1499,6 +1502,7 @@ static int s3c2440_serial_probe(struct device *dev) | |||
1499 | 1502 | ||
1500 | static struct device_driver s3c2440_serial_drv = { | 1503 | static struct device_driver s3c2440_serial_drv = { |
1501 | .name = "s3c2440-uart", | 1504 | .name = "s3c2440-uart", |
1505 | .owner = THIS_MODULE, | ||
1502 | .bus = &platform_bus_type, | 1506 | .bus = &platform_bus_type, |
1503 | .probe = s3c2440_serial_probe, | 1507 | .probe = s3c2440_serial_probe, |
1504 | .remove = s3c24xx_serial_remove, | 1508 | .remove = s3c24xx_serial_remove, |
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c index 512266307866..430754ebac8a 100644 --- a/drivers/serial/sh-sci.c +++ b/drivers/serial/sh-sci.c | |||
@@ -967,7 +967,7 @@ static int sci_startup(struct uart_port *port) | |||
967 | #endif | 967 | #endif |
968 | 968 | ||
969 | sci_request_irq(s); | 969 | sci_request_irq(s); |
970 | sci_start_tx(port, 1); | 970 | sci_start_tx(port); |
971 | sci_start_rx(port, 1); | 971 | sci_start_rx(port, 1); |
972 | 972 | ||
973 | return 0; | 973 | return 0; |
diff --git a/drivers/serial/sunsab.c b/drivers/serial/sunsab.c index e971156daa60..ba9381fd3f2d 100644 --- a/drivers/serial/sunsab.c +++ b/drivers/serial/sunsab.c | |||
@@ -274,7 +274,6 @@ static void transmit_chars(struct uart_sunsab_port *up, | |||
274 | if (uart_circ_empty(xmit) || uart_tx_stopped(&up->port)) { | 274 | if (uart_circ_empty(xmit) || uart_tx_stopped(&up->port)) { |
275 | up->interrupt_mask1 |= SAB82532_IMR1_XPR; | 275 | up->interrupt_mask1 |= SAB82532_IMR1_XPR; |
276 | writeb(up->interrupt_mask1, &up->regs->w.imr1); | 276 | writeb(up->interrupt_mask1, &up->regs->w.imr1); |
277 | uart_write_wakeup(&up->port); | ||
278 | return; | 277 | return; |
279 | } | 278 | } |
280 | 279 | ||
diff --git a/drivers/serial/sunzilog.c b/drivers/serial/sunzilog.c index d75445738c88..7653d6cf05af 100644 --- a/drivers/serial/sunzilog.c +++ b/drivers/serial/sunzilog.c | |||
@@ -517,10 +517,9 @@ static void sunzilog_transmit_chars(struct uart_sunzilog_port *up, | |||
517 | if (up->port.info == NULL) | 517 | if (up->port.info == NULL) |
518 | goto ack_tx_int; | 518 | goto ack_tx_int; |
519 | xmit = &up->port.info->xmit; | 519 | xmit = &up->port.info->xmit; |
520 | if (uart_circ_empty(xmit)) { | 520 | if (uart_circ_empty(xmit)) |
521 | uart_write_wakeup(&up->port); | ||
522 | goto ack_tx_int; | 521 | goto ack_tx_int; |
523 | } | 522 | |
524 | if (uart_tx_stopped(&up->port)) | 523 | if (uart_tx_stopped(&up->port)) |
525 | goto ack_tx_int; | 524 | goto ack_tx_int; |
526 | 525 | ||