aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/8250.c3
-rw-r--r--drivers/serial/cpm_uart/cpm_uart_cpm1.c32
-rw-r--r--drivers/serial/pmac_zilog.c9
-rw-r--r--drivers/serial/s3c2410.c5
-rw-r--r--drivers/serial/serial_core.c14
-rw-r--r--drivers/serial/serial_cs.c7
6 files changed, 50 insertions, 20 deletions
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index 9224fc3184ea..7e8fc7c1d4cc 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -2061,7 +2061,8 @@ static void __init serial8250_isa_init_ports(void)
2061 up->port.ops = &serial8250_pops; 2061 up->port.ops = &serial8250_pops;
2062 } 2062 }
2063 2063
2064 for (i = 0, up = serial8250_ports; i < ARRAY_SIZE(old_serial_port); 2064 for (i = 0, up = serial8250_ports;
2065 i < ARRAY_SIZE(old_serial_port) && i < UART_NR;
2065 i++, up++) { 2066 i++, up++) {
2066 up->port.iobase = old_serial_port[i].port; 2067 up->port.iobase = old_serial_port[i].port;
2067 up->port.irq = irq_canonicalize(old_serial_port[i].irq); 2068 up->port.irq = irq_canonicalize(old_serial_port[i].irq);
diff --git a/drivers/serial/cpm_uart/cpm_uart_cpm1.c b/drivers/serial/cpm_uart/cpm_uart_cpm1.c
index de26cf7b003c..7911912f50c7 100644
--- a/drivers/serial/cpm_uart/cpm_uart_cpm1.c
+++ b/drivers/serial/cpm_uart/cpm_uart_cpm1.c
@@ -94,12 +94,42 @@ void smc1_lineif(struct uart_cpm_port *pinfo)
94 ((immap_t *)IMAP_ADDR)->im_ioport.iop_paodr &= ~iobits; 94 ((immap_t *)IMAP_ADDR)->im_ioport.iop_paodr &= ~iobits;
95 } 95 }
96 96
97#ifdef CONFIG_MPC885ADS
98 /* Enable SMC1 transceivers */
99 {
100 volatile uint __iomem *bcsr1 = ioremap(BCSR1, 4);
101 uint tmp;
102
103 tmp = in_be32(bcsr1);
104 tmp &= ~BCSR1_RS232EN_1;
105 out_be32(bcsr1, tmp);
106 iounmap(bcsr1);
107 }
108#endif
109
97 pinfo->brg = 1; 110 pinfo->brg = 1;
98} 111}
99 112
100void smc2_lineif(struct uart_cpm_port *pinfo) 113void smc2_lineif(struct uart_cpm_port *pinfo)
101{ 114{
102 /* XXX SMC2: insert port configuration here */ 115#ifdef CONFIG_MPC885ADS
116 volatile cpm8xx_t *cp = cpmp;
117 volatile uint __iomem *bcsr1;
118 uint tmp;
119
120 cp->cp_pepar |= 0x00000c00;
121 cp->cp_pedir &= ~0x00000c00;
122 cp->cp_peso &= ~0x00000400;
123 cp->cp_peso |= 0x00000800;
124
125 /* Enable SMC2 transceivers */
126 bcsr1 = ioremap(BCSR1, 4);
127 tmp = in_be32(bcsr1);
128 tmp &= ~BCSR1_RS232EN_2;
129 out_be32(bcsr1, tmp);
130 iounmap(bcsr1);
131#endif
132
103 pinfo->brg = 2; 133 pinfo->brg = 2;
104} 134}
105 135
diff --git a/drivers/serial/pmac_zilog.c b/drivers/serial/pmac_zilog.c
index 1c9f71617123..7db2f37532cf 100644
--- a/drivers/serial/pmac_zilog.c
+++ b/drivers/serial/pmac_zilog.c
@@ -1545,7 +1545,7 @@ static void pmz_dispose_port(struct uart_pmac_port *uap)
1545/* 1545/*
1546 * Called upon match with an escc node in the devive-tree. 1546 * Called upon match with an escc node in the devive-tree.
1547 */ 1547 */
1548static int pmz_attach(struct macio_dev *mdev, const struct of_match *match) 1548static int pmz_attach(struct macio_dev *mdev, const struct of_device_id *match)
1549{ 1549{
1550 int i; 1550 int i;
1551 1551
@@ -1850,20 +1850,17 @@ err_out:
1850 return rc; 1850 return rc;
1851} 1851}
1852 1852
1853static struct of_match pmz_match[] = 1853static struct of_device_id pmz_match[] =
1854{ 1854{
1855 { 1855 {
1856 .name = "ch-a", 1856 .name = "ch-a",
1857 .type = OF_ANY_MATCH,
1858 .compatible = OF_ANY_MATCH
1859 }, 1857 },
1860 { 1858 {
1861 .name = "ch-b", 1859 .name = "ch-b",
1862 .type = OF_ANY_MATCH,
1863 .compatible = OF_ANY_MATCH
1864 }, 1860 },
1865 {}, 1861 {},
1866}; 1862};
1863MODULE_DEVICE_TABLE (of, pmz_match);
1867 1864
1868static struct macio_driver pmz_driver = 1865static struct macio_driver pmz_driver =
1869{ 1866{
diff --git a/drivers/serial/s3c2410.c b/drivers/serial/s3c2410.c
index 5c4678478b1d..7365d4b50b95 100644
--- a/drivers/serial/s3c2410.c
+++ b/drivers/serial/s3c2410.c
@@ -522,14 +522,11 @@ static void s3c24xx_serial_shutdown(struct uart_port *port)
522static int s3c24xx_serial_startup(struct uart_port *port) 522static int s3c24xx_serial_startup(struct uart_port *port)
523{ 523{
524 struct s3c24xx_uart_port *ourport = to_ourport(port); 524 struct s3c24xx_uart_port *ourport = to_ourport(port);
525 unsigned long flags;
526 int ret; 525 int ret;
527 526
528 dbg("s3c24xx_serial_startup: port=%p (%08lx,%p)\n", 527 dbg("s3c24xx_serial_startup: port=%p (%08lx,%p)\n",
529 port->mapbase, port->membase); 528 port->mapbase, port->membase);
530 529
531 local_irq_save(flags);
532
533 rx_enabled(port) = 1; 530 rx_enabled(port) = 1;
534 531
535 ret = request_irq(RX_IRQ(port), 532 ret = request_irq(RX_IRQ(port),
@@ -563,12 +560,10 @@ static int s3c24xx_serial_startup(struct uart_port *port)
563 /* the port reset code should have done the correct 560 /* the port reset code should have done the correct
564 * register setup for the port controls */ 561 * register setup for the port controls */
565 562
566 local_irq_restore(flags);
567 return ret; 563 return ret;
568 564
569 err: 565 err:
570 s3c24xx_serial_shutdown(port); 566 s3c24xx_serial_shutdown(port);
571 local_irq_restore(flags);
572 return ret; 567 return ret;
573} 568}
574 569
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
index 139863a787f3..54699c3a00ab 100644
--- a/drivers/serial/serial_core.c
+++ b/drivers/serial/serial_core.c
@@ -1808,6 +1808,12 @@ uart_set_options(struct uart_port *port, struct console *co,
1808 struct termios termios; 1808 struct termios termios;
1809 int i; 1809 int i;
1810 1810
1811 /*
1812 * Ensure that the serial console lock is initialised
1813 * early.
1814 */
1815 spin_lock_init(&port->lock);
1816
1811 memset(&termios, 0, sizeof(struct termios)); 1817 memset(&termios, 0, sizeof(struct termios));
1812 1818
1813 termios.c_cflag = CREAD | HUPCL | CLOCAL; 1819 termios.c_cflag = CREAD | HUPCL | CLOCAL;
@@ -2196,10 +2202,16 @@ int uart_add_one_port(struct uart_driver *drv, struct uart_port *port)
2196 2202
2197 state->port = port; 2203 state->port = port;
2198 2204
2199 spin_lock_init(&port->lock);
2200 port->cons = drv->cons; 2205 port->cons = drv->cons;
2201 port->info = state->info; 2206 port->info = state->info;
2202 2207
2208 /*
2209 * If this port is a console, then the spinlock is already
2210 * initialised.
2211 */
2212 if (!uart_console(port))
2213 spin_lock_init(&port->lock);
2214
2203 uart_configure_port(drv, state, port); 2215 uart_configure_port(drv, state, port);
2204 2216
2205 /* 2217 /*
diff --git a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c
index 73a34b18866f..de0136cc5938 100644
--- a/drivers/serial/serial_cs.c
+++ b/drivers/serial/serial_cs.c
@@ -45,7 +45,6 @@
45#include <asm/io.h> 45#include <asm/io.h>
46#include <asm/system.h> 46#include <asm/system.h>
47 47
48#include <pcmcia/version.h>
49#include <pcmcia/cs_types.h> 48#include <pcmcia/cs_types.h>
50#include <pcmcia/cs.h> 49#include <pcmcia/cs.h>
51#include <pcmcia/cistpl.h> 50#include <pcmcia/cistpl.h>
@@ -232,11 +231,6 @@ static dev_link_t *serial_attach(void)
232 link->next = dev_list; 231 link->next = dev_list;
233 dev_list = link; 232 dev_list = link;
234 client_reg.dev_info = &dev_info; 233 client_reg.dev_info = &dev_info;
235 client_reg.EventMask =
236 CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL |
237 CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET |
238 CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME;
239 client_reg.event_handler = &serial_event;
240 client_reg.Version = 0x0210; 234 client_reg.Version = 0x0210;
241 client_reg.event_callback_args.client_data = link; 235 client_reg.event_callback_args.client_data = link;
242 ret = pcmcia_register_client(&link->handle, &client_reg); 236 ret = pcmcia_register_client(&link->handle, &client_reg);
@@ -883,6 +877,7 @@ static struct pcmcia_driver serial_cs_driver = {
883 .name = "serial_cs", 877 .name = "serial_cs",
884 }, 878 },
885 .attach = serial_attach, 879 .attach = serial_attach,
880 .event = serial_event,
886 .detach = serial_detach, 881 .detach = serial_detach,
887 .id_table = serial_ids, 882 .id_table = serial_ids,
888}; 883};