aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2005-09-08 01:45:47 -0400
committerLen Brown <len.brown@intel.com>2005-09-08 01:45:47 -0400
commit64e47488c913ac704d465a6af86a26786d1412a5 (patch)
treed3b0148592963dcde26e4bb35ddfec8b1eaf8e23 /drivers/serial
parent4a35a46bf1cda4737c428380d1db5d15e2590d18 (diff)
parentcaf39e87cc1182f7dae84eefc43ca14d54c78ef9 (diff)
Merge linux-2.6 with linux-acpi-2.6
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/68328serial.c1
-rw-r--r--drivers/serial/68360serial.c8
-rw-r--r--drivers/serial/Kconfig2
-rw-r--r--drivers/serial/cpm_uart/cpm_uart_core.c13
-rw-r--r--drivers/serial/cpm_uart/cpm_uart_cpm2.c11
-rw-r--r--drivers/serial/crisv10.c15
-rw-r--r--drivers/serial/icom.c1
-rw-r--r--drivers/serial/mcfserial.c1
-rw-r--r--drivers/serial/pmac_zilog.c6
-rw-r--r--drivers/serial/serial_core.c20
-rw-r--r--drivers/serial/serial_lh7a40x.c4
-rw-r--r--drivers/serial/sunsu.c10
12 files changed, 47 insertions, 45 deletions
diff --git a/drivers/serial/68328serial.c b/drivers/serial/68328serial.c
index 9097f2f7b12a..2efb317153ce 100644
--- a/drivers/serial/68328serial.c
+++ b/drivers/serial/68328serial.c
@@ -40,7 +40,6 @@
40#include <asm/io.h> 40#include <asm/io.h>
41#include <asm/irq.h> 41#include <asm/irq.h>
42#include <asm/system.h> 42#include <asm/system.h>
43#include <asm/segment.h>
44#include <asm/delay.h> 43#include <asm/delay.h>
45#include <asm/uaccess.h> 44#include <asm/uaccess.h>
46 45
diff --git a/drivers/serial/68360serial.c b/drivers/serial/68360serial.c
index b116122e569a..170c9d2a749c 100644
--- a/drivers/serial/68360serial.c
+++ b/drivers/serial/68360serial.c
@@ -2474,8 +2474,7 @@ static struct tty_operations rs_360_ops = {
2474 .tiocmset = rs_360_tiocmset, 2474 .tiocmset = rs_360_tiocmset,
2475}; 2475};
2476 2476
2477/* int __init rs_360_init(void) */ 2477static int __init rs_360_init(void)
2478int rs_360_init(void)
2479{ 2478{
2480 struct serial_state * state; 2479 struct serial_state * state;
2481 ser_info_t *info; 2480 ser_info_t *info;
@@ -2827,10 +2826,7 @@ int rs_360_init(void)
2827 2826
2828 return 0; 2827 return 0;
2829} 2828}
2830 2829module_init(rs_360_init);
2831
2832
2833
2834 2830
2835/* This must always be called before the rs_360_init() function, otherwise 2831/* This must always be called before the rs_360_init() function, otherwise
2836 * it blows away the port control information. 2832 * it blows away the port control information.
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index db8f39c30096..b745a1b9e835 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -308,7 +308,7 @@ config SERIAL_S3C2410_CONSOLE
308 308
309config SERIAL_DZ 309config SERIAL_DZ
310 bool "DECstation DZ serial driver" 310 bool "DECstation DZ serial driver"
311 depends on MACH_DECSTATION && MIPS32 311 depends on MACH_DECSTATION && 32BIT
312 select SERIAL_CORE 312 select SERIAL_CORE
313 help 313 help
314 DZ11-family serial controllers for VAXstations, including the 314 DZ11-family serial controllers for VAXstations, including the
diff --git a/drivers/serial/cpm_uart/cpm_uart_core.c b/drivers/serial/cpm_uart/cpm_uart_core.c
index 282b32351d8e..25825f2aba22 100644
--- a/drivers/serial/cpm_uart/cpm_uart_core.c
+++ b/drivers/serial/cpm_uart/cpm_uart_core.c
@@ -403,10 +403,8 @@ static int cpm_uart_startup(struct uart_port *port)
403 403
404inline void cpm_uart_wait_until_send(struct uart_cpm_port *pinfo) 404inline void cpm_uart_wait_until_send(struct uart_cpm_port *pinfo)
405{ 405{
406 unsigned long target_jiffies = jiffies + pinfo->wait_closing; 406 set_current_state(TASK_UNINTERRUPTIBLE);
407 407 schedule_timeout(pinfo->wait_closing);
408 while (!time_after(jiffies, target_jiffies))
409 schedule();
410} 408}
411 409
412/* 410/*
@@ -425,9 +423,12 @@ static void cpm_uart_shutdown(struct uart_port *port)
425 /* If the port is not the console, disable Rx and Tx. */ 423 /* If the port is not the console, disable Rx and Tx. */
426 if (!(pinfo->flags & FLAG_CONSOLE)) { 424 if (!(pinfo->flags & FLAG_CONSOLE)) {
427 /* Wait for all the BDs marked sent */ 425 /* Wait for all the BDs marked sent */
428 while(!cpm_uart_tx_empty(port)) 426 while(!cpm_uart_tx_empty(port)) {
427 set_current_state(TASK_UNINTERRUPTIBLE);
429 schedule_timeout(2); 428 schedule_timeout(2);
430 if(pinfo->wait_closing) 429 }
430
431 if (pinfo->wait_closing)
431 cpm_uart_wait_until_send(pinfo); 432 cpm_uart_wait_until_send(pinfo);
432 433
433 /* Stop uarts */ 434 /* Stop uarts */
diff --git a/drivers/serial/cpm_uart/cpm_uart_cpm2.c b/drivers/serial/cpm_uart/cpm_uart_cpm2.c
index c4c8f4b44f53..15ad58d94889 100644
--- a/drivers/serial/cpm_uart/cpm_uart_cpm2.c
+++ b/drivers/serial/cpm_uart/cpm_uart_cpm2.c
@@ -142,6 +142,14 @@ void scc2_lineif(struct uart_cpm_port *pinfo)
142 * be supported in a sane fashion. 142 * be supported in a sane fashion.
143 */ 143 */
144#ifndef CONFIG_STX_GP3 144#ifndef CONFIG_STX_GP3
145#ifdef CONFIG_MPC8560_ADS
146 volatile iop_cpm2_t *io = &cpm2_immr->im_ioport;
147 io->iop_ppard |= 0x00000018;
148 io->iop_psord &= ~0x00000008; /* Rx */
149 io->iop_psord &= ~0x00000010; /* Tx */
150 io->iop_pdird &= ~0x00000008; /* Rx */
151 io->iop_pdird |= 0x00000010; /* Tx */
152#else
145 volatile iop_cpm2_t *io = &cpm2_immr->im_ioport; 153 volatile iop_cpm2_t *io = &cpm2_immr->im_ioport;
146 io->iop_pparb |= 0x008b0000; 154 io->iop_pparb |= 0x008b0000;
147 io->iop_pdirb |= 0x00880000; 155 io->iop_pdirb |= 0x00880000;
@@ -149,6 +157,7 @@ void scc2_lineif(struct uart_cpm_port *pinfo)
149 io->iop_pdirb &= ~0x00030000; 157 io->iop_pdirb &= ~0x00030000;
150 io->iop_psorb &= ~0x00030000; 158 io->iop_psorb &= ~0x00030000;
151#endif 159#endif
160#endif
152 cpm2_immr->im_cpmux.cmx_scr &= 0xff00ffff; 161 cpm2_immr->im_cpmux.cmx_scr &= 0xff00ffff;
153 cpm2_immr->im_cpmux.cmx_scr |= 0x00090000; 162 cpm2_immr->im_cpmux.cmx_scr |= 0x00090000;
154 pinfo->brg = 2; 163 pinfo->brg = 2;
@@ -257,6 +266,7 @@ int cpm_uart_init_portdesc(void)
257 cpm_uart_ports[UART_SMC1].smcp = (smc_t *) & cpm2_immr->im_smc[0]; 266 cpm_uart_ports[UART_SMC1].smcp = (smc_t *) & cpm2_immr->im_smc[0];
258 cpm_uart_ports[UART_SMC1].smcup = 267 cpm_uart_ports[UART_SMC1].smcup =
259 (smc_uart_t *) & cpm2_immr->im_dprambase[PROFF_SMC1]; 268 (smc_uart_t *) & cpm2_immr->im_dprambase[PROFF_SMC1];
269 *(u16 *)(&cpm2_immr->im_dprambase[PROFF_SMC1_BASE]) = PROFF_SMC1;
260 cpm_uart_ports[UART_SMC1].port.mapbase = 270 cpm_uart_ports[UART_SMC1].port.mapbase =
261 (unsigned long)&cpm2_immr->im_smc[0]; 271 (unsigned long)&cpm2_immr->im_smc[0];
262 cpm_uart_ports[UART_SMC1].smcp->smc_smcm |= (SMCM_RX | SMCM_TX); 272 cpm_uart_ports[UART_SMC1].smcp->smc_smcm |= (SMCM_RX | SMCM_TX);
@@ -269,6 +279,7 @@ int cpm_uart_init_portdesc(void)
269 cpm_uart_ports[UART_SMC2].smcp = (smc_t *) & cpm2_immr->im_smc[1]; 279 cpm_uart_ports[UART_SMC2].smcp = (smc_t *) & cpm2_immr->im_smc[1];
270 cpm_uart_ports[UART_SMC2].smcup = 280 cpm_uart_ports[UART_SMC2].smcup =
271 (smc_uart_t *) & cpm2_immr->im_dprambase[PROFF_SMC2]; 281 (smc_uart_t *) & cpm2_immr->im_dprambase[PROFF_SMC2];
282 *(u16 *)(&cpm2_immr->im_dprambase[PROFF_SMC2_BASE]) = PROFF_SMC2;
272 cpm_uart_ports[UART_SMC2].port.mapbase = 283 cpm_uart_ports[UART_SMC2].port.mapbase =
273 (unsigned long)&cpm2_immr->im_smc[1]; 284 (unsigned long)&cpm2_immr->im_smc[1];
274 cpm_uart_ports[UART_SMC2].smcp->smc_smcm |= (SMCM_RX | SMCM_TX); 285 cpm_uart_ports[UART_SMC2].smcp->smc_smcm |= (SMCM_RX | SMCM_TX);
diff --git a/drivers/serial/crisv10.c b/drivers/serial/crisv10.c
index 23b8871e74cc..40d3e7139cfe 100644
--- a/drivers/serial/crisv10.c
+++ b/drivers/serial/crisv10.c
@@ -446,7 +446,6 @@ static char *serial_version = "$Revision: 1.25 $";
446#include <asm/io.h> 446#include <asm/io.h>
447#include <asm/irq.h> 447#include <asm/irq.h>
448#include <asm/system.h> 448#include <asm/system.h>
449#include <asm/segment.h>
450#include <asm/bitops.h> 449#include <asm/bitops.h>
451#include <linux/delay.h> 450#include <linux/delay.h>
452 451
@@ -5041,17 +5040,3 @@ rs_init(void)
5041/* this makes sure that rs_init is called during kernel boot */ 5040/* this makes sure that rs_init is called during kernel boot */
5042 5041
5043module_init(rs_init); 5042module_init(rs_init);
5044
5045/*
5046 * register_serial and unregister_serial allows for serial ports to be
5047 * configured at run-time, to support PCMCIA modems.
5048 */
5049int
5050register_serial(struct serial_struct *req)
5051{
5052 return -1;
5053}
5054
5055void unregister_serial(int line)
5056{
5057}
diff --git a/drivers/serial/icom.c b/drivers/serial/icom.c
index 79f8df4d66b7..eb31125c6a30 100644
--- a/drivers/serial/icom.c
+++ b/drivers/serial/icom.c
@@ -56,7 +56,6 @@
56#include <linux/bitops.h> 56#include <linux/bitops.h>
57 57
58#include <asm/system.h> 58#include <asm/system.h>
59#include <asm/segment.h>
60#include <asm/io.h> 59#include <asm/io.h>
61#include <asm/irq.h> 60#include <asm/irq.h>
62#include <asm/uaccess.h> 61#include <asm/uaccess.h>
diff --git a/drivers/serial/mcfserial.c b/drivers/serial/mcfserial.c
index 8c40167778de..43b03c55f453 100644
--- a/drivers/serial/mcfserial.c
+++ b/drivers/serial/mcfserial.c
@@ -40,7 +40,6 @@
40#include <asm/io.h> 40#include <asm/io.h>
41#include <asm/irq.h> 41#include <asm/irq.h>
42#include <asm/system.h> 42#include <asm/system.h>
43#include <asm/segment.h>
44#include <asm/semaphore.h> 43#include <asm/semaphore.h>
45#include <asm/delay.h> 44#include <asm/delay.h>
46#include <asm/coldfire.h> 45#include <asm/coldfire.h>
diff --git a/drivers/serial/pmac_zilog.c b/drivers/serial/pmac_zilog.c
index 5bfde99e245e..5ddd8ab1f108 100644
--- a/drivers/serial/pmac_zilog.c
+++ b/drivers/serial/pmac_zilog.c
@@ -1600,7 +1600,7 @@ static int pmz_suspend(struct macio_dev *mdev, pm_message_t pm_state)
1600 return 0; 1600 return 0;
1601 } 1601 }
1602 1602
1603 if (pm_state == mdev->ofdev.dev.power.power_state || pm_state < 2) 1603 if (pm_state.event == mdev->ofdev.dev.power.power_state.event)
1604 return 0; 1604 return 0;
1605 1605
1606 pmz_debug("suspend, switching to state %d\n", pm_state); 1606 pmz_debug("suspend, switching to state %d\n", pm_state);
@@ -1660,7 +1660,7 @@ static int pmz_resume(struct macio_dev *mdev)
1660 if (uap == NULL) 1660 if (uap == NULL)
1661 return 0; 1661 return 0;
1662 1662
1663 if (mdev->ofdev.dev.power.power_state == 0) 1663 if (mdev->ofdev.dev.power.power_state.event == PM_EVENT_ON)
1664 return 0; 1664 return 0;
1665 1665
1666 pmz_debug("resume, switching to state 0\n"); 1666 pmz_debug("resume, switching to state 0\n");
@@ -1713,7 +1713,7 @@ static int pmz_resume(struct macio_dev *mdev)
1713 1713
1714 pmz_debug("resume, switching complete\n"); 1714 pmz_debug("resume, switching complete\n");
1715 1715
1716 mdev->ofdev.dev.power.power_state = 0; 1716 mdev->ofdev.dev.power.power_state.event = PM_EVENT_ON;
1717 1717
1718 return 0; 1718 return 0;
1719} 1719}
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
index dea156a62d0a..2d8622eef701 100644
--- a/drivers/serial/serial_core.c
+++ b/drivers/serial/serial_core.c
@@ -1947,21 +1947,29 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *port)
1947static inline void 1947static inline void
1948uart_report_port(struct uart_driver *drv, struct uart_port *port) 1948uart_report_port(struct uart_driver *drv, struct uart_port *port)
1949{ 1949{
1950 printk("%s%d", drv->dev_name, port->line); 1950 char address[64];
1951 printk(" at "); 1951
1952 switch (port->iotype) { 1952 switch (port->iotype) {
1953 case UPIO_PORT: 1953 case UPIO_PORT:
1954 printk("I/O 0x%x", port->iobase); 1954 snprintf(address, sizeof(address),
1955 "I/O 0x%x", port->iobase);
1955 break; 1956 break;
1956 case UPIO_HUB6: 1957 case UPIO_HUB6:
1957 printk("I/O 0x%x offset 0x%x", port->iobase, port->hub6); 1958 snprintf(address, sizeof(address),
1959 "I/O 0x%x offset 0x%x", port->iobase, port->hub6);
1958 break; 1960 break;
1959 case UPIO_MEM: 1961 case UPIO_MEM:
1960 case UPIO_MEM32: 1962 case UPIO_MEM32:
1961 printk("MMIO 0x%lx", port->mapbase); 1963 snprintf(address, sizeof(address),
1964 "MMIO 0x%lx", port->mapbase);
1965 break;
1966 default:
1967 strlcpy(address, "*unknown*", sizeof(address));
1962 break; 1968 break;
1963 } 1969 }
1964 printk(" (irq = %d) is a %s\n", port->irq, uart_type(port)); 1970
1971 printk(KERN_INFO "%s%d at %s (irq = %d) is a %s\n",
1972 drv->dev_name, port->line, address, port->irq, uart_type(port));
1965} 1973}
1966 1974
1967static void 1975static void
diff --git a/drivers/serial/serial_lh7a40x.c b/drivers/serial/serial_lh7a40x.c
index 32f808d157a1..8302376800c0 100644
--- a/drivers/serial/serial_lh7a40x.c
+++ b/drivers/serial/serial_lh7a40x.c
@@ -207,7 +207,7 @@ static void lh7a40xuart_tx_chars (struct uart_port* port)
207 return; 207 return;
208 } 208 }
209 if (uart_circ_empty (xmit) || uart_tx_stopped (port)) { 209 if (uart_circ_empty (xmit) || uart_tx_stopped (port)) {
210 lh7a40xuart_stop_tx (port, 0); 210 lh7a40xuart_stop_tx (port);
211 return; 211 return;
212 } 212 }
213 213
@@ -229,7 +229,7 @@ static void lh7a40xuart_tx_chars (struct uart_port* port)
229 uart_write_wakeup (port); 229 uart_write_wakeup (port);
230 230
231 if (uart_circ_empty (xmit)) 231 if (uart_circ_empty (xmit))
232 lh7a40xuart_stop_tx (port, 0); 232 lh7a40xuart_stop_tx (port);
233} 233}
234 234
235static void lh7a40xuart_modem_status (struct uart_port* port) 235static void lh7a40xuart_modem_status (struct uart_port* port)
diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c
index 0cc879eb1c02..5959e6755a81 100644
--- a/drivers/serial/sunsu.c
+++ b/drivers/serial/sunsu.c
@@ -269,7 +269,10 @@ static void sunsu_stop_tx(struct uart_port *port)
269 269
270 __stop_tx(up); 270 __stop_tx(up);
271 271
272 if (up->port.type == PORT_16C950 && tty_stop /*FIXME*/) { 272 /*
273 * We really want to stop the transmitter from sending.
274 */
275 if (up->port.type == PORT_16C950) {
273 up->acr |= UART_ACR_TXDIS; 276 up->acr |= UART_ACR_TXDIS;
274 serial_icr_write(up, UART_ACR, up->acr); 277 serial_icr_write(up, UART_ACR, up->acr);
275 } 278 }
@@ -283,10 +286,11 @@ static void sunsu_start_tx(struct uart_port *port)
283 up->ier |= UART_IER_THRI; 286 up->ier |= UART_IER_THRI;
284 serial_out(up, UART_IER, up->ier); 287 serial_out(up, UART_IER, up->ier);
285 } 288 }
289
286 /* 290 /*
287 * We only do this from uart_start 291 * Re-enable the transmitter if we disabled it.
288 */ 292 */
289 if (tty_start && up->port.type == PORT_16C950 /*FIXME*/) { 293 if (up->port.type == PORT_16C950 && up->acr & UART_ACR_TXDIS) {
290 up->acr &= ~UART_ACR_TXDIS; 294 up->acr &= ~UART_ACR_TXDIS;
291 serial_icr_write(up, UART_ACR, up->acr); 295 serial_icr_write(up, UART_ACR, up->acr);
292 } 296 }