aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/21285.c4
-rw-r--r--drivers/serial/68328serial.c2
-rw-r--r--drivers/serial/68360serial.c2
-rw-r--r--drivers/serial/8250.c6
-rw-r--r--drivers/serial/8250_pci.c24
-rw-r--r--drivers/serial/Kconfig57
-rw-r--r--drivers/serial/amba-pl010.c6
-rw-r--r--drivers/serial/amba-pl011.c6
-rw-r--r--drivers/serial/atmel_serial.c9
-rw-r--r--drivers/serial/atmel_serial.h2
-rw-r--r--drivers/serial/clps711x.c4
-rw-r--r--drivers/serial/crisv10.c8
-rw-r--r--drivers/serial/crisv10.h4
-rw-r--r--drivers/serial/dz.c4
-rw-r--r--drivers/serial/icom.c6
-rw-r--r--drivers/serial/imx.c4
-rw-r--r--drivers/serial/ioc3_serial.c4
-rw-r--r--drivers/serial/ioc4_serial.c6
-rw-r--r--drivers/serial/ip22zilog.c4
-rw-r--r--drivers/serial/jsm/jsm_tty.c10
-rw-r--r--drivers/serial/m32r_sio.c2
-rw-r--r--drivers/serial/mcfserial.c2
-rw-r--r--drivers/serial/mpc52xx_uart.c6
-rw-r--r--drivers/serial/mpsc.c4
-rw-r--r--drivers/serial/mux.c4
-rw-r--r--drivers/serial/netx-serial.c4
-rw-r--r--drivers/serial/pmac_zilog.c10
-rw-r--r--drivers/serial/pmac_zilog.h2
-rw-r--r--drivers/serial/pxa.c4
-rw-r--r--drivers/serial/s3c2410.c4
-rw-r--r--drivers/serial/sa1100.c4
-rw-r--r--drivers/serial/serial_core.c21
-rw-r--r--drivers/serial/serial_lh7a40x.c4
-rw-r--r--drivers/serial/serial_txx9.c4
-rw-r--r--drivers/serial/sh-sci.c26
-rw-r--r--drivers/serial/sh-sci.h19
-rw-r--r--drivers/serial/sn_console.c4
-rw-r--r--drivers/serial/sunhv.c4
-rw-r--r--drivers/serial/sunsab.c15
-rw-r--r--drivers/serial/sunsu.c14
-rw-r--r--drivers/serial/sunzilog.c18
-rw-r--r--drivers/serial/uartlite.c8
-rw-r--r--drivers/serial/v850e_uart.c4
-rw-r--r--drivers/serial/vr41xx_siu.c4
44 files changed, 222 insertions, 141 deletions
diff --git a/drivers/serial/21285.c b/drivers/serial/21285.c
index 6a1a568ca649..facb67855619 100644
--- a/drivers/serial/21285.c
+++ b/drivers/serial/21285.c
@@ -214,8 +214,8 @@ static void serial21285_shutdown(struct uart_port *port)
214} 214}
215 215
216static void 216static void
217serial21285_set_termios(struct uart_port *port, struct termios *termios, 217serial21285_set_termios(struct uart_port *port, struct ktermios *termios,
218 struct termios *old) 218 struct ktermios *old)
219{ 219{
220 unsigned long flags; 220 unsigned long flags;
221 unsigned int baud, quot, h_lcr; 221 unsigned int baud, quot, h_lcr;
diff --git a/drivers/serial/68328serial.c b/drivers/serial/68328serial.c
index 9b8b585513ec..cad426c9711e 100644
--- a/drivers/serial/68328serial.c
+++ b/drivers/serial/68328serial.c
@@ -1061,7 +1061,7 @@ static int rs_ioctl(struct tty_struct *tty, struct file * file,
1061 return 0; 1061 return 0;
1062} 1062}
1063 1063
1064static void rs_set_termios(struct tty_struct *tty, struct termios *old_termios) 1064static void rs_set_termios(struct tty_struct *tty, struct ktermios *old_termios)
1065{ 1065{
1066 struct m68k_serial *info = (struct m68k_serial *)tty->driver_data; 1066 struct m68k_serial *info = (struct m68k_serial *)tty->driver_data;
1067 1067
diff --git a/drivers/serial/68360serial.c b/drivers/serial/68360serial.c
index 634ecca36a77..68817a7d8c0d 100644
--- a/drivers/serial/68360serial.c
+++ b/drivers/serial/68360serial.c
@@ -1523,7 +1523,7 @@ static int rs_360_ioctl(struct tty_struct *tty, struct file * file,
1523 1523
1524/* FIX UP modem control here someday...... 1524/* FIX UP modem control here someday......
1525*/ 1525*/
1526static void rs_360_set_termios(struct tty_struct *tty, struct termios *old_termios) 1526static void rs_360_set_termios(struct tty_struct *tty, struct ktermios *old_termios)
1527{ 1527{
1528 ser_info_t *info = (ser_info_t *)tty->driver_data; 1528 ser_info_t *info = (ser_info_t *)tty->driver_data;
1529 1529
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index e34bd03cfce7..5261f0af8b10 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -1763,8 +1763,8 @@ static unsigned int serial8250_get_divisor(struct uart_port *port, unsigned int
1763} 1763}
1764 1764
1765static void 1765static void
1766serial8250_set_termios(struct uart_port *port, struct termios *termios, 1766serial8250_set_termios(struct uart_port *port, struct ktermios *termios,
1767 struct termios *old) 1767 struct ktermios *old)
1768{ 1768{
1769 struct uart_8250_port *up = (struct uart_8250_port *)port; 1769 struct uart_8250_port *up = (struct uart_8250_port *)port;
1770 unsigned char cval, fcr = 0; 1770 unsigned char cval, fcr = 0;
@@ -2296,7 +2296,7 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count)
2296 local_irq_restore(flags); 2296 local_irq_restore(flags);
2297} 2297}
2298 2298
2299static int serial8250_console_setup(struct console *co, char *options) 2299static int __init serial8250_console_setup(struct console *co, char *options)
2300{ 2300{
2301 struct uart_port *port; 2301 struct uart_port *port;
2302 int baud = 9600; 2302 int baud = 9600;
diff --git a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c
index 4d0ff8f4a01b..52e2e64c6649 100644
--- a/drivers/serial/8250_pci.c
+++ b/drivers/serial/8250_pci.c
@@ -2239,6 +2239,30 @@ static struct pci_device_id serial_pci_tbl[] = {
2239 pbn_b0_bt_1_460800 }, 2239 pbn_b0_bt_1_460800 },
2240 2240
2241 /* 2241 /*
2242 * Korenix Jetcard F0/F1 cards (JC1204, JC1208, JC1404, JC1408).
2243 * Cards are identified by their subsystem vendor IDs, which
2244 * (in hex) match the model number.
2245 *
2246 * Note that JC140x are RS422/485 cards which require ox950
2247 * ACR = 0x10, and as such are not currently fully supported.
2248 */
2249 { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF0,
2250 0x1204, 0x0004, 0, 0,
2251 pbn_b0_4_921600 },
2252 { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF0,
2253 0x1208, 0x0004, 0, 0,
2254 pbn_b0_4_921600 },
2255/* { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF0,
2256 0x1402, 0x0002, 0, 0,
2257 pbn_b0_2_921600 }, */
2258/* { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF0,
2259 0x1404, 0x0004, 0, 0,
2260 pbn_b0_4_921600 }, */
2261 { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF1,
2262 0x1208, 0x0004, 0, 0,
2263 pbn_b0_4_921600 },
2264
2265 /*
2242 * Dell Remote Access Card 4 - Tim_T_Murphy@Dell.com 2266 * Dell Remote Access Card 4 - Tim_T_Murphy@Dell.com
2243 */ 2267 */
2244 { PCI_VENDOR_ID_DELL, PCI_DEVICE_ID_DELL_RAC4, 2268 { PCI_VENDOR_ID_DELL, PCI_DEVICE_ID_DELL_RAC4,
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index fc12d5df10e2..2978c09860ee 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -151,32 +151,6 @@ config SERIAL_8250_MANY_PORTS
151 say N here to save some memory. You can also say Y if you have an 151 say N here to save some memory. You can also say Y if you have an
152 "intelligent" multiport card such as Cyclades, Digiboards, etc. 152 "intelligent" multiport card such as Cyclades, Digiboards, etc.
153 153
154config SERIAL_8250_SHARE_IRQ
155 bool "Support for sharing serial interrupts"
156 depends on SERIAL_8250_EXTENDED
157 help
158 Some serial boards have hardware support which allows multiple dumb
159 serial ports on the same board to share a single IRQ. To enable
160 support for this in the serial driver, say Y here.
161
162config SERIAL_8250_DETECT_IRQ
163 bool "Autodetect IRQ on standard ports (unsafe)"
164 depends on SERIAL_8250_EXTENDED
165 help
166 Say Y here if you want the kernel to try to guess which IRQ
167 to use for your serial port.
168
169 This is considered unsafe; it is far better to configure the IRQ in
170 a boot script using the setserial command.
171
172 If unsure, say N.
173
174config SERIAL_8250_RSA
175 bool "Support RSA serial ports"
176 depends on SERIAL_8250_EXTENDED
177 help
178 ::: To be written :::
179
180# 154#
181# Multi-port serial cards 155# Multi-port serial cards
182# 156#
@@ -199,7 +173,6 @@ config SERIAL_8250_ACCENT
199 To compile this driver as a module, choose M here: the module 173 To compile this driver as a module, choose M here: the module
200 will be called 8250_accent. 174 will be called 8250_accent.
201 175
202
203config SERIAL_8250_BOCA 176config SERIAL_8250_BOCA
204 tristate "Support Boca cards" 177 tristate "Support Boca cards"
205 depends on SERIAL_8250 != n && ISA && SERIAL_8250_MANY_PORTS 178 depends on SERIAL_8250 != n && ISA && SERIAL_8250_MANY_PORTS
@@ -230,6 +203,32 @@ config SERIAL_8250_HUB6
230 To compile this driver as a module, choose M here: the module 203 To compile this driver as a module, choose M here: the module
231 will be called 8250_hub6. 204 will be called 8250_hub6.
232 205
206config SERIAL_8250_SHARE_IRQ
207 bool "Support for sharing serial interrupts"
208 depends on SERIAL_8250_EXTENDED
209 help
210 Some serial boards have hardware support which allows multiple dumb
211 serial ports on the same board to share a single IRQ. To enable
212 support for this in the serial driver, say Y here.
213
214config SERIAL_8250_DETECT_IRQ
215 bool "Autodetect IRQ on standard ports (unsafe)"
216 depends on SERIAL_8250_EXTENDED
217 help
218 Say Y here if you want the kernel to try to guess which IRQ
219 to use for your serial port.
220
221 This is considered unsafe; it is far better to configure the IRQ in
222 a boot script using the setserial command.
223
224 If unsure, say N.
225
226config SERIAL_8250_RSA
227 bool "Support RSA serial ports"
228 depends on SERIAL_8250_EXTENDED
229 help
230 ::: To be written :::
231
233config SERIAL_8250_MCA 232config SERIAL_8250_MCA
234 tristate "Support 8250-type ports on MCA buses" 233 tristate "Support 8250-type ports on MCA buses"
235 depends on SERIAL_8250 != n && MCA 234 depends on SERIAL_8250 != n && MCA
@@ -664,7 +663,7 @@ config V850E_UART
664 663
665config V850E_UARTB 664config V850E_UARTB
666 bool 665 bool
667 depends V850E_UART && V850E_ME2 666 depends on V850E_UART && V850E_ME2
668 default y 667 default y
669 668
670config V850E_UART_CONSOLE 669config V850E_UART_CONSOLE
@@ -910,7 +909,7 @@ config SERIAL_M32R_PLDSIO
910 909
911config SERIAL_TXX9 910config SERIAL_TXX9
912 bool "TMPTX39XX/49XX SIO support" 911 bool "TMPTX39XX/49XX SIO support"
913 depends HAS_TXX9_SERIAL 912 depends on HAS_TXX9_SERIAL
914 select SERIAL_CORE 913 select SERIAL_CORE
915 default y 914 default y
916 915
diff --git a/drivers/serial/amba-pl010.c b/drivers/serial/amba-pl010.c
index 4d3626ef4643..f69bd097166e 100644
--- a/drivers/serial/amba-pl010.c
+++ b/drivers/serial/amba-pl010.c
@@ -345,8 +345,8 @@ static void pl010_shutdown(struct uart_port *port)
345} 345}
346 346
347static void 347static void
348pl010_set_termios(struct uart_port *port, struct termios *termios, 348pl010_set_termios(struct uart_port *port, struct ktermios *termios,
349 struct termios *old) 349 struct ktermios *old)
350{ 350{
351 unsigned int lcr_h, old_cr; 351 unsigned int lcr_h, old_cr;
352 unsigned long flags; 352 unsigned long flags;
@@ -589,6 +589,8 @@ static int __init pl010_console_setup(struct console *co, char *options)
589 */ 589 */
590 if (co->index >= UART_NR) 590 if (co->index >= UART_NR)
591 co->index = 0; 591 co->index = 0;
592 if (!amba_ports[co->index])
593 return -ENODEV;
592 port = &amba_ports[co->index]->port; 594 port = &amba_ports[co->index]->port;
593 595
594 if (options) 596 if (options)
diff --git a/drivers/serial/amba-pl011.c b/drivers/serial/amba-pl011.c
index d503625730df..44639e71372a 100644
--- a/drivers/serial/amba-pl011.c
+++ b/drivers/serial/amba-pl011.c
@@ -412,8 +412,8 @@ static void pl011_shutdown(struct uart_port *port)
412} 412}
413 413
414static void 414static void
415pl011_set_termios(struct uart_port *port, struct termios *termios, 415pl011_set_termios(struct uart_port *port, struct ktermios *termios,
416 struct termios *old) 416 struct ktermios *old)
417{ 417{
418 unsigned int lcr_h, old_cr; 418 unsigned int lcr_h, old_cr;
419 unsigned long flags; 419 unsigned long flags;
@@ -661,6 +661,8 @@ static int __init pl011_console_setup(struct console *co, char *options)
661 if (co->index >= UART_NR) 661 if (co->index >= UART_NR)
662 co->index = 0; 662 co->index = 0;
663 uap = amba_ports[co->index]; 663 uap = amba_ports[co->index];
664 if (!uap)
665 return -ENODEV;
664 666
665 uap->port.uartclk = clk_get_rate(uap->clk); 667 uap->port.uartclk = clk_get_rate(uap->clk);
666 668
diff --git a/drivers/serial/atmel_serial.c b/drivers/serial/atmel_serial.c
index 9217ee6c7865..881f886b91c6 100644
--- a/drivers/serial/atmel_serial.c
+++ b/drivers/serial/atmel_serial.c
@@ -478,7 +478,7 @@ static void atmel_serial_pm(struct uart_port *port, unsigned int state, unsigned
478/* 478/*
479 * Change the port parameters 479 * Change the port parameters
480 */ 480 */
481static void atmel_set_termios(struct uart_port *port, struct termios * termios, struct termios * old) 481static void atmel_set_termios(struct uart_port *port, struct ktermios * termios, struct ktermios * old)
482{ 482{
483 unsigned long flags; 483 unsigned long flags;
484 unsigned int mode, imr, quot, baud; 484 unsigned int mode, imr, quot, baud;
@@ -689,9 +689,9 @@ static void __devinit atmel_init_port(struct atmel_uart_port *atmel_port, struct
689 struct atmel_uart_data *data = pdev->dev.platform_data; 689 struct atmel_uart_data *data = pdev->dev.platform_data;
690 690
691 port->iotype = UPIO_MEM; 691 port->iotype = UPIO_MEM;
692 port->flags = UPF_BOOT_AUTOCONF; 692 port->flags = UPF_BOOT_AUTOCONF;
693 port->ops = &atmel_pops; 693 port->ops = &atmel_pops;
694 port->fifosize = 1; 694 port->fifosize = 1;
695 port->line = pdev->id; 695 port->line = pdev->id;
696 port->dev = &pdev->dev; 696 port->dev = &pdev->dev;
697 697
@@ -890,7 +890,6 @@ static int atmel_serial_suspend(struct platform_device *pdev, pm_message_t state
890 if (device_may_wakeup(&pdev->dev) && !at91_suspend_entering_slow_clock()) 890 if (device_may_wakeup(&pdev->dev) && !at91_suspend_entering_slow_clock())
891 enable_irq_wake(port->irq); 891 enable_irq_wake(port->irq);
892 else { 892 else {
893 disable_irq_wake(port->irq);
894 uart_suspend_port(&atmel_uart, port); 893 uart_suspend_port(&atmel_uart, port);
895 atmel_port->suspended = 1; 894 atmel_port->suspended = 1;
896 } 895 }
@@ -907,6 +906,8 @@ static int atmel_serial_resume(struct platform_device *pdev)
907 uart_resume_port(&atmel_uart, port); 906 uart_resume_port(&atmel_uart, port);
908 atmel_port->suspended = 0; 907 atmel_port->suspended = 0;
909 } 908 }
909 else
910 disable_irq_wake(port->irq);
910 911
911 return 0; 912 return 0;
912} 913}
diff --git a/drivers/serial/atmel_serial.h b/drivers/serial/atmel_serial.h
index fe1763b2a6d5..11b44360e108 100644
--- a/drivers/serial/atmel_serial.h
+++ b/drivers/serial/atmel_serial.h
@@ -106,7 +106,7 @@
106#define ATMEL_US_CSR 0x14 /* Channel Status Register */ 106#define ATMEL_US_CSR 0x14 /* Channel Status Register */
107#define ATMEL_US_RHR 0x18 /* Receiver Holding Register */ 107#define ATMEL_US_RHR 0x18 /* Receiver Holding Register */
108#define ATMEL_US_THR 0x1c /* Transmitter Holding Register */ 108#define ATMEL_US_THR 0x1c /* Transmitter Holding Register */
109#define ATMEL_US_SYNH (1 << 15) /* Transmit/Receive Sync [SAM9 only] */ 109#define ATMEL_US_SYNH (1 << 15) /* Transmit/Receive Sync [AT91SAM9261 only] */
110 110
111#define ATMEL_US_BRGR 0x20 /* Baud Rate Generator Register */ 111#define ATMEL_US_BRGR 0x20 /* Baud Rate Generator Register */
112#define ATMEL_US_CD (0xffff << 0) /* Clock Divider */ 112#define ATMEL_US_CD (0xffff << 0) /* Clock Divider */
diff --git a/drivers/serial/clps711x.c b/drivers/serial/clps711x.c
index 598012714882..23827189ec0e 100644
--- a/drivers/serial/clps711x.c
+++ b/drivers/serial/clps711x.c
@@ -286,8 +286,8 @@ static void clps711xuart_shutdown(struct uart_port *port)
286} 286}
287 287
288static void 288static void
289clps711xuart_set_termios(struct uart_port *port, struct termios *termios, 289clps711xuart_set_termios(struct uart_port *port, struct ktermios *termios,
290 struct termios *old) 290 struct ktermios *old)
291{ 291{
292 unsigned int ubrlcr, baud, quot; 292 unsigned int ubrlcr, baud, quot;
293 unsigned long flags; 293 unsigned long flags;
diff --git a/drivers/serial/crisv10.c b/drivers/serial/crisv10.c
index 7a24e53546c7..42b050c46abe 100644
--- a/drivers/serial/crisv10.c
+++ b/drivers/serial/crisv10.c
@@ -804,8 +804,8 @@ static struct e100_serial rs_table[] = {
804 804
805#define NR_PORTS (sizeof(rs_table)/sizeof(struct e100_serial)) 805#define NR_PORTS (sizeof(rs_table)/sizeof(struct e100_serial))
806 806
807static struct termios *serial_termios[NR_PORTS]; 807static struct ktermios *serial_termios[NR_PORTS];
808static struct termios *serial_termios_locked[NR_PORTS]; 808static struct ktermios *serial_termios_locked[NR_PORTS];
809#ifdef CONFIG_ETRAX_SERIAL_FAST_TIMER 809#ifdef CONFIG_ETRAX_SERIAL_FAST_TIMER
810static struct fast_timer fast_timers[NR_PORTS]; 810static struct fast_timer fast_timers[NR_PORTS];
811#endif 811#endif
@@ -4223,7 +4223,7 @@ rs_ioctl(struct tty_struct *tty, struct file * file,
4223} 4223}
4224 4224
4225static void 4225static void
4226rs_set_termios(struct tty_struct *tty, struct termios *old_termios) 4226rs_set_termios(struct tty_struct *tty, struct ktermios *old_termios)
4227{ 4227{
4228 struct e100_serial *info = (struct e100_serial *)tty->driver_data; 4228 struct e100_serial *info = (struct e100_serial *)tty->driver_data;
4229 4229
@@ -4877,6 +4877,8 @@ rs_init(void)
4877 driver->init_termios = tty_std_termios; 4877 driver->init_termios = tty_std_termios;
4878 driver->init_termios.c_cflag = 4878 driver->init_termios.c_cflag =
4879 B115200 | CS8 | CREAD | HUPCL | CLOCAL; /* is normally B9600 default... */ 4879 B115200 | CS8 | CREAD | HUPCL | CLOCAL; /* is normally B9600 default... */
4880 driver->init_termios.c_ispeed = 115200;
4881 driver->init_termios.c_ospeed = 115200;
4880 driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV; 4882 driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV;
4881 driver->termios = serial_termios; 4883 driver->termios = serial_termios;
4882 driver->termios_locked = serial_termios_locked; 4884 driver->termios_locked = serial_termios_locked;
diff --git a/drivers/serial/crisv10.h b/drivers/serial/crisv10.h
index f30b93d6ef79..4a23340663aa 100644
--- a/drivers/serial/crisv10.h
+++ b/drivers/serial/crisv10.h
@@ -93,8 +93,8 @@ struct e100_serial {
93 93
94 struct work_struct work; 94 struct work_struct work;
95 struct async_icount icount; /* error-statistics etc.*/ 95 struct async_icount icount; /* error-statistics etc.*/
96 struct termios normal_termios; 96 struct ktermios normal_termios;
97 struct termios callout_termios; 97 struct ktermios callout_termios;
98#ifdef DECLARE_WAITQUEUE 98#ifdef DECLARE_WAITQUEUE
99 wait_queue_head_t open_wait; 99 wait_queue_head_t open_wait;
100 wait_queue_head_t close_wait; 100 wait_queue_head_t close_wait;
diff --git a/drivers/serial/dz.c b/drivers/serial/dz.c
index af1544f3356f..587d87b9eb3c 100644
--- a/drivers/serial/dz.c
+++ b/drivers/serial/dz.c
@@ -461,8 +461,8 @@ static void dz_break_ctl(struct uart_port *uport, int break_state)
461 spin_unlock_irqrestore(&uport->lock, flags); 461 spin_unlock_irqrestore(&uport->lock, flags);
462} 462}
463 463
464static void dz_set_termios(struct uart_port *uport, struct termios *termios, 464static void dz_set_termios(struct uart_port *uport, struct ktermios *termios,
465 struct termios *old_termios) 465 struct ktermios *old_termios)
466{ 466{
467 struct dz_port *dport = (struct dz_port *)uport; 467 struct dz_port *dport = (struct dz_port *)uport;
468 unsigned long flags; 468 unsigned long flags;
diff --git a/drivers/serial/icom.c b/drivers/serial/icom.c
index 8aa0f641866b..71e6a24d8c28 100644
--- a/drivers/serial/icom.c
+++ b/drivers/serial/icom.c
@@ -1087,8 +1087,8 @@ static void icom_close(struct uart_port *port)
1087} 1087}
1088 1088
1089static void icom_set_termios(struct uart_port *port, 1089static void icom_set_termios(struct uart_port *port,
1090 struct termios *termios, 1090 struct ktermios *termios,
1091 struct termios *old_termios) 1091 struct ktermios *old_termios)
1092{ 1092{
1093 int baud; 1093 int baud;
1094 unsigned cflag, iflag; 1094 unsigned cflag, iflag;
@@ -1510,7 +1510,7 @@ static int __devinit icom_probe(struct pci_dev *dev,
1510 } 1510 }
1511 1511
1512 if ( (retval = pci_request_regions(dev, "icom"))) { 1512 if ( (retval = pci_request_regions(dev, "icom"))) {
1513 dev_err(&dev->dev, "pci_request_region FAILED\n"); 1513 dev_err(&dev->dev, "pci_request_regions FAILED\n");
1514 pci_disable_device(dev); 1514 pci_disable_device(dev);
1515 return retval; 1515 return retval;
1516 } 1516 }
diff --git a/drivers/serial/imx.c b/drivers/serial/imx.c
index ee5c782597dd..e216dcf29376 100644
--- a/drivers/serial/imx.c
+++ b/drivers/serial/imx.c
@@ -459,8 +459,8 @@ static void imx_shutdown(struct uart_port *port)
459} 459}
460 460
461static void 461static void
462imx_set_termios(struct uart_port *port, struct termios *termios, 462imx_set_termios(struct uart_port *port, struct ktermios *termios,
463 struct termios *old) 463 struct ktermios *old)
464{ 464{
465 struct imx_port *sport = (struct imx_port *)port; 465 struct imx_port *sport = (struct imx_port *)port;
466 unsigned long flags; 466 unsigned long flags;
diff --git a/drivers/serial/ioc3_serial.c b/drivers/serial/ioc3_serial.c
index 2308d26c8629..9cc0be932316 100644
--- a/drivers/serial/ioc3_serial.c
+++ b/drivers/serial/ioc3_serial.c
@@ -950,7 +950,7 @@ static void transmit_chars(struct uart_port *the_port)
950 */ 950 */
951static void 951static void
952ioc3_change_speed(struct uart_port *the_port, 952ioc3_change_speed(struct uart_port *the_port,
953 struct termios *new_termios, struct termios *old_termios) 953 struct ktermios *new_termios, struct ktermios *old_termios)
954{ 954{
955 struct ioc3_port *port = get_ioc3_port(the_port); 955 struct ioc3_port *port = get_ioc3_port(the_port);
956 unsigned int cflag; 956 unsigned int cflag;
@@ -1853,7 +1853,7 @@ static int ic3_startup(struct uart_port *the_port)
1853 */ 1853 */
1854static void 1854static void
1855ic3_set_termios(struct uart_port *the_port, 1855ic3_set_termios(struct uart_port *the_port,
1856 struct termios *termios, struct termios *old_termios) 1856 struct ktermios *termios, struct ktermios *old_termios)
1857{ 1857{
1858 unsigned long port_flags; 1858 unsigned long port_flags;
1859 1859
diff --git a/drivers/serial/ioc4_serial.c b/drivers/serial/ioc4_serial.c
index 711bd1511439..c862f67c985a 100644
--- a/drivers/serial/ioc4_serial.c
+++ b/drivers/serial/ioc4_serial.c
@@ -1681,7 +1681,7 @@ static void transmit_chars(struct uart_port *the_port)
1681 */ 1681 */
1682static void 1682static void
1683ioc4_change_speed(struct uart_port *the_port, 1683ioc4_change_speed(struct uart_port *the_port,
1684 struct termios *new_termios, struct termios *old_termios) 1684 struct ktermios *new_termios, struct ktermios *old_termios)
1685{ 1685{
1686 struct ioc4_port *port = get_ioc4_port(the_port, 0); 1686 struct ioc4_port *port = get_ioc4_port(the_port, 0);
1687 int baud, bits; 1687 int baud, bits;
@@ -1802,7 +1802,7 @@ static inline int ic4_startup_local(struct uart_port *the_port)
1802 ioc4_set_proto(port, the_port->mapbase); 1802 ioc4_set_proto(port, the_port->mapbase);
1803 1803
1804 /* set the speed of the serial port */ 1804 /* set the speed of the serial port */
1805 ioc4_change_speed(the_port, info->tty->termios, (struct termios *)0); 1805 ioc4_change_speed(the_port, info->tty->termios, (struct ktermios *)0);
1806 1806
1807 return 0; 1807 return 0;
1808} 1808}
@@ -2570,7 +2570,7 @@ static int ic4_startup(struct uart_port *the_port)
2570 */ 2570 */
2571static void 2571static void
2572ic4_set_termios(struct uart_port *the_port, 2572ic4_set_termios(struct uart_port *the_port,
2573 struct termios *termios, struct termios *old_termios) 2573 struct ktermios *termios, struct ktermios *old_termios)
2574{ 2574{
2575 unsigned long port_flags; 2575 unsigned long port_flags;
2576 2576
diff --git a/drivers/serial/ip22zilog.c b/drivers/serial/ip22zilog.c
index dca6c1bde8f9..0746c9446ae0 100644
--- a/drivers/serial/ip22zilog.c
+++ b/drivers/serial/ip22zilog.c
@@ -840,8 +840,8 @@ ip22zilog_convert_to_zs(struct uart_ip22zilog_port *up, unsigned int cflag,
840 840
841/* The port lock is not held. */ 841/* The port lock is not held. */
842static void 842static void
843ip22zilog_set_termios(struct uart_port *port, struct termios *termios, 843ip22zilog_set_termios(struct uart_port *port, struct ktermios *termios,
844 struct termios *old) 844 struct ktermios *old)
845{ 845{
846 struct uart_ip22zilog_port *up = (struct uart_ip22zilog_port *) port; 846 struct uart_ip22zilog_port *up = (struct uart_ip22zilog_port *) port;
847 unsigned long flags; 847 unsigned long flags;
diff --git a/drivers/serial/jsm/jsm_tty.c b/drivers/serial/jsm/jsm_tty.c
index f8262e6ad8d3..7cf1c60027f8 100644
--- a/drivers/serial/jsm/jsm_tty.c
+++ b/drivers/serial/jsm/jsm_tty.c
@@ -142,7 +142,7 @@ static void jsm_tty_send_xchar(struct uart_port *port, char ch)
142{ 142{
143 unsigned long lock_flags; 143 unsigned long lock_flags;
144 struct jsm_channel *channel = (struct jsm_channel *)port; 144 struct jsm_channel *channel = (struct jsm_channel *)port;
145 struct termios *termios; 145 struct ktermios *termios;
146 146
147 spin_lock_irqsave(&port->lock, lock_flags); 147 spin_lock_irqsave(&port->lock, lock_flags);
148 termios = port->info->tty->termios; 148 termios = port->info->tty->termios;
@@ -180,7 +180,7 @@ static int jsm_tty_open(struct uart_port *port)
180 struct jsm_board *brd; 180 struct jsm_board *brd;
181 int rc = 0; 181 int rc = 0;
182 struct jsm_channel *channel = (struct jsm_channel *)port; 182 struct jsm_channel *channel = (struct jsm_channel *)port;
183 struct termios *termios; 183 struct ktermios *termios;
184 184
185 /* Get board pointer from our array of majors we have allocated */ 185 /* Get board pointer from our array of majors we have allocated */
186 brd = channel->ch_bd; 186 brd = channel->ch_bd;
@@ -269,7 +269,7 @@ static int jsm_tty_open(struct uart_port *port)
269static void jsm_tty_close(struct uart_port *port) 269static void jsm_tty_close(struct uart_port *port)
270{ 270{
271 struct jsm_board *bd; 271 struct jsm_board *bd;
272 struct termios *ts; 272 struct ktermios *ts;
273 struct jsm_channel *channel = (struct jsm_channel *)port; 273 struct jsm_channel *channel = (struct jsm_channel *)port;
274 274
275 jsm_printk(CLOSE, INFO, &channel->ch_bd->pci_dev, "start\n"); 275 jsm_printk(CLOSE, INFO, &channel->ch_bd->pci_dev, "start\n");
@@ -302,8 +302,8 @@ static void jsm_tty_close(struct uart_port *port)
302} 302}
303 303
304static void jsm_tty_set_termios(struct uart_port *port, 304static void jsm_tty_set_termios(struct uart_port *port,
305 struct termios *termios, 305 struct ktermios *termios,
306 struct termios *old_termios) 306 struct ktermios *old_termios)
307{ 307{
308 unsigned long lock_flags; 308 unsigned long lock_flags;
309 struct jsm_channel *channel = (struct jsm_channel *)port; 309 struct jsm_channel *channel = (struct jsm_channel *)port;
diff --git a/drivers/serial/m32r_sio.c b/drivers/serial/m32r_sio.c
index 7656a35f5e2f..6e09c8b395e8 100644
--- a/drivers/serial/m32r_sio.c
+++ b/drivers/serial/m32r_sio.c
@@ -699,7 +699,7 @@ static unsigned int m32r_sio_get_divisor(struct uart_port *port,
699} 699}
700 700
701static void m32r_sio_set_termios(struct uart_port *port, 701static void m32r_sio_set_termios(struct uart_port *port,
702 struct termios *termios, struct termios *old) 702 struct ktermios *termios, struct ktermios *old)
703{ 703{
704 struct uart_sio_port *up = (struct uart_sio_port *)port; 704 struct uart_sio_port *up = (struct uart_sio_port *)port;
705 unsigned char cval = 0; 705 unsigned char cval = 0;
diff --git a/drivers/serial/mcfserial.c b/drivers/serial/mcfserial.c
index 3db206d29b33..08430961a895 100644
--- a/drivers/serial/mcfserial.c
+++ b/drivers/serial/mcfserial.c
@@ -1132,7 +1132,7 @@ static int mcfrs_ioctl(struct tty_struct *tty, struct file * file,
1132 return 0; 1132 return 0;
1133} 1133}
1134 1134
1135static void mcfrs_set_termios(struct tty_struct *tty, struct termios *old_termios) 1135static void mcfrs_set_termios(struct tty_struct *tty, struct ktermios *old_termios)
1136{ 1136{
1137 struct mcf_serial *info = (struct mcf_serial *)tty->driver_data; 1137 struct mcf_serial *info = (struct mcf_serial *)tty->driver_data;
1138 1138
diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c
index 6dd579ed9777..3c4b6c243712 100644
--- a/drivers/serial/mpc52xx_uart.c
+++ b/drivers/serial/mpc52xx_uart.c
@@ -270,8 +270,8 @@ mpc52xx_uart_shutdown(struct uart_port *port)
270} 270}
271 271
272static void 272static void
273mpc52xx_uart_set_termios(struct uart_port *port, struct termios *new, 273mpc52xx_uart_set_termios(struct uart_port *port, struct ktermios *new,
274 struct termios *old) 274 struct ktermios *old)
275{ 275{
276 struct mpc52xx_psc __iomem *psc = PSC(port); 276 struct mpc52xx_psc __iomem *psc = PSC(port);
277 unsigned long flags; 277 unsigned long flags;
@@ -789,7 +789,9 @@ static struct console mpc52xx_console = {
789static int __init 789static int __init
790mpc52xx_console_init(void) 790mpc52xx_console_init(void)
791{ 791{
792#if defined(CONFIG_PPC_MERGE)
792 mpc52xx_uart_of_enumerate(); 793 mpc52xx_uart_of_enumerate();
794#endif
793 register_console(&mpc52xx_console); 795 register_console(&mpc52xx_console);
794 return 0; 796 return 0;
795} 797}
diff --git a/drivers/serial/mpsc.c b/drivers/serial/mpsc.c
index 29823bd60fb0..3d2fcc57b1ce 100644
--- a/drivers/serial/mpsc.c
+++ b/drivers/serial/mpsc.c
@@ -1440,8 +1440,8 @@ mpsc_shutdown(struct uart_port *port)
1440} 1440}
1441 1441
1442static void 1442static void
1443mpsc_set_termios(struct uart_port *port, struct termios *termios, 1443mpsc_set_termios(struct uart_port *port, struct ktermios *termios,
1444 struct termios *old) 1444 struct ktermios *old)
1445{ 1445{
1446 struct mpsc_port_info *pi = (struct mpsc_port_info *)port; 1446 struct mpsc_port_info *pi = (struct mpsc_port_info *)port;
1447 u32 baud; 1447 u32 baud;
diff --git a/drivers/serial/mux.c b/drivers/serial/mux.c
index ea9cbda77965..83211013deb8 100644
--- a/drivers/serial/mux.c
+++ b/drivers/serial/mux.c
@@ -307,8 +307,8 @@ static void mux_shutdown(struct uart_port *port)
307 * The Serial Mux does not support this function. 307 * The Serial Mux does not support this function.
308 */ 308 */
309static void 309static void
310mux_set_termios(struct uart_port *port, struct termios *termios, 310mux_set_termios(struct uart_port *port, struct ktermios *termios,
311 struct termios *old) 311 struct ktermios *old)
312{ 312{
313} 313}
314 314
diff --git a/drivers/serial/netx-serial.c b/drivers/serial/netx-serial.c
index 062bad457b1a..b56f7db45031 100644
--- a/drivers/serial/netx-serial.c
+++ b/drivers/serial/netx-serial.c
@@ -337,8 +337,8 @@ static void netx_shutdown(struct uart_port *port)
337} 337}
338 338
339static void 339static void
340netx_set_termios(struct uart_port *port, struct termios *termios, 340netx_set_termios(struct uart_port *port, struct ktermios *termios,
341 struct termios *old) 341 struct ktermios *old)
342{ 342{
343 unsigned int baud, quot; 343 unsigned int baud, quot;
344 unsigned char old_cr; 344 unsigned char old_cr;
diff --git a/drivers/serial/pmac_zilog.c b/drivers/serial/pmac_zilog.c
index bf9809ed9c0b..752ef07516b9 100644
--- a/drivers/serial/pmac_zilog.c
+++ b/drivers/serial/pmac_zilog.c
@@ -1262,8 +1262,8 @@ static void pmz_irda_setup(struct uart_pmac_port *uap, unsigned long *baud)
1262} 1262}
1263 1263
1264 1264
1265static void __pmz_set_termios(struct uart_port *port, struct termios *termios, 1265static void __pmz_set_termios(struct uart_port *port, struct ktermios *termios,
1266 struct termios *old) 1266 struct ktermios *old)
1267{ 1267{
1268 struct uart_pmac_port *uap = to_pmz(port); 1268 struct uart_pmac_port *uap = to_pmz(port);
1269 unsigned long baud; 1269 unsigned long baud;
@@ -1273,7 +1273,7 @@ static void __pmz_set_termios(struct uart_port *port, struct termios *termios,
1273 if (ZS_IS_ASLEEP(uap)) 1273 if (ZS_IS_ASLEEP(uap))
1274 return; 1274 return;
1275 1275
1276 memcpy(&uap->termios_cache, termios, sizeof(struct termios)); 1276 memcpy(&uap->termios_cache, termios, sizeof(struct ktermios));
1277 1277
1278 /* XXX Check which revs of machines actually allow 1 and 4Mb speeds 1278 /* XXX Check which revs of machines actually allow 1 and 4Mb speeds
1279 * on the IR dongle. Note that the IRTTY driver currently doesn't know 1279 * on the IR dongle. Note that the IRTTY driver currently doesn't know
@@ -1313,8 +1313,8 @@ static void __pmz_set_termios(struct uart_port *port, struct termios *termios,
1313} 1313}
1314 1314
1315/* The port lock is not held. */ 1315/* The port lock is not held. */
1316static void pmz_set_termios(struct uart_port *port, struct termios *termios, 1316static void pmz_set_termios(struct uart_port *port, struct ktermios *termios,
1317 struct termios *old) 1317 struct ktermios *old)
1318{ 1318{
1319 struct uart_pmac_port *uap = to_pmz(port); 1319 struct uart_pmac_port *uap = to_pmz(port);
1320 unsigned long flags; 1320 unsigned long flags;
diff --git a/drivers/serial/pmac_zilog.h b/drivers/serial/pmac_zilog.h
index c03f9bfacdd8..570b0d925e83 100644
--- a/drivers/serial/pmac_zilog.h
+++ b/drivers/serial/pmac_zilog.h
@@ -60,7 +60,7 @@ struct uart_pmac_port {
60 volatile struct dbdma_regs __iomem *tx_dma_regs; 60 volatile struct dbdma_regs __iomem *tx_dma_regs;
61 volatile struct dbdma_regs __iomem *rx_dma_regs; 61 volatile struct dbdma_regs __iomem *rx_dma_regs;
62 62
63 struct termios termios_cache; 63 struct ktermios termios_cache;
64}; 64};
65 65
66#define to_pmz(p) ((struct uart_pmac_port *)(p)) 66#define to_pmz(p) ((struct uart_pmac_port *)(p))
diff --git a/drivers/serial/pxa.c b/drivers/serial/pxa.c
index 415fe9633a9b..d403aaa55092 100644
--- a/drivers/serial/pxa.c
+++ b/drivers/serial/pxa.c
@@ -433,8 +433,8 @@ static void serial_pxa_shutdown(struct uart_port *port)
433} 433}
434 434
435static void 435static void
436serial_pxa_set_termios(struct uart_port *port, struct termios *termios, 436serial_pxa_set_termios(struct uart_port *port, struct ktermios *termios,
437 struct termios *old) 437 struct ktermios *old)
438{ 438{
439 struct uart_pxa_port *up = (struct uart_pxa_port *)port; 439 struct uart_pxa_port *up = (struct uart_pxa_port *)port;
440 unsigned char cval, fcr = 0; 440 unsigned char cval, fcr = 0;
diff --git a/drivers/serial/s3c2410.c b/drivers/serial/s3c2410.c
index 8dfc2dd058ca..3ba9208ebd0c 100644
--- a/drivers/serial/s3c2410.c
+++ b/drivers/serial/s3c2410.c
@@ -738,8 +738,8 @@ static unsigned int s3c24xx_serial_getclk(struct uart_port *port,
738} 738}
739 739
740static void s3c24xx_serial_set_termios(struct uart_port *port, 740static void s3c24xx_serial_set_termios(struct uart_port *port,
741 struct termios *termios, 741 struct ktermios *termios,
742 struct termios *old) 742 struct ktermios *old)
743{ 743{
744 struct s3c2410_uartcfg *cfg = s3c24xx_port_to_cfg(port); 744 struct s3c2410_uartcfg *cfg = s3c24xx_port_to_cfg(port);
745 struct s3c24xx_uart_port *ourport = to_ourport(port); 745 struct s3c24xx_uart_port *ourport = to_ourport(port);
diff --git a/drivers/serial/sa1100.c b/drivers/serial/sa1100.c
index d4065266b6fc..58a83c27e14b 100644
--- a/drivers/serial/sa1100.c
+++ b/drivers/serial/sa1100.c
@@ -408,8 +408,8 @@ static void sa1100_shutdown(struct uart_port *port)
408} 408}
409 409
410static void 410static void
411sa1100_set_termios(struct uart_port *port, struct termios *termios, 411sa1100_set_termios(struct uart_port *port, struct ktermios *termios,
412 struct termios *old) 412 struct ktermios *old)
413{ 413{
414 struct sa1100_port *sport = (struct sa1100_port *)port; 414 struct sa1100_port *sport = (struct sa1100_port *)port;
415 unsigned long flags; 415 unsigned long flags;
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
index c67b05e9a451..f84982e508c7 100644
--- a/drivers/serial/serial_core.c
+++ b/drivers/serial/serial_core.c
@@ -65,7 +65,7 @@ static struct lock_class_key port_lock_key;
65#define uart_console(port) (0) 65#define uart_console(port) (0)
66#endif 66#endif
67 67
68static void uart_change_speed(struct uart_state *state, struct termios *old_termios); 68static void uart_change_speed(struct uart_state *state, struct ktermios *old_termios);
69static void uart_wait_until_sent(struct tty_struct *tty, int timeout); 69static void uart_wait_until_sent(struct tty_struct *tty, int timeout);
70static void uart_change_pm(struct uart_state *state, int pm_state); 70static void uart_change_pm(struct uart_state *state, int pm_state);
71 71
@@ -338,8 +338,8 @@ EXPORT_SYMBOL(uart_update_timeout);
338 * we're actually going to be using. 338 * we're actually going to be using.
339 */ 339 */
340unsigned int 340unsigned int
341uart_get_baud_rate(struct uart_port *port, struct termios *termios, 341uart_get_baud_rate(struct uart_port *port, struct ktermios *termios,
342 struct termios *old, unsigned int min, unsigned int max) 342 struct ktermios *old, unsigned int min, unsigned int max)
343{ 343{
344 unsigned int try, baud, altbaud = 38400; 344 unsigned int try, baud, altbaud = 38400;
345 upf_t flags = port->flags & UPF_SPD_MASK; 345 upf_t flags = port->flags & UPF_SPD_MASK;
@@ -421,11 +421,11 @@ uart_get_divisor(struct uart_port *port, unsigned int baud)
421EXPORT_SYMBOL(uart_get_divisor); 421EXPORT_SYMBOL(uart_get_divisor);
422 422
423static void 423static void
424uart_change_speed(struct uart_state *state, struct termios *old_termios) 424uart_change_speed(struct uart_state *state, struct ktermios *old_termios)
425{ 425{
426 struct tty_struct *tty = state->info->tty; 426 struct tty_struct *tty = state->info->tty;
427 struct uart_port *port = state->port; 427 struct uart_port *port = state->port;
428 struct termios *termios; 428 struct ktermios *termios;
429 429
430 /* 430 /*
431 * If we have no tty, termios, or the port does not exist, 431 * If we have no tty, termios, or the port does not exist,
@@ -1139,7 +1139,7 @@ uart_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd,
1139 return ret; 1139 return ret;
1140} 1140}
1141 1141
1142static void uart_set_termios(struct tty_struct *tty, struct termios *old_termios) 1142static void uart_set_termios(struct tty_struct *tty, struct ktermios *old_termios)
1143{ 1143{
1144 struct uart_state *state = tty->driver_data; 1144 struct uart_state *state = tty->driver_data;
1145 unsigned long flags; 1145 unsigned long flags;
@@ -1866,7 +1866,7 @@ int __init
1866uart_set_options(struct uart_port *port, struct console *co, 1866uart_set_options(struct uart_port *port, struct console *co,
1867 int baud, int parity, int bits, int flow) 1867 int baud, int parity, int bits, int flow)
1868{ 1868{
1869 struct termios termios; 1869 struct ktermios termios;
1870 int i; 1870 int i;
1871 1871
1872 /* 1872 /*
@@ -1876,7 +1876,7 @@ uart_set_options(struct uart_port *port, struct console *co,
1876 spin_lock_init(&port->lock); 1876 spin_lock_init(&port->lock);
1877 lockdep_set_class(&port->lock, &port_lock_key); 1877 lockdep_set_class(&port->lock, &port_lock_key);
1878 1878
1879 memset(&termios, 0, sizeof(struct termios)); 1879 memset(&termios, 0, sizeof(struct ktermios));
1880 1880
1881 termios.c_cflag = CREAD | HUPCL | CLOCAL; 1881 termios.c_cflag = CREAD | HUPCL | CLOCAL;
1882 1882
@@ -1991,12 +1991,12 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *port)
1991 * Re-enable the console device after suspending. 1991 * Re-enable the console device after suspending.
1992 */ 1992 */
1993 if (uart_console(port)) { 1993 if (uart_console(port)) {
1994 struct termios termios; 1994 struct ktermios termios;
1995 1995
1996 /* 1996 /*
1997 * First try to use the console cflag setting. 1997 * First try to use the console cflag setting.
1998 */ 1998 */
1999 memset(&termios, 0, sizeof(struct termios)); 1999 memset(&termios, 0, sizeof(struct ktermios));
2000 termios.c_cflag = port->cons->cflag; 2000 termios.c_cflag = port->cons->cflag;
2001 2001
2002 /* 2002 /*
@@ -2189,6 +2189,7 @@ int uart_register_driver(struct uart_driver *drv)
2189 normal->subtype = SERIAL_TYPE_NORMAL; 2189 normal->subtype = SERIAL_TYPE_NORMAL;
2190 normal->init_termios = tty_std_termios; 2190 normal->init_termios = tty_std_termios;
2191 normal->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL; 2191 normal->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
2192 normal->init_termios.c_ispeed = normal->init_termios.c_ospeed = 9600;
2192 normal->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV; 2193 normal->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV;
2193 normal->driver_state = drv; 2194 normal->driver_state = drv;
2194 tty_set_operations(normal, &uart_ops); 2195 tty_set_operations(normal, &uart_ops);
diff --git a/drivers/serial/serial_lh7a40x.c b/drivers/serial/serial_lh7a40x.c
index 5e1ac356bbb0..eb18d429752d 100644
--- a/drivers/serial/serial_lh7a40x.c
+++ b/drivers/serial/serial_lh7a40x.c
@@ -348,8 +348,8 @@ static void lh7a40xuart_shutdown (struct uart_port* port)
348} 348}
349 349
350static void lh7a40xuart_set_termios (struct uart_port* port, 350static void lh7a40xuart_set_termios (struct uart_port* port,
351 struct termios* termios, 351 struct ktermios* termios,
352 struct termios* old) 352 struct ktermios* old)
353{ 353{
354 unsigned int con; 354 unsigned int con;
355 unsigned int inten; 355 unsigned int inten;
diff --git a/drivers/serial/serial_txx9.c b/drivers/serial/serial_txx9.c
index 2a48289ac722..7186a82c4759 100644
--- a/drivers/serial/serial_txx9.c
+++ b/drivers/serial/serial_txx9.c
@@ -556,8 +556,8 @@ static void serial_txx9_shutdown(struct uart_port *port)
556} 556}
557 557
558static void 558static void
559serial_txx9_set_termios(struct uart_port *port, struct termios *termios, 559serial_txx9_set_termios(struct uart_port *port, struct ktermios *termios,
560 struct termios *old) 560 struct ktermios *old)
561{ 561{
562 struct uart_txx9_port *up = (struct uart_txx9_port *)port; 562 struct uart_txx9_port *up = (struct uart_txx9_port *)port;
563 unsigned int cval, fcr = 0; 563 unsigned int cval, fcr = 0;
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c
index 3b5f19ec2126..c53b69610a51 100644
--- a/drivers/serial/sh-sci.c
+++ b/drivers/serial/sh-sci.c
@@ -319,6 +319,28 @@ static void sci_init_pins_scif(struct uart_port *port, unsigned int cflag)
319 319
320 sci_out(port, SCFCR, fcr_val); 320 sci_out(port, SCFCR, fcr_val);
321} 321}
322#elif defined(CONFIG_CPU_SUBTYPE_SH7722)
323static void sci_init_pins_scif(struct uart_port *port, unsigned int cflag)
324{
325 unsigned int fcr_val = 0;
326
327 if (cflag & CRTSCTS) {
328 fcr_val |= SCFCR_MCE;
329
330 ctrl_outw(0x0000, PORT_PSCR);
331 } else {
332 unsigned short data;
333
334 data = ctrl_inw(PORT_PSCR);
335 data &= 0x033f;
336 data |= 0x0400;
337 ctrl_outw(data, PORT_PSCR);
338
339 ctrl_outw(ctrl_inw(SCSPTR0) & 0x17, SCSPTR0);
340 }
341
342 sci_out(port, SCFCR, fcr_val);
343}
322#else 344#else
323/* For SH7750 */ 345/* For SH7750 */
324static void sci_init_pins_scif(struct uart_port *port, unsigned int cflag) 346static void sci_init_pins_scif(struct uart_port *port, unsigned int cflag)
@@ -943,8 +965,8 @@ static void sci_shutdown(struct uart_port *port)
943 s->disable(port); 965 s->disable(port);
944} 966}
945 967
946static void sci_set_termios(struct uart_port *port, struct termios *termios, 968static void sci_set_termios(struct uart_port *port, struct ktermios *termios,
947 struct termios *old) 969 struct ktermios *old)
948{ 970{
949 struct sci_port *s = &sci_ports[port->line]; 971 struct sci_port *s = &sci_ports[port->line];
950 unsigned int status, baud, smr_val; 972 unsigned int status, baud, smr_val;
diff --git a/drivers/serial/sh-sci.h b/drivers/serial/sh-sci.h
index e4557cc4f74b..77f7d6351ab1 100644
--- a/drivers/serial/sh-sci.h
+++ b/drivers/serial/sh-sci.h
@@ -90,6 +90,13 @@
90# define SCSPTR3 0xffe30010 /* 16 bit SCIF */ 90# define SCSPTR3 0xffe30010 /* 16 bit SCIF */
91# define SCSCR_INIT(port) 0x32 /* TIE=0,RIE=0,TE=1,RE=1,REIE=0,CKE=1 */ 91# define SCSCR_INIT(port) 0x32 /* TIE=0,RIE=0,TE=1,RE=1,REIE=0,CKE=1 */
92# define SCIF_ONLY 92# define SCIF_ONLY
93#elif defined(CONFIG_CPU_SUBTYPE_SH7722)
94# define SCPDR0 0xA405013E /* 16 bit SCIF0 PSDR */
95# define SCSPTR0 SCPDR0
96# define SCIF_ORER 0x0001 /* overrun error bit */
97# define SCSCR_INIT(port) 0x0038 /* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */
98# define SCIF_ONLY
99# define PORT_PSCR 0xA405011E
93#elif defined(CONFIG_CPU_SUBTYPE_SH4_202) 100#elif defined(CONFIG_CPU_SUBTYPE_SH4_202)
94# define SCSPTR2 0xffe80020 /* 16 bit SCIF */ 101# define SCSPTR2 0xffe80020 /* 16 bit SCIF */
95# define SCIF_ORER 0x0001 /* overrun error bit */ 102# define SCIF_ORER 0x0001 /* overrun error bit */
@@ -495,6 +502,7 @@ static inline int sci_rxd_in(struct uart_port *port)
495 return ctrl_inw(SCSPTR1) & 0x0001 ? 1 : 0; /* SCIF */ 502 return ctrl_inw(SCSPTR1) & 0x0001 ? 1 : 0; /* SCIF */
496 if (port->mapbase == 0xfe620000) 503 if (port->mapbase == 0xfe620000)
497 return ctrl_inw(SCSPTR2) & 0x0001 ? 1 : 0; /* SCIF */ 504 return ctrl_inw(SCSPTR2) & 0x0001 ? 1 : 0; /* SCIF */
505 return 1;
498} 506}
499#elif defined(CONFIG_CPU_SUBTYPE_SH7300) 507#elif defined(CONFIG_CPU_SUBTYPE_SH7300)
500static inline int sci_rxd_in(struct uart_port *port) 508static inline int sci_rxd_in(struct uart_port *port)
@@ -521,6 +529,13 @@ static inline int sci_rxd_in(struct uart_port *port)
521 return ctrl_inw(SCSPTR3) & 0x0001 ? 1 : 0; /* SCIF */ 529 return ctrl_inw(SCSPTR3) & 0x0001 ? 1 : 0; /* SCIF */
522 return 1; 530 return 1;
523} 531}
532#elif defined(CONFIG_CPU_SUBTYPE_SH7722)
533static inline int sci_rxd_in(struct uart_port *port)
534{
535 if (port->mapbase == 0xffe00000)
536 return ctrl_inb(SCPDR0) & 0x0001 ? 1 : 0; /* SCIF0 */
537 return 1;
538}
524#elif defined(CONFIG_CPU_SUBTYPE_ST40STB1) 539#elif defined(CONFIG_CPU_SUBTYPE_ST40STB1)
525static inline int sci_rxd_in(struct uart_port *port) 540static inline int sci_rxd_in(struct uart_port *port)
526{ 541{
@@ -550,6 +565,7 @@ static inline int sci_rxd_in(struct uart_port *port)
550 return ctrl_inw(SCSPTR1) & 0x0001 ? 1 : 0; /* SCIF */ 565 return ctrl_inw(SCSPTR1) & 0x0001 ? 1 : 0; /* SCIF */
551 if (port->mapbase == 0xff925000) 566 if (port->mapbase == 0xff925000)
552 return ctrl_inw(SCSPTR2) & 0x0001 ? 1 : 0; /* SCIF */ 567 return ctrl_inw(SCSPTR2) & 0x0001 ? 1 : 0; /* SCIF */
568 return 1;
553} 569}
554#elif defined(CONFIG_CPU_SUBTYPE_SH7780) 570#elif defined(CONFIG_CPU_SUBTYPE_SH7780)
555static inline int sci_rxd_in(struct uart_port *port) 571static inline int sci_rxd_in(struct uart_port *port)
@@ -558,6 +574,7 @@ static inline int sci_rxd_in(struct uart_port *port)
558 return ctrl_inw(SCSPTR0) & 0x0001 ? 1 : 0; /* SCIF */ 574 return ctrl_inw(SCSPTR0) & 0x0001 ? 1 : 0; /* SCIF */
559 if (port->mapbase == 0xffe10000) 575 if (port->mapbase == 0xffe10000)
560 return ctrl_inw(SCSPTR1) & 0x0001 ? 1 : 0; /* SCIF */ 576 return ctrl_inw(SCSPTR1) & 0x0001 ? 1 : 0; /* SCIF */
577 return 1;
561} 578}
562#elif defined(CONFIG_CPU_SUBTYPE_SH7206) 579#elif defined(CONFIG_CPU_SUBTYPE_SH7206)
563static inline int sci_rxd_in(struct uart_port *port) 580static inline int sci_rxd_in(struct uart_port *port)
@@ -570,6 +587,7 @@ static inline int sci_rxd_in(struct uart_port *port)
570 return ctrl_inw(SCSPTR2) & 0x0001 ? 1 : 0; /* SCIF */ 587 return ctrl_inw(SCSPTR2) & 0x0001 ? 1 : 0; /* SCIF */
571 if (port->mapbase == 0xfffe9800) 588 if (port->mapbase == 0xfffe9800)
572 return ctrl_inw(SCSPTR3) & 0x0001 ? 1 : 0; /* SCIF */ 589 return ctrl_inw(SCSPTR3) & 0x0001 ? 1 : 0; /* SCIF */
590 return 1;
573} 591}
574#elif defined(CONFIG_CPU_SUBTYPE_SH7619) 592#elif defined(CONFIG_CPU_SUBTYPE_SH7619)
575static inline int sci_rxd_in(struct uart_port *port) 593static inline int sci_rxd_in(struct uart_port *port)
@@ -580,6 +598,7 @@ static inline int sci_rxd_in(struct uart_port *port)
580 return ctrl_inw(SCSPTR1) & 0x0001 ? 1 : 0; /* SCIF */ 598 return ctrl_inw(SCSPTR1) & 0x0001 ? 1 : 0; /* SCIF */
581 if (port->mapbase == 0xf8420000) 599 if (port->mapbase == 0xf8420000)
582 return ctrl_inw(SCSPTR2) & 0x0001 ? 1 : 0; /* SCIF */ 600 return ctrl_inw(SCSPTR2) & 0x0001 ? 1 : 0; /* SCIF */
601 return 1;
583} 602}
584#endif 603#endif
585 604
diff --git a/drivers/serial/sn_console.c b/drivers/serial/sn_console.c
index 956b2cf08e1e..253ceb895ca7 100644
--- a/drivers/serial/sn_console.c
+++ b/drivers/serial/sn_console.c
@@ -361,8 +361,8 @@ static int snp_startup(struct uart_port *port)
361 * 361 *
362 */ 362 */
363static void 363static void
364snp_set_termios(struct uart_port *port, struct termios *termios, 364snp_set_termios(struct uart_port *port, struct ktermios *termios,
365 struct termios *old) 365 struct ktermios *old)
366{ 366{
367} 367}
368 368
diff --git a/drivers/serial/sunhv.c b/drivers/serial/sunhv.c
index 03941d27d15d..40d48566215c 100644
--- a/drivers/serial/sunhv.c
+++ b/drivers/serial/sunhv.c
@@ -281,8 +281,8 @@ static void sunhv_shutdown(struct uart_port *port)
281} 281}
282 282
283/* port->lock is not held. */ 283/* port->lock is not held. */
284static void sunhv_set_termios(struct uart_port *port, struct termios *termios, 284static void sunhv_set_termios(struct uart_port *port, struct ktermios *termios,
285 struct termios *old) 285 struct ktermios *old)
286{ 286{
287 unsigned int baud = uart_get_baud_rate(port, termios, old, 0, 4000000); 287 unsigned int baud = uart_get_baud_rate(port, termios, old, 0, 4000000);
288 unsigned int quot = uart_get_divisor(port, baud); 288 unsigned int quot = uart_get_divisor(port, baud);
diff --git a/drivers/serial/sunsab.c b/drivers/serial/sunsab.c
index 08a7cd6a3a0c..145d6236954b 100644
--- a/drivers/serial/sunsab.c
+++ b/drivers/serial/sunsab.c
@@ -786,8 +786,8 @@ static void sunsab_convert_to_sab(struct uart_sunsab_port *up, unsigned int cfla
786} 786}
787 787
788/* port->lock is not held. */ 788/* port->lock is not held. */
789static void sunsab_set_termios(struct uart_port *port, struct termios *termios, 789static void sunsab_set_termios(struct uart_port *port, struct ktermios *termios,
790 struct termios *old) 790 struct ktermios *old)
791{ 791{
792 struct uart_sunsab_port *up = (struct uart_sunsab_port *) port; 792 struct uart_sunsab_port *up = (struct uart_sunsab_port *) port;
793 unsigned long flags; 793 unsigned long flags;
@@ -1037,7 +1037,8 @@ static int __devinit sunsab_init_one(struct uart_sunsab_port *up,
1037 err = request_irq(up->port.irq, sunsab_interrupt, 1037 err = request_irq(up->port.irq, sunsab_interrupt,
1038 IRQF_SHARED, "sab", up); 1038 IRQF_SHARED, "sab", up);
1039 if (err) { 1039 if (err) {
1040 of_iounmap(up->port.membase, 1040 of_iounmap(&op->resource[0],
1041 up->port.membase,
1041 sizeof(union sab82532_async_regs)); 1042 sizeof(union sab82532_async_regs));
1042 return err; 1043 return err;
1043 } 1044 }
@@ -1064,7 +1065,8 @@ static int __devinit sab_probe(struct of_device *op, const struct of_device_id *
1064 sizeof(union sab82532_async_regs), 1065 sizeof(union sab82532_async_regs),
1065 (inst * 2) + 1); 1066 (inst * 2) + 1);
1066 if (err) { 1067 if (err) {
1067 of_iounmap(up[0].port.membase, 1068 of_iounmap(&op->resource[0],
1069 up[0].port.membase,
1068 sizeof(union sab82532_async_regs)); 1070 sizeof(union sab82532_async_regs));
1069 free_irq(up[0].port.irq, &up[0]); 1071 free_irq(up[0].port.irq, &up[0]);
1070 return err; 1072 return err;
@@ -1082,10 +1084,13 @@ static int __devinit sab_probe(struct of_device *op, const struct of_device_id *
1082 1084
1083static void __devexit sab_remove_one(struct uart_sunsab_port *up) 1085static void __devexit sab_remove_one(struct uart_sunsab_port *up)
1084{ 1086{
1087 struct of_device *op = to_of_device(up->port.dev);
1088
1085 uart_remove_one_port(&sunsab_reg, &up->port); 1089 uart_remove_one_port(&sunsab_reg, &up->port);
1086 if (!(up->port.line & 1)) 1090 if (!(up->port.line & 1))
1087 free_irq(up->port.irq, up); 1091 free_irq(up->port.irq, up);
1088 of_iounmap(up->port.membase, 1092 of_iounmap(&op->resource[0],
1093 up->port.membase,
1089 sizeof(union sab82532_async_regs)); 1094 sizeof(union sab82532_async_regs));
1090} 1095}
1091 1096
diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c
index c577faea60e8..3ec3df21816b 100644
--- a/drivers/serial/sunsu.c
+++ b/drivers/serial/sunsu.c
@@ -893,8 +893,8 @@ sunsu_change_speed(struct uart_port *port, unsigned int cflag,
893} 893}
894 894
895static void 895static void
896sunsu_set_termios(struct uart_port *port, struct termios *termios, 896sunsu_set_termios(struct uart_port *port, struct ktermios *termios,
897 struct termios *old) 897 struct ktermios *old)
898{ 898{
899 unsigned int baud, quot; 899 unsigned int baud, quot;
900 900
@@ -1480,13 +1480,13 @@ static int __devinit su_probe(struct of_device *op, const struct of_device_id *m
1480 return 0; 1480 return 0;
1481 1481
1482out_unmap: 1482out_unmap:
1483 of_iounmap(up->port.membase, up->reg_size); 1483 of_iounmap(&op->resource[0], up->port.membase, up->reg_size);
1484 return err; 1484 return err;
1485} 1485}
1486 1486
1487static int __devexit su_remove(struct of_device *dev) 1487static int __devexit su_remove(struct of_device *op)
1488{ 1488{
1489 struct uart_sunsu_port *up = dev_get_drvdata(&dev->dev);; 1489 struct uart_sunsu_port *up = dev_get_drvdata(&op->dev);
1490 1490
1491 if (up->su_type == SU_PORT_MS || 1491 if (up->su_type == SU_PORT_MS ||
1492 up->su_type == SU_PORT_KBD) { 1492 up->su_type == SU_PORT_KBD) {
@@ -1499,9 +1499,9 @@ static int __devexit su_remove(struct of_device *dev)
1499 } 1499 }
1500 1500
1501 if (up->port.membase) 1501 if (up->port.membase)
1502 of_iounmap(up->port.membase, up->reg_size); 1502 of_iounmap(&op->resource[0], up->port.membase, up->reg_size);
1503 1503
1504 dev_set_drvdata(&dev->dev, NULL); 1504 dev_set_drvdata(&op->dev, NULL);
1505 1505
1506 return 0; 1506 return 0;
1507} 1507}
diff --git a/drivers/serial/sunzilog.c b/drivers/serial/sunzilog.c
index b2cc703b2b9e..244f796dc625 100644
--- a/drivers/serial/sunzilog.c
+++ b/drivers/serial/sunzilog.c
@@ -922,8 +922,8 @@ sunzilog_convert_to_zs(struct uart_sunzilog_port *up, unsigned int cflag,
922 922
923/* The port lock is not held. */ 923/* The port lock is not held. */
924static void 924static void
925sunzilog_set_termios(struct uart_port *port, struct termios *termios, 925sunzilog_set_termios(struct uart_port *port, struct ktermios *termios,
926 struct termios *old) 926 struct ktermios *old)
927{ 927{
928 struct uart_sunzilog_port *up = (struct uart_sunzilog_port *) port; 928 struct uart_sunzilog_port *up = (struct uart_sunzilog_port *) port;
929 unsigned long flags; 929 unsigned long flags;
@@ -1379,13 +1379,15 @@ static int __devinit zs_probe(struct of_device *op, const struct of_device_id *m
1379 if (!keyboard_mouse) { 1379 if (!keyboard_mouse) {
1380 err = uart_add_one_port(&sunzilog_reg, &up[0].port); 1380 err = uart_add_one_port(&sunzilog_reg, &up[0].port);
1381 if (err) { 1381 if (err) {
1382 of_iounmap(rp, sizeof(struct zilog_layout)); 1382 of_iounmap(&op->resource[0],
1383 rp, sizeof(struct zilog_layout));
1383 return err; 1384 return err;
1384 } 1385 }
1385 err = uart_add_one_port(&sunzilog_reg, &up[1].port); 1386 err = uart_add_one_port(&sunzilog_reg, &up[1].port);
1386 if (err) { 1387 if (err) {
1387 uart_remove_one_port(&sunzilog_reg, &up[0].port); 1388 uart_remove_one_port(&sunzilog_reg, &up[0].port);
1388 of_iounmap(rp, sizeof(struct zilog_layout)); 1389 of_iounmap(&op->resource[0],
1390 rp, sizeof(struct zilog_layout));
1389 return err; 1391 return err;
1390 } 1392 }
1391 } else { 1393 } else {
@@ -1414,18 +1416,18 @@ static void __devexit zs_remove_one(struct uart_sunzilog_port *up)
1414 uart_remove_one_port(&sunzilog_reg, &up->port); 1416 uart_remove_one_port(&sunzilog_reg, &up->port);
1415} 1417}
1416 1418
1417static int __devexit zs_remove(struct of_device *dev) 1419static int __devexit zs_remove(struct of_device *op)
1418{ 1420{
1419 struct uart_sunzilog_port *up = dev_get_drvdata(&dev->dev); 1421 struct uart_sunzilog_port *up = dev_get_drvdata(&op->dev);
1420 struct zilog_layout __iomem *regs; 1422 struct zilog_layout __iomem *regs;
1421 1423
1422 zs_remove_one(&up[0]); 1424 zs_remove_one(&up[0]);
1423 zs_remove_one(&up[1]); 1425 zs_remove_one(&up[1]);
1424 1426
1425 regs = sunzilog_chip_regs[up[0].port.line / 2]; 1427 regs = sunzilog_chip_regs[up[0].port.line / 2];
1426 of_iounmap(regs, sizeof(struct zilog_layout)); 1428 of_iounmap(&op->resource[0], regs, sizeof(struct zilog_layout));
1427 1429
1428 dev_set_drvdata(&dev->dev, NULL); 1430 dev_set_drvdata(&op->dev, NULL);
1429 1431
1430 return 0; 1432 return 0;
1431} 1433}
diff --git a/drivers/serial/uartlite.c b/drivers/serial/uartlite.c
index 83690653b78b..db8607e3d531 100644
--- a/drivers/serial/uartlite.c
+++ b/drivers/serial/uartlite.c
@@ -214,8 +214,8 @@ static void ulite_shutdown(struct uart_port *port)
214 free_irq(port->irq, port); 214 free_irq(port->irq, port);
215} 215}
216 216
217static void ulite_set_termios(struct uart_port *port, struct termios *termios, 217static void ulite_set_termios(struct uart_port *port, struct ktermios *termios,
218 struct termios *old) 218 struct ktermios *old)
219{ 219{
220 unsigned long flags; 220 unsigned long flags;
221 unsigned int baud; 221 unsigned int baud;
@@ -278,8 +278,8 @@ static int ulite_request_port(struct uart_port *port)
278 278
279static void ulite_config_port(struct uart_port *port, int flags) 279static void ulite_config_port(struct uart_port *port, int flags)
280{ 280{
281 ulite_request_port(port); 281 if (!ulite_request_port(port))
282 port->type = PORT_UARTLITE; 282 port->type = PORT_UARTLITE;
283} 283}
284 284
285static int ulite_verify_port(struct uart_port *port, struct serial_struct *ser) 285static int ulite_verify_port(struct uart_port *port, struct serial_struct *ser)
diff --git a/drivers/serial/v850e_uart.c b/drivers/serial/v850e_uart.c
index 28f3bbff87bf..dd98aca6ed08 100644
--- a/drivers/serial/v850e_uart.c
+++ b/drivers/serial/v850e_uart.c
@@ -404,8 +404,8 @@ static void v850e_uart_shutdown (struct uart_port *port)
404} 404}
405 405
406static void 406static void
407v850e_uart_set_termios (struct uart_port *port, struct termios *termios, 407v850e_uart_set_termios (struct uart_port *port, struct ktermios *termios,
408 struct termios *old) 408 struct ktermios *old)
409{ 409{
410 unsigned cflags = termios->c_cflag; 410 unsigned cflags = termios->c_cflag;
411 411
diff --git a/drivers/serial/vr41xx_siu.c b/drivers/serial/vr41xx_siu.c
index fd51f8182dec..cf0e663b42ed 100644
--- a/drivers/serial/vr41xx_siu.c
+++ b/drivers/serial/vr41xx_siu.c
@@ -562,8 +562,8 @@ static void siu_shutdown(struct uart_port *port)
562 free_irq(port->irq, port); 562 free_irq(port->irq, port);
563} 563}
564 564
565static void siu_set_termios(struct uart_port *port, struct termios *new, 565static void siu_set_termios(struct uart_port *port, struct ktermios *new,
566 struct termios *old) 566 struct ktermios *old)
567{ 567{
568 tcflag_t c_cflag, c_iflag; 568 tcflag_t c_cflag, c_iflag;
569 uint8_t lcr, fcr, ier; 569 uint8_t lcr, fcr, ier;