diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-30 00:00:38 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-30 00:00:38 -0400 |
commit | 0b35ff23b2633eb996d666e5a49a5d49b8a6a2d3 (patch) | |
tree | 6e0a8c2bbd33c1cec2af6fbb1a6665751c07a631 | |
parent | 92dd7ca0af8f769569bde98a83b4a8f4daec6ac5 (diff) | |
parent | 026d02a236f429eb61a1277166bd425f8514c431 (diff) |
Merge master.kernel.org:/home/rmk/linux-2.6-serial
30 files changed, 82 insertions, 572 deletions
diff --git a/Documentation/serial/driver b/Documentation/serial/driver index e9c0178cd202..ac7eabbf662a 100644 --- a/Documentation/serial/driver +++ b/Documentation/serial/driver | |||
@@ -107,8 +107,8 @@ hardware. | |||
107 | indicate that the signal is permanently active. If RI is | 107 | indicate that the signal is permanently active. If RI is |
108 | not available, the signal should not be indicated as active. | 108 | not available, the signal should not be indicated as active. |
109 | 109 | ||
110 | Locking: none. | 110 | Locking: port->lock taken. |
111 | Interrupts: caller dependent. | 111 | Interrupts: locally disabled. |
112 | This call must not sleep | 112 | This call must not sleep |
113 | 113 | ||
114 | stop_tx(port,tty_stop) | 114 | stop_tx(port,tty_stop) |
diff --git a/arch/parisc/configs/712_defconfig b/arch/parisc/configs/712_defconfig index 872085dea8a8..6efaa9293eef 100644 --- a/arch/parisc/configs/712_defconfig +++ b/arch/parisc/configs/712_defconfig | |||
@@ -506,7 +506,7 @@ CONFIG_HW_CONSOLE=y | |||
506 | # | 506 | # |
507 | CONFIG_SERIAL_8250=y | 507 | CONFIG_SERIAL_8250=y |
508 | CONFIG_SERIAL_8250_CONSOLE=y | 508 | CONFIG_SERIAL_8250_CONSOLE=y |
509 | CONFIG_SERIAL_8250_NR_UARTS=8 | 509 | CONFIG_SERIAL_8250_NR_UARTS=17 |
510 | CONFIG_SERIAL_8250_EXTENDED=y | 510 | CONFIG_SERIAL_8250_EXTENDED=y |
511 | CONFIG_SERIAL_8250_MANY_PORTS=y | 511 | CONFIG_SERIAL_8250_MANY_PORTS=y |
512 | CONFIG_SERIAL_8250_SHARE_IRQ=y | 512 | CONFIG_SERIAL_8250_SHARE_IRQ=y |
diff --git a/arch/parisc/configs/a500_defconfig b/arch/parisc/configs/a500_defconfig index d28ebfa1070d..30fc03ed0cfb 100644 --- a/arch/parisc/configs/a500_defconfig +++ b/arch/parisc/configs/a500_defconfig | |||
@@ -662,7 +662,7 @@ CONFIG_HW_CONSOLE=y | |||
662 | CONFIG_SERIAL_8250=y | 662 | CONFIG_SERIAL_8250=y |
663 | CONFIG_SERIAL_8250_CONSOLE=y | 663 | CONFIG_SERIAL_8250_CONSOLE=y |
664 | CONFIG_SERIAL_8250_CS=m | 664 | CONFIG_SERIAL_8250_CS=m |
665 | CONFIG_SERIAL_8250_NR_UARTS=8 | 665 | CONFIG_SERIAL_8250_NR_UARTS=17 |
666 | CONFIG_SERIAL_8250_EXTENDED=y | 666 | CONFIG_SERIAL_8250_EXTENDED=y |
667 | CONFIG_SERIAL_8250_MANY_PORTS=y | 667 | CONFIG_SERIAL_8250_MANY_PORTS=y |
668 | CONFIG_SERIAL_8250_SHARE_IRQ=y | 668 | CONFIG_SERIAL_8250_SHARE_IRQ=y |
diff --git a/arch/parisc/configs/b180_defconfig b/arch/parisc/configs/b180_defconfig index 1700d7aec686..46c9511f3229 100644 --- a/arch/parisc/configs/b180_defconfig +++ b/arch/parisc/configs/b180_defconfig | |||
@@ -514,7 +514,7 @@ CONFIG_HW_CONSOLE=y | |||
514 | # | 514 | # |
515 | CONFIG_SERIAL_8250=y | 515 | CONFIG_SERIAL_8250=y |
516 | CONFIG_SERIAL_8250_CONSOLE=y | 516 | CONFIG_SERIAL_8250_CONSOLE=y |
517 | CONFIG_SERIAL_8250_NR_UARTS=4 | 517 | CONFIG_SERIAL_8250_NR_UARTS=13 |
518 | CONFIG_SERIAL_8250_EXTENDED=y | 518 | CONFIG_SERIAL_8250_EXTENDED=y |
519 | CONFIG_SERIAL_8250_MANY_PORTS=y | 519 | CONFIG_SERIAL_8250_MANY_PORTS=y |
520 | CONFIG_SERIAL_8250_SHARE_IRQ=y | 520 | CONFIG_SERIAL_8250_SHARE_IRQ=y |
diff --git a/arch/parisc/configs/c3000_defconfig b/arch/parisc/configs/c3000_defconfig index b27980161c31..67aca6ccc9b0 100644 --- a/arch/parisc/configs/c3000_defconfig +++ b/arch/parisc/configs/c3000_defconfig | |||
@@ -661,7 +661,7 @@ CONFIG_HW_CONSOLE=y | |||
661 | # | 661 | # |
662 | CONFIG_SERIAL_8250=y | 662 | CONFIG_SERIAL_8250=y |
663 | CONFIG_SERIAL_8250_CONSOLE=y | 663 | CONFIG_SERIAL_8250_CONSOLE=y |
664 | CONFIG_SERIAL_8250_NR_UARTS=4 | 664 | CONFIG_SERIAL_8250_NR_UARTS=13 |
665 | CONFIG_SERIAL_8250_EXTENDED=y | 665 | CONFIG_SERIAL_8250_EXTENDED=y |
666 | CONFIG_SERIAL_8250_MANY_PORTS=y | 666 | CONFIG_SERIAL_8250_MANY_PORTS=y |
667 | CONFIG_SERIAL_8250_SHARE_IRQ=y | 667 | CONFIG_SERIAL_8250_SHARE_IRQ=y |
diff --git a/arch/parisc/defconfig b/arch/parisc/defconfig index ebd6301aa599..fdae21c503d7 100644 --- a/arch/parisc/defconfig +++ b/arch/parisc/defconfig | |||
@@ -517,7 +517,7 @@ CONFIG_HW_CONSOLE=y | |||
517 | # | 517 | # |
518 | CONFIG_SERIAL_8250=y | 518 | CONFIG_SERIAL_8250=y |
519 | CONFIG_SERIAL_8250_CONSOLE=y | 519 | CONFIG_SERIAL_8250_CONSOLE=y |
520 | CONFIG_SERIAL_8250_NR_UARTS=4 | 520 | CONFIG_SERIAL_8250_NR_UARTS=13 |
521 | CONFIG_SERIAL_8250_EXTENDED=y | 521 | CONFIG_SERIAL_8250_EXTENDED=y |
522 | CONFIG_SERIAL_8250_MANY_PORTS=y | 522 | CONFIG_SERIAL_8250_MANY_PORTS=y |
523 | CONFIG_SERIAL_8250_SHARE_IRQ=y | 523 | CONFIG_SERIAL_8250_SHARE_IRQ=y |
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index 34e75bc8f4cc..9224fc3184ea 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c | |||
@@ -105,7 +105,7 @@ static struct old_serial_port old_serial_port[] = { | |||
105 | SERIAL_PORT_DFNS /* defined in asm/serial.h */ | 105 | SERIAL_PORT_DFNS /* defined in asm/serial.h */ |
106 | }; | 106 | }; |
107 | 107 | ||
108 | #define UART_NR (ARRAY_SIZE(old_serial_port) + CONFIG_SERIAL_8250_NR_UARTS) | 108 | #define UART_NR CONFIG_SERIAL_8250_NR_UARTS |
109 | 109 | ||
110 | #ifdef CONFIG_SERIAL_8250_RSA | 110 | #ifdef CONFIG_SERIAL_8250_RSA |
111 | 111 | ||
@@ -993,21 +993,24 @@ static void autoconfig_irq(struct uart_8250_port *up) | |||
993 | up->port.irq = (irq > 0) ? irq : 0; | 993 | up->port.irq = (irq > 0) ? irq : 0; |
994 | } | 994 | } |
995 | 995 | ||
996 | static inline void __stop_tx(struct uart_8250_port *p) | ||
997 | { | ||
998 | if (p->ier & UART_IER_THRI) { | ||
999 | p->ier &= ~UART_IER_THRI; | ||
1000 | serial_out(p, UART_IER, p->ier); | ||
1001 | } | ||
1002 | } | ||
1003 | |||
996 | static void serial8250_stop_tx(struct uart_port *port, unsigned int tty_stop) | 1004 | static void serial8250_stop_tx(struct uart_port *port, unsigned int tty_stop) |
997 | { | 1005 | { |
998 | struct uart_8250_port *up = (struct uart_8250_port *)port; | 1006 | struct uart_8250_port *up = (struct uart_8250_port *)port; |
999 | 1007 | ||
1000 | if (up->ier & UART_IER_THRI) { | 1008 | __stop_tx(up); |
1001 | up->ier &= ~UART_IER_THRI; | ||
1002 | serial_out(up, UART_IER, up->ier); | ||
1003 | } | ||
1004 | 1009 | ||
1005 | /* | 1010 | /* |
1006 | * We only do this from uart_stop - if we run out of | 1011 | * We really want to stop the transmitter from sending. |
1007 | * characters to send, we don't want to prevent the | ||
1008 | * FIFO from emptying. | ||
1009 | */ | 1012 | */ |
1010 | if (up->port.type == PORT_16C950 && tty_stop) { | 1013 | if (up->port.type == PORT_16C950) { |
1011 | up->acr |= UART_ACR_TXDIS; | 1014 | up->acr |= UART_ACR_TXDIS; |
1012 | serial_icr_write(up, UART_ACR, up->acr); | 1015 | serial_icr_write(up, UART_ACR, up->acr); |
1013 | } | 1016 | } |
@@ -1031,10 +1034,11 @@ static void serial8250_start_tx(struct uart_port *port, unsigned int tty_start) | |||
1031 | transmit_chars(up); | 1034 | transmit_chars(up); |
1032 | } | 1035 | } |
1033 | } | 1036 | } |
1037 | |||
1034 | /* | 1038 | /* |
1035 | * We only do this from uart_start | 1039 | * Re-enable the transmitter if we disabled it. |
1036 | */ | 1040 | */ |
1037 | if (tty_start && up->port.type == PORT_16C950) { | 1041 | if (up->port.type == PORT_16C950 && up->acr & UART_ACR_TXDIS) { |
1038 | up->acr &= ~UART_ACR_TXDIS; | 1042 | up->acr &= ~UART_ACR_TXDIS; |
1039 | serial_icr_write(up, UART_ACR, up->acr); | 1043 | serial_icr_write(up, UART_ACR, up->acr); |
1040 | } | 1044 | } |
@@ -1155,7 +1159,7 @@ static _INLINE_ void transmit_chars(struct uart_8250_port *up) | |||
1155 | return; | 1159 | return; |
1156 | } | 1160 | } |
1157 | if (uart_circ_empty(xmit) || uart_tx_stopped(&up->port)) { | 1161 | if (uart_circ_empty(xmit) || uart_tx_stopped(&up->port)) { |
1158 | serial8250_stop_tx(&up->port, 0); | 1162 | __stop_tx(up); |
1159 | return; | 1163 | return; |
1160 | } | 1164 | } |
1161 | 1165 | ||
@@ -1174,7 +1178,7 @@ static _INLINE_ void transmit_chars(struct uart_8250_port *up) | |||
1174 | DEBUG_INTR("THRE..."); | 1178 | DEBUG_INTR("THRE..."); |
1175 | 1179 | ||
1176 | if (uart_circ_empty(xmit)) | 1180 | if (uart_circ_empty(xmit)) |
1177 | serial8250_stop_tx(&up->port, 0); | 1181 | __stop_tx(up); |
1178 | } | 1182 | } |
1179 | 1183 | ||
1180 | static _INLINE_ void check_modem_status(struct uart_8250_port *up) | 1184 | static _INLINE_ void check_modem_status(struct uart_8250_port *up) |
@@ -1376,13 +1380,10 @@ static unsigned int serial8250_tx_empty(struct uart_port *port) | |||
1376 | static unsigned int serial8250_get_mctrl(struct uart_port *port) | 1380 | static unsigned int serial8250_get_mctrl(struct uart_port *port) |
1377 | { | 1381 | { |
1378 | struct uart_8250_port *up = (struct uart_8250_port *)port; | 1382 | struct uart_8250_port *up = (struct uart_8250_port *)port; |
1379 | unsigned long flags; | ||
1380 | unsigned char status; | 1383 | unsigned char status; |
1381 | unsigned int ret; | 1384 | unsigned int ret; |
1382 | 1385 | ||
1383 | spin_lock_irqsave(&up->port.lock, flags); | ||
1384 | status = serial_in(up, UART_MSR); | 1386 | status = serial_in(up, UART_MSR); |
1385 | spin_unlock_irqrestore(&up->port.lock, flags); | ||
1386 | 1387 | ||
1387 | ret = 0; | 1388 | ret = 0; |
1388 | if (status & UART_MSR_DCD) | 1389 | if (status & UART_MSR_DCD) |
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index e879bce160df..e0d0a470ddfc 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig | |||
@@ -86,7 +86,7 @@ config SERIAL_8250_ACPI | |||
86 | namespace, say Y here. If unsure, say N. | 86 | namespace, say Y here. If unsure, say N. |
87 | 87 | ||
88 | config SERIAL_8250_NR_UARTS | 88 | config SERIAL_8250_NR_UARTS |
89 | int "Maximum number of non-legacy 8250/16550 serial ports" | 89 | int "Maximum number of 8250/16550 serial ports" |
90 | depends on SERIAL_8250 | 90 | depends on SERIAL_8250 |
91 | default "4" | 91 | default "4" |
92 | help | 92 | help |
diff --git a/drivers/serial/au1x00_uart.c b/drivers/serial/au1x00_uart.c index 5400dc2c087e..6104aeef1243 100644 --- a/drivers/serial/au1x00_uart.c +++ b/drivers/serial/au1x00_uart.c | |||
@@ -556,13 +556,10 @@ static unsigned int serial8250_tx_empty(struct uart_port *port) | |||
556 | static unsigned int serial8250_get_mctrl(struct uart_port *port) | 556 | static unsigned int serial8250_get_mctrl(struct uart_port *port) |
557 | { | 557 | { |
558 | struct uart_8250_port *up = (struct uart_8250_port *)port; | 558 | struct uart_8250_port *up = (struct uart_8250_port *)port; |
559 | unsigned long flags; | ||
560 | unsigned char status; | 559 | unsigned char status; |
561 | unsigned int ret; | 560 | unsigned int ret; |
562 | 561 | ||
563 | spin_lock_irqsave(&up->port.lock, flags); | ||
564 | status = serial_in(up, UART_MSR); | 562 | status = serial_in(up, UART_MSR); |
565 | spin_unlock_irqrestore(&up->port.lock, flags); | ||
566 | 563 | ||
567 | ret = 0; | 564 | ret = 0; |
568 | if (status & UART_MSR_DCD) | 565 | if (status & UART_MSR_DCD) |
diff --git a/drivers/serial/ip22zilog.c b/drivers/serial/ip22zilog.c index 3ea46c069f6f..ea5bf4d4daa3 100644 --- a/drivers/serial/ip22zilog.c +++ b/drivers/serial/ip22zilog.c | |||
@@ -518,27 +518,28 @@ static irqreturn_t ip22zilog_interrupt(int irq, void *dev_id, struct pt_regs *re | |||
518 | static __inline__ unsigned char ip22zilog_read_channel_status(struct uart_port *port) | 518 | static __inline__ unsigned char ip22zilog_read_channel_status(struct uart_port *port) |
519 | { | 519 | { |
520 | struct zilog_channel *channel; | 520 | struct zilog_channel *channel; |
521 | unsigned long flags; | ||
522 | unsigned char status; | 521 | unsigned char status; |
523 | 522 | ||
524 | spin_lock_irqsave(&port->lock, flags); | ||
525 | |||
526 | channel = ZILOG_CHANNEL_FROM_PORT(port); | 523 | channel = ZILOG_CHANNEL_FROM_PORT(port); |
527 | status = readb(&channel->control); | 524 | status = readb(&channel->control); |
528 | ZSDELAY(); | 525 | ZSDELAY(); |
529 | 526 | ||
530 | spin_unlock_irqrestore(&port->lock, flags); | ||
531 | |||
532 | return status; | 527 | return status; |
533 | } | 528 | } |
534 | 529 | ||
535 | /* The port lock is not held. */ | 530 | /* The port lock is not held. */ |
536 | static unsigned int ip22zilog_tx_empty(struct uart_port *port) | 531 | static unsigned int ip22zilog_tx_empty(struct uart_port *port) |
537 | { | 532 | { |
533 | unsigned long flags; | ||
538 | unsigned char status; | 534 | unsigned char status; |
539 | unsigned int ret; | 535 | unsigned int ret; |
540 | 536 | ||
537 | spin_lock_irqsave(&port->lock, flags); | ||
538 | |||
541 | status = ip22zilog_read_channel_status(port); | 539 | status = ip22zilog_read_channel_status(port); |
540 | |||
541 | spin_unlock_irqrestore(&port->lock, flags); | ||
542 | |||
542 | if (status & Tx_BUF_EMP) | 543 | if (status & Tx_BUF_EMP) |
543 | ret = TIOCSER_TEMT; | 544 | ret = TIOCSER_TEMT; |
544 | else | 545 | else |
@@ -547,7 +548,7 @@ static unsigned int ip22zilog_tx_empty(struct uart_port *port) | |||
547 | return ret; | 548 | return ret; |
548 | } | 549 | } |
549 | 550 | ||
550 | /* The port lock is not held. */ | 551 | /* The port lock is held and interrupts are disabled. */ |
551 | static unsigned int ip22zilog_get_mctrl(struct uart_port *port) | 552 | static unsigned int ip22zilog_get_mctrl(struct uart_port *port) |
552 | { | 553 | { |
553 | unsigned char status; | 554 | unsigned char status; |
diff --git a/drivers/serial/mpsc.c b/drivers/serial/mpsc.c index a2a643318002..e43276c6a954 100644 --- a/drivers/serial/mpsc.c +++ b/drivers/serial/mpsc.c | |||
@@ -1058,12 +1058,9 @@ mpsc_get_mctrl(struct uart_port *port) | |||
1058 | { | 1058 | { |
1059 | struct mpsc_port_info *pi = (struct mpsc_port_info *)port; | 1059 | struct mpsc_port_info *pi = (struct mpsc_port_info *)port; |
1060 | u32 mflags, status; | 1060 | u32 mflags, status; |
1061 | ulong iflags; | ||
1062 | 1061 | ||
1063 | spin_lock_irqsave(&pi->port.lock, iflags); | ||
1064 | status = (pi->mirror_regs) ? pi->MPSC_CHR_10_m : | 1062 | status = (pi->mirror_regs) ? pi->MPSC_CHR_10_m : |
1065 | readl(pi->mpsc_base + MPSC_CHR_10); | 1063 | readl(pi->mpsc_base + MPSC_CHR_10); |
1066 | spin_unlock_irqrestore(&pi->port.lock, iflags); | ||
1067 | 1064 | ||
1068 | mflags = 0; | 1065 | mflags = 0; |
1069 | if (status & 0x1) | 1066 | if (status & 0x1) |
diff --git a/drivers/serial/pmac_zilog.c b/drivers/serial/pmac_zilog.c index 85abd8a045e0..1c9f71617123 100644 --- a/drivers/serial/pmac_zilog.c +++ b/drivers/serial/pmac_zilog.c | |||
@@ -604,7 +604,7 @@ static void pmz_set_mctrl(struct uart_port *port, unsigned int mctrl) | |||
604 | /* | 604 | /* |
605 | * Get Modem Control bits (only the input ones, the core will | 605 | * Get Modem Control bits (only the input ones, the core will |
606 | * or that with a cached value of the control ones) | 606 | * or that with a cached value of the control ones) |
607 | * The port lock is not held. | 607 | * The port lock is held and interrupts are disabled. |
608 | */ | 608 | */ |
609 | static unsigned int pmz_get_mctrl(struct uart_port *port) | 609 | static unsigned int pmz_get_mctrl(struct uart_port *port) |
610 | { | 610 | { |
@@ -615,7 +615,7 @@ static unsigned int pmz_get_mctrl(struct uart_port *port) | |||
615 | if (ZS_IS_ASLEEP(uap) || uap->node == NULL) | 615 | if (ZS_IS_ASLEEP(uap) || uap->node == NULL) |
616 | return 0; | 616 | return 0; |
617 | 617 | ||
618 | status = pmz_peek_status(to_pmz(port)); | 618 | status = read_zsreg(uap, R0); |
619 | 619 | ||
620 | ret = 0; | 620 | ret = 0; |
621 | if (status & DCD) | 621 | if (status & DCD) |
diff --git a/drivers/serial/pxa.c b/drivers/serial/pxa.c index 08b08d6ae904..461c81c93207 100644 --- a/drivers/serial/pxa.c +++ b/drivers/serial/pxa.c | |||
@@ -274,14 +274,11 @@ static unsigned int serial_pxa_tx_empty(struct uart_port *port) | |||
274 | static unsigned int serial_pxa_get_mctrl(struct uart_port *port) | 274 | static unsigned int serial_pxa_get_mctrl(struct uart_port *port) |
275 | { | 275 | { |
276 | struct uart_pxa_port *up = (struct uart_pxa_port *)port; | 276 | struct uart_pxa_port *up = (struct uart_pxa_port *)port; |
277 | unsigned long flags; | ||
278 | unsigned char status; | 277 | unsigned char status; |
279 | unsigned int ret; | 278 | unsigned int ret; |
280 | 279 | ||
281 | return TIOCM_CTS | TIOCM_DSR | TIOCM_CAR; | 280 | return TIOCM_CTS | TIOCM_DSR | TIOCM_CAR; |
282 | spin_lock_irqsave(&up->port.lock, flags); | ||
283 | status = serial_in(up, UART_MSR); | 281 | status = serial_in(up, UART_MSR); |
284 | spin_unlock_irqrestore(&up->port.lock, flags); | ||
285 | 282 | ||
286 | ret = 0; | 283 | ret = 0; |
287 | if (status & UART_MSR_DCD) | 284 | if (status & UART_MSR_DCD) |
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c index 36b1ae083fb7..139863a787f3 100644 --- a/drivers/serial/serial_core.c +++ b/drivers/serial/serial_core.c | |||
@@ -182,6 +182,13 @@ static int uart_startup(struct uart_state *state, int init_hw) | |||
182 | uart_set_mctrl(port, TIOCM_RTS | TIOCM_DTR); | 182 | uart_set_mctrl(port, TIOCM_RTS | TIOCM_DTR); |
183 | } | 183 | } |
184 | 184 | ||
185 | if (info->flags & UIF_CTS_FLOW) { | ||
186 | spin_lock_irq(&port->lock); | ||
187 | if (!(port->ops->get_mctrl(port) & TIOCM_CTS)) | ||
188 | info->tty->hw_stopped = 1; | ||
189 | spin_unlock_irq(&port->lock); | ||
190 | } | ||
191 | |||
185 | info->flags |= UIF_INITIALIZED; | 192 | info->flags |= UIF_INITIALIZED; |
186 | 193 | ||
187 | clear_bit(TTY_IO_ERROR, &info->tty->flags); | 194 | clear_bit(TTY_IO_ERROR, &info->tty->flags); |
@@ -828,7 +835,10 @@ static int uart_tiocmget(struct tty_struct *tty, struct file *file) | |||
828 | if ((!file || !tty_hung_up_p(file)) && | 835 | if ((!file || !tty_hung_up_p(file)) && |
829 | !(tty->flags & (1 << TTY_IO_ERROR))) { | 836 | !(tty->flags & (1 << TTY_IO_ERROR))) { |
830 | result = port->mctrl; | 837 | result = port->mctrl; |
838 | |||
839 | spin_lock_irq(&port->lock); | ||
831 | result |= port->ops->get_mctrl(port); | 840 | result |= port->ops->get_mctrl(port); |
841 | spin_unlock_irq(&port->lock); | ||
832 | } | 842 | } |
833 | up(&state->sem); | 843 | up(&state->sem); |
834 | 844 | ||
@@ -1131,6 +1141,16 @@ static void uart_set_termios(struct tty_struct *tty, struct termios *old_termios | |||
1131 | spin_unlock_irqrestore(&state->port->lock, flags); | 1141 | spin_unlock_irqrestore(&state->port->lock, flags); |
1132 | } | 1142 | } |
1133 | 1143 | ||
1144 | /* Handle turning on CRTSCTS */ | ||
1145 | if (!(old_termios->c_cflag & CRTSCTS) && (cflag & CRTSCTS)) { | ||
1146 | spin_lock_irqsave(&state->port->lock, flags); | ||
1147 | if (!(state->port->ops->get_mctrl(state->port) & TIOCM_CTS)) { | ||
1148 | tty->hw_stopped = 1; | ||
1149 | state->port->ops->stop_tx(state->port, 0); | ||
1150 | } | ||
1151 | spin_unlock_irqrestore(&state->port->lock, flags); | ||
1152 | } | ||
1153 | |||
1134 | #if 0 | 1154 | #if 0 |
1135 | /* | 1155 | /* |
1136 | * No need to wake up processes in open wait, since they | 1156 | * No need to wake up processes in open wait, since they |
@@ -1369,6 +1389,7 @@ uart_block_til_ready(struct file *filp, struct uart_state *state) | |||
1369 | DECLARE_WAITQUEUE(wait, current); | 1389 | DECLARE_WAITQUEUE(wait, current); |
1370 | struct uart_info *info = state->info; | 1390 | struct uart_info *info = state->info; |
1371 | struct uart_port *port = state->port; | 1391 | struct uart_port *port = state->port; |
1392 | unsigned int mctrl; | ||
1372 | 1393 | ||
1373 | info->blocked_open++; | 1394 | info->blocked_open++; |
1374 | state->count--; | 1395 | state->count--; |
@@ -1416,7 +1437,10 @@ uart_block_til_ready(struct file *filp, struct uart_state *state) | |||
1416 | * and wait for the carrier to indicate that the | 1437 | * and wait for the carrier to indicate that the |
1417 | * modem is ready for us. | 1438 | * modem is ready for us. |
1418 | */ | 1439 | */ |
1419 | if (port->ops->get_mctrl(port) & TIOCM_CAR) | 1440 | spin_lock_irq(&port->lock); |
1441 | mctrl = port->ops->get_mctrl(port); | ||
1442 | spin_unlock_irq(&port->lock); | ||
1443 | if (mctrl & TIOCM_CAR) | ||
1420 | break; | 1444 | break; |
1421 | 1445 | ||
1422 | up(&state->sem); | 1446 | up(&state->sem); |
@@ -1618,7 +1642,9 @@ static int uart_line_info(char *buf, struct uart_driver *drv, int i) | |||
1618 | 1642 | ||
1619 | if(capable(CAP_SYS_ADMIN)) | 1643 | if(capable(CAP_SYS_ADMIN)) |
1620 | { | 1644 | { |
1645 | spin_lock_irq(&port->lock); | ||
1621 | status = port->ops->get_mctrl(port); | 1646 | status = port->ops->get_mctrl(port); |
1647 | spin_unlock_irq(&port->lock); | ||
1622 | 1648 | ||
1623 | ret += sprintf(buf + ret, " tx:%d rx:%d", | 1649 | ret += sprintf(buf + ret, " tx:%d rx:%d", |
1624 | port->icount.tx, port->icount.rx); | 1650 | port->icount.tx, port->icount.rx); |
diff --git a/drivers/serial/serial_txx9.c b/drivers/serial/serial_txx9.c index 3f1051a4a13f..d085030df70b 100644 --- a/drivers/serial/serial_txx9.c +++ b/drivers/serial/serial_txx9.c | |||
@@ -442,13 +442,10 @@ static unsigned int serial_txx9_tx_empty(struct uart_port *port) | |||
442 | static unsigned int serial_txx9_get_mctrl(struct uart_port *port) | 442 | static unsigned int serial_txx9_get_mctrl(struct uart_port *port) |
443 | { | 443 | { |
444 | struct uart_txx9_port *up = (struct uart_txx9_port *)port; | 444 | struct uart_txx9_port *up = (struct uart_txx9_port *)port; |
445 | unsigned long flags; | ||
446 | unsigned int ret; | 445 | unsigned int ret; |
447 | 446 | ||
448 | spin_lock_irqsave(&up->port.lock, flags); | ||
449 | ret = ((sio_in(up, TXX9_SIFLCR) & TXX9_SIFLCR_RTSSC) ? 0 : TIOCM_RTS) | 447 | ret = ((sio_in(up, TXX9_SIFLCR) & TXX9_SIFLCR_RTSSC) ? 0 : TIOCM_RTS) |
450 | | ((sio_in(up, TXX9_SICISR) & TXX9_SICISR_CTSS) ? 0 : TIOCM_CTS); | 448 | | ((sio_in(up, TXX9_SICISR) & TXX9_SICISR_CTSS) ? 0 : TIOCM_CTS); |
451 | spin_unlock_irqrestore(&up->port.lock, flags); | ||
452 | 449 | ||
453 | return ret; | 450 | return ret; |
454 | } | 451 | } |
diff --git a/drivers/serial/sunsab.c b/drivers/serial/sunsab.c index 10e2990a40d4..8d198880756a 100644 --- a/drivers/serial/sunsab.c +++ b/drivers/serial/sunsab.c | |||
@@ -426,18 +426,15 @@ static void sunsab_set_mctrl(struct uart_port *port, unsigned int mctrl) | |||
426 | sunsab_tx_idle(up); | 426 | sunsab_tx_idle(up); |
427 | } | 427 | } |
428 | 428 | ||
429 | /* port->lock is not held. */ | 429 | /* port->lock is held by caller and interrupts are disabled. */ |
430 | static unsigned int sunsab_get_mctrl(struct uart_port *port) | 430 | static unsigned int sunsab_get_mctrl(struct uart_port *port) |
431 | { | 431 | { |
432 | struct uart_sunsab_port *up = (struct uart_sunsab_port *) port; | 432 | struct uart_sunsab_port *up = (struct uart_sunsab_port *) port; |
433 | unsigned long flags; | ||
434 | unsigned char val; | 433 | unsigned char val; |
435 | unsigned int result; | 434 | unsigned int result; |
436 | 435 | ||
437 | result = 0; | 436 | result = 0; |
438 | 437 | ||
439 | spin_lock_irqsave(&up->port.lock, flags); | ||
440 | |||
441 | val = readb(&up->regs->r.pvr); | 438 | val = readb(&up->regs->r.pvr); |
442 | result |= (val & up->pvr_dsr_bit) ? 0 : TIOCM_DSR; | 439 | result |= (val & up->pvr_dsr_bit) ? 0 : TIOCM_DSR; |
443 | 440 | ||
@@ -447,8 +444,6 @@ static unsigned int sunsab_get_mctrl(struct uart_port *port) | |||
447 | val = readb(&up->regs->r.star); | 444 | val = readb(&up->regs->r.star); |
448 | result |= (val & SAB82532_STAR_CTS) ? TIOCM_CTS : 0; | 445 | result |= (val & SAB82532_STAR_CTS) ? TIOCM_CTS : 0; |
449 | 446 | ||
450 | spin_unlock_irqrestore(&up->port.lock, flags); | ||
451 | |||
452 | return result; | 447 | return result; |
453 | } | 448 | } |
454 | 449 | ||
diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c index ddc97c905e14..d57a3553aea3 100644 --- a/drivers/serial/sunsu.c +++ b/drivers/serial/sunsu.c | |||
@@ -572,13 +572,10 @@ static unsigned int sunsu_tx_empty(struct uart_port *port) | |||
572 | static unsigned int sunsu_get_mctrl(struct uart_port *port) | 572 | static unsigned int sunsu_get_mctrl(struct uart_port *port) |
573 | { | 573 | { |
574 | struct uart_sunsu_port *up = (struct uart_sunsu_port *) port; | 574 | struct uart_sunsu_port *up = (struct uart_sunsu_port *) port; |
575 | unsigned long flags; | ||
576 | unsigned char status; | 575 | unsigned char status; |
577 | unsigned int ret; | 576 | unsigned int ret; |
578 | 577 | ||
579 | spin_lock_irqsave(&up->port.lock, flags); | ||
580 | status = serial_in(up, UART_MSR); | 578 | status = serial_in(up, UART_MSR); |
581 | spin_unlock_irqrestore(&up->port.lock, flags); | ||
582 | 579 | ||
583 | ret = 0; | 580 | ret = 0; |
584 | if (status & UART_MSR_DCD) | 581 | if (status & UART_MSR_DCD) |
diff --git a/drivers/serial/sunzilog.c b/drivers/serial/sunzilog.c index 8e65206d3d76..bff42a7b89d0 100644 --- a/drivers/serial/sunzilog.c +++ b/drivers/serial/sunzilog.c | |||
@@ -610,27 +610,28 @@ static irqreturn_t sunzilog_interrupt(int irq, void *dev_id, struct pt_regs *reg | |||
610 | static __inline__ unsigned char sunzilog_read_channel_status(struct uart_port *port) | 610 | static __inline__ unsigned char sunzilog_read_channel_status(struct uart_port *port) |
611 | { | 611 | { |
612 | struct zilog_channel __iomem *channel; | 612 | struct zilog_channel __iomem *channel; |
613 | unsigned long flags; | ||
614 | unsigned char status; | 613 | unsigned char status; |
615 | 614 | ||
616 | spin_lock_irqsave(&port->lock, flags); | ||
617 | |||
618 | channel = ZILOG_CHANNEL_FROM_PORT(port); | 615 | channel = ZILOG_CHANNEL_FROM_PORT(port); |
619 | status = sbus_readb(&channel->control); | 616 | status = sbus_readb(&channel->control); |
620 | ZSDELAY(); | 617 | ZSDELAY(); |
621 | 618 | ||
622 | spin_unlock_irqrestore(&port->lock, flags); | ||
623 | |||
624 | return status; | 619 | return status; |
625 | } | 620 | } |
626 | 621 | ||
627 | /* The port lock is not held. */ | 622 | /* The port lock is not held. */ |
628 | static unsigned int sunzilog_tx_empty(struct uart_port *port) | 623 | static unsigned int sunzilog_tx_empty(struct uart_port *port) |
629 | { | 624 | { |
625 | unsigned long flags; | ||
630 | unsigned char status; | 626 | unsigned char status; |
631 | unsigned int ret; | 627 | unsigned int ret; |
632 | 628 | ||
629 | spin_lock_irqsave(&port->lock, flags); | ||
630 | |||
633 | status = sunzilog_read_channel_status(port); | 631 | status = sunzilog_read_channel_status(port); |
632 | |||
633 | spin_unlock_irqrestore(&port->lock, flags); | ||
634 | |||
634 | if (status & Tx_BUF_EMP) | 635 | if (status & Tx_BUF_EMP) |
635 | ret = TIOCSER_TEMT; | 636 | ret = TIOCSER_TEMT; |
636 | else | 637 | else |
@@ -639,7 +640,7 @@ static unsigned int sunzilog_tx_empty(struct uart_port *port) | |||
639 | return ret; | 640 | return ret; |
640 | } | 641 | } |
641 | 642 | ||
642 | /* The port lock is not held. */ | 643 | /* The port lock is held and interrupts are disabled. */ |
643 | static unsigned int sunzilog_get_mctrl(struct uart_port *port) | 644 | static unsigned int sunzilog_get_mctrl(struct uart_port *port) |
644 | { | 645 | { |
645 | unsigned char status; | 646 | unsigned char status; |
diff --git a/include/asm-alpha/serial.h b/include/asm-alpha/serial.h index 7b2d9ee95a44..7e4b2987d453 100644 --- a/include/asm-alpha/serial.h +++ b/include/asm-alpha/serial.h | |||
@@ -22,54 +22,9 @@ | |||
22 | #define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF | 22 | #define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF |
23 | #endif | 23 | #endif |
24 | 24 | ||
25 | #ifdef CONFIG_SERIAL_MANY_PORTS | 25 | #define SERIAL_PORT_DFNS \ |
26 | #define FOURPORT_FLAGS ASYNC_FOURPORT | ||
27 | #define ACCENT_FLAGS 0 | ||
28 | #define BOCA_FLAGS 0 | ||
29 | #endif | ||
30 | |||
31 | #define STD_SERIAL_PORT_DEFNS \ | ||
32 | /* UART CLK PORT IRQ FLAGS */ \ | 26 | /* UART CLK PORT IRQ FLAGS */ \ |
33 | { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \ | 27 | { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \ |
34 | { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS }, /* ttyS1 */ \ | 28 | { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS }, /* ttyS1 */ \ |
35 | { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \ | 29 | { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \ |
36 | { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */ | 30 | { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */ |
37 | |||
38 | |||
39 | #ifdef CONFIG_SERIAL_MANY_PORTS | ||
40 | #define EXTRA_SERIAL_PORT_DEFNS \ | ||
41 | { 0, BASE_BAUD, 0x1A0, 9, FOURPORT_FLAGS }, /* ttyS4 */ \ | ||
42 | { 0, BASE_BAUD, 0x1A8, 9, FOURPORT_FLAGS }, /* ttyS5 */ \ | ||
43 | { 0, BASE_BAUD, 0x1B0, 9, FOURPORT_FLAGS }, /* ttyS6 */ \ | ||
44 | { 0, BASE_BAUD, 0x1B8, 9, FOURPORT_FLAGS }, /* ttyS7 */ \ | ||
45 | { 0, BASE_BAUD, 0x2A0, 5, FOURPORT_FLAGS }, /* ttyS8 */ \ | ||
46 | { 0, BASE_BAUD, 0x2A8, 5, FOURPORT_FLAGS }, /* ttyS9 */ \ | ||
47 | { 0, BASE_BAUD, 0x2B0, 5, FOURPORT_FLAGS }, /* ttyS10 */ \ | ||
48 | { 0, BASE_BAUD, 0x2B8, 5, FOURPORT_FLAGS }, /* ttyS11 */ \ | ||
49 | { 0, BASE_BAUD, 0x330, 4, ACCENT_FLAGS }, /* ttyS12 */ \ | ||
50 | { 0, BASE_BAUD, 0x338, 4, ACCENT_FLAGS }, /* ttyS13 */ \ | ||
51 | { 0, BASE_BAUD, 0x000, 0, 0 }, /* ttyS14 (spare) */ \ | ||
52 | { 0, BASE_BAUD, 0x000, 0, 0 }, /* ttyS15 (spare) */ \ | ||
53 | { 0, BASE_BAUD, 0x100, 12, BOCA_FLAGS }, /* ttyS16 */ \ | ||
54 | { 0, BASE_BAUD, 0x108, 12, BOCA_FLAGS }, /* ttyS17 */ \ | ||
55 | { 0, BASE_BAUD, 0x110, 12, BOCA_FLAGS }, /* ttyS18 */ \ | ||
56 | { 0, BASE_BAUD, 0x118, 12, BOCA_FLAGS }, /* ttyS19 */ \ | ||
57 | { 0, BASE_BAUD, 0x120, 12, BOCA_FLAGS }, /* ttyS20 */ \ | ||
58 | { 0, BASE_BAUD, 0x128, 12, BOCA_FLAGS }, /* ttyS21 */ \ | ||
59 | { 0, BASE_BAUD, 0x130, 12, BOCA_FLAGS }, /* ttyS22 */ \ | ||
60 | { 0, BASE_BAUD, 0x138, 12, BOCA_FLAGS }, /* ttyS23 */ \ | ||
61 | { 0, BASE_BAUD, 0x140, 12, BOCA_FLAGS }, /* ttyS24 */ \ | ||
62 | { 0, BASE_BAUD, 0x148, 12, BOCA_FLAGS }, /* ttyS25 */ \ | ||
63 | { 0, BASE_BAUD, 0x150, 12, BOCA_FLAGS }, /* ttyS26 */ \ | ||
64 | { 0, BASE_BAUD, 0x158, 12, BOCA_FLAGS }, /* ttyS27 */ \ | ||
65 | { 0, BASE_BAUD, 0x160, 12, BOCA_FLAGS }, /* ttyS28 */ \ | ||
66 | { 0, BASE_BAUD, 0x168, 12, BOCA_FLAGS }, /* ttyS29 */ \ | ||
67 | { 0, BASE_BAUD, 0x170, 12, BOCA_FLAGS }, /* ttyS30 */ \ | ||
68 | { 0, BASE_BAUD, 0x178, 12, BOCA_FLAGS }, /* ttyS31 */ | ||
69 | #else | ||
70 | #define EXTRA_SERIAL_PORT_DEFNS | ||
71 | #endif | ||
72 | |||
73 | #define SERIAL_PORT_DFNS \ | ||
74 | STD_SERIAL_PORT_DEFNS \ | ||
75 | EXTRA_SERIAL_PORT_DEFNS | ||
diff --git a/include/asm-arm26/serial.h b/include/asm-arm26/serial.h index 21e1df31f086..5fc747d1b501 100644 --- a/include/asm-arm26/serial.h +++ b/include/asm-arm26/serial.h | |||
@@ -30,34 +30,16 @@ | |||
30 | #if defined(CONFIG_ARCH_A5K) | 30 | #if defined(CONFIG_ARCH_A5K) |
31 | /* UART CLK PORT IRQ FLAGS */ | 31 | /* UART CLK PORT IRQ FLAGS */ |
32 | 32 | ||
33 | #define STD_SERIAL_PORT_DEFNS \ | 33 | #define SERIAL_PORT_DFNS \ |
34 | { 0, BASE_BAUD, 0x3F8, 10, STD_COM_FLAGS }, /* ttyS0 */ \ | 34 | { 0, BASE_BAUD, 0x3F8, 10, STD_COM_FLAGS }, /* ttyS0 */ \ |
35 | { 0, BASE_BAUD, 0x2F8, 10, STD_COM_FLAGS }, /* ttyS1 */ | 35 | { 0, BASE_BAUD, 0x2F8, 10, STD_COM_FLAGS }, /* ttyS1 */ |
36 | 36 | ||
37 | #else | 37 | #else |
38 | 38 | ||
39 | #define STD_SERIAL_PORT_DEFNS \ | 39 | #define SERIAL_PORT_DFNS \ |
40 | { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS0 */ \ | 40 | { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS0 */ \ |
41 | { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS1 */ | 41 | { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS1 */ |
42 | 42 | ||
43 | #endif | 43 | #endif |
44 | 44 | ||
45 | #define EXTRA_SERIAL_PORT_DEFNS \ | ||
46 | { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS2 */ \ | ||
47 | { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS3 */ \ | ||
48 | { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS4 */ \ | ||
49 | { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS5 */ \ | ||
50 | { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS6 */ \ | ||
51 | { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS7 */ \ | ||
52 | { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS8 */ \ | ||
53 | { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS9 */ \ | ||
54 | { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS10 */ \ | ||
55 | { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS11 */ \ | ||
56 | { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS12 */ \ | ||
57 | { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS13 */ | ||
58 | |||
59 | #define SERIAL_PORT_DFNS \ | ||
60 | STD_SERIAL_PORT_DEFNS \ | ||
61 | EXTRA_SERIAL_PORT_DEFNS | ||
62 | |||
63 | #endif | 45 | #endif |
diff --git a/include/asm-i386/serial.h b/include/asm-i386/serial.h index 21ddecc77c77..e1ecfccb743b 100644 --- a/include/asm-i386/serial.h +++ b/include/asm-i386/serial.h | |||
@@ -22,109 +22,9 @@ | |||
22 | #define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF | 22 | #define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF |
23 | #endif | 23 | #endif |
24 | 24 | ||
25 | #ifdef CONFIG_SERIAL_MANY_PORTS | 25 | #define SERIAL_PORT_DFNS \ |
26 | #define FOURPORT_FLAGS ASYNC_FOURPORT | ||
27 | #define ACCENT_FLAGS 0 | ||
28 | #define BOCA_FLAGS 0 | ||
29 | #define HUB6_FLAGS 0 | ||
30 | #endif | ||
31 | |||
32 | #define MCA_COM_FLAGS (STD_COM_FLAGS|ASYNC_BOOT_ONLYMCA) | ||
33 | |||
34 | /* | ||
35 | * The following define the access methods for the HUB6 card. All | ||
36 | * access is through two ports for all 24 possible chips. The card is | ||
37 | * selected through the high 2 bits, the port on that card with the | ||
38 | * "middle" 3 bits, and the register on that port with the bottom | ||
39 | * 3 bits. | ||
40 | * | ||
41 | * While the access port and interrupt is configurable, the default | ||
42 | * port locations are 0x302 for the port control register, and 0x303 | ||
43 | * for the data read/write register. Normally, the interrupt is at irq3 | ||
44 | * but can be anything from 3 to 7 inclusive. Note that using 3 will | ||
45 | * require disabling com2. | ||
46 | */ | ||
47 | |||
48 | #define C_P(card,port) (((card)<<6|(port)<<3) + 1) | ||
49 | |||
50 | #define STD_SERIAL_PORT_DEFNS \ | ||
51 | /* UART CLK PORT IRQ FLAGS */ \ | 26 | /* UART CLK PORT IRQ FLAGS */ \ |
52 | { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \ | 27 | { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \ |
53 | { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS }, /* ttyS1 */ \ | 28 | { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS }, /* ttyS1 */ \ |
54 | { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \ | 29 | { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \ |
55 | { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */ | 30 | { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */ |
56 | |||
57 | |||
58 | #ifdef CONFIG_SERIAL_MANY_PORTS | ||
59 | #define EXTRA_SERIAL_PORT_DEFNS \ | ||
60 | { 0, BASE_BAUD, 0x1A0, 9, FOURPORT_FLAGS }, /* ttyS4 */ \ | ||
61 | { 0, BASE_BAUD, 0x1A8, 9, FOURPORT_FLAGS }, /* ttyS5 */ \ | ||
62 | { 0, BASE_BAUD, 0x1B0, 9, FOURPORT_FLAGS }, /* ttyS6 */ \ | ||
63 | { 0, BASE_BAUD, 0x1B8, 9, FOURPORT_FLAGS }, /* ttyS7 */ \ | ||
64 | { 0, BASE_BAUD, 0x2A0, 5, FOURPORT_FLAGS }, /* ttyS8 */ \ | ||
65 | { 0, BASE_BAUD, 0x2A8, 5, FOURPORT_FLAGS }, /* ttyS9 */ \ | ||
66 | { 0, BASE_BAUD, 0x2B0, 5, FOURPORT_FLAGS }, /* ttyS10 */ \ | ||
67 | { 0, BASE_BAUD, 0x2B8, 5, FOURPORT_FLAGS }, /* ttyS11 */ \ | ||
68 | { 0, BASE_BAUD, 0x330, 4, ACCENT_FLAGS }, /* ttyS12 */ \ | ||
69 | { 0, BASE_BAUD, 0x338, 4, ACCENT_FLAGS }, /* ttyS13 */ \ | ||
70 | { 0, BASE_BAUD, 0x000, 0, 0 }, /* ttyS14 (spare) */ \ | ||
71 | { 0, BASE_BAUD, 0x000, 0, 0 }, /* ttyS15 (spare) */ \ | ||
72 | { 0, BASE_BAUD, 0x100, 12, BOCA_FLAGS }, /* ttyS16 */ \ | ||
73 | { 0, BASE_BAUD, 0x108, 12, BOCA_FLAGS }, /* ttyS17 */ \ | ||
74 | { 0, BASE_BAUD, 0x110, 12, BOCA_FLAGS }, /* ttyS18 */ \ | ||
75 | { 0, BASE_BAUD, 0x118, 12, BOCA_FLAGS }, /* ttyS19 */ \ | ||
76 | { 0, BASE_BAUD, 0x120, 12, BOCA_FLAGS }, /* ttyS20 */ \ | ||
77 | { 0, BASE_BAUD, 0x128, 12, BOCA_FLAGS }, /* ttyS21 */ \ | ||
78 | { 0, BASE_BAUD, 0x130, 12, BOCA_FLAGS }, /* ttyS22 */ \ | ||
79 | { 0, BASE_BAUD, 0x138, 12, BOCA_FLAGS }, /* ttyS23 */ \ | ||
80 | { 0, BASE_BAUD, 0x140, 12, BOCA_FLAGS }, /* ttyS24 */ \ | ||
81 | { 0, BASE_BAUD, 0x148, 12, BOCA_FLAGS }, /* ttyS25 */ \ | ||
82 | { 0, BASE_BAUD, 0x150, 12, BOCA_FLAGS }, /* ttyS26 */ \ | ||
83 | { 0, BASE_BAUD, 0x158, 12, BOCA_FLAGS }, /* ttyS27 */ \ | ||
84 | { 0, BASE_BAUD, 0x160, 12, BOCA_FLAGS }, /* ttyS28 */ \ | ||
85 | { 0, BASE_BAUD, 0x168, 12, BOCA_FLAGS }, /* ttyS29 */ \ | ||
86 | { 0, BASE_BAUD, 0x170, 12, BOCA_FLAGS }, /* ttyS30 */ \ | ||
87 | { 0, BASE_BAUD, 0x178, 12, BOCA_FLAGS }, /* ttyS31 */ | ||
88 | #else | ||
89 | #define EXTRA_SERIAL_PORT_DEFNS | ||
90 | #endif | ||
91 | |||
92 | /* You can have up to four HUB6's in the system, but I've only | ||
93 | * included two cards here for a total of twelve ports. | ||
94 | */ | ||
95 | #if (defined(CONFIG_HUB6) && defined(CONFIG_SERIAL_MANY_PORTS)) | ||
96 | #define HUB6_SERIAL_PORT_DFNS \ | ||
97 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,0) }, /* ttyS32 */ \ | ||
98 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,1) }, /* ttyS33 */ \ | ||
99 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,2) }, /* ttyS34 */ \ | ||
100 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,3) }, /* ttyS35 */ \ | ||
101 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,4) }, /* ttyS36 */ \ | ||
102 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,5) }, /* ttyS37 */ \ | ||
103 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,0) }, /* ttyS38 */ \ | ||
104 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,1) }, /* ttyS39 */ \ | ||
105 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,2) }, /* ttyS40 */ \ | ||
106 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,3) }, /* ttyS41 */ \ | ||
107 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,4) }, /* ttyS42 */ \ | ||
108 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,5) }, /* ttyS43 */ | ||
109 | #else | ||
110 | #define HUB6_SERIAL_PORT_DFNS | ||
111 | #endif | ||
112 | |||
113 | #ifdef CONFIG_MCA | ||
114 | #define MCA_SERIAL_PORT_DFNS \ | ||
115 | { 0, BASE_BAUD, 0x3220, 3, MCA_COM_FLAGS }, \ | ||
116 | { 0, BASE_BAUD, 0x3228, 3, MCA_COM_FLAGS }, \ | ||
117 | { 0, BASE_BAUD, 0x4220, 3, MCA_COM_FLAGS }, \ | ||
118 | { 0, BASE_BAUD, 0x4228, 3, MCA_COM_FLAGS }, \ | ||
119 | { 0, BASE_BAUD, 0x5220, 3, MCA_COM_FLAGS }, \ | ||
120 | { 0, BASE_BAUD, 0x5228, 3, MCA_COM_FLAGS }, | ||
121 | #else | ||
122 | #define MCA_SERIAL_PORT_DFNS | ||
123 | #endif | ||
124 | |||
125 | #define SERIAL_PORT_DFNS \ | ||
126 | STD_SERIAL_PORT_DEFNS \ | ||
127 | EXTRA_SERIAL_PORT_DEFNS \ | ||
128 | HUB6_SERIAL_PORT_DFNS \ | ||
129 | MCA_SERIAL_PORT_DFNS | ||
130 | |||
diff --git a/include/asm-m68k/serial.h b/include/asm-m68k/serial.h index 9f5bcdc105fc..3fe29f8b0194 100644 --- a/include/asm-m68k/serial.h +++ b/include/asm-m68k/serial.h | |||
@@ -26,54 +26,9 @@ | |||
26 | #define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF | 26 | #define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF |
27 | #endif | 27 | #endif |
28 | 28 | ||
29 | #ifdef CONFIG_SERIAL_MANY_PORTS | 29 | #define SERIAL_PORT_DFNS \ |
30 | #define FOURPORT_FLAGS ASYNC_FOURPORT | ||
31 | #define ACCENT_FLAGS 0 | ||
32 | #define BOCA_FLAGS 0 | ||
33 | #endif | ||
34 | |||
35 | #define STD_SERIAL_PORT_DEFNS \ | ||
36 | /* UART CLK PORT IRQ FLAGS */ \ | 30 | /* UART CLK PORT IRQ FLAGS */ \ |
37 | { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \ | 31 | { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \ |
38 | { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS }, /* ttyS1 */ \ | 32 | { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS }, /* ttyS1 */ \ |
39 | { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \ | 33 | { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \ |
40 | { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */ | 34 | { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */ |
41 | |||
42 | |||
43 | #ifdef CONFIG_SERIAL_MANY_PORTS | ||
44 | #define EXTRA_SERIAL_PORT_DEFNS \ | ||
45 | { 0, BASE_BAUD, 0x1A0, 9, FOURPORT_FLAGS }, /* ttyS4 */ \ | ||
46 | { 0, BASE_BAUD, 0x1A8, 9, FOURPORT_FLAGS }, /* ttyS5 */ \ | ||
47 | { 0, BASE_BAUD, 0x1B0, 9, FOURPORT_FLAGS }, /* ttyS6 */ \ | ||
48 | { 0, BASE_BAUD, 0x1B8, 9, FOURPORT_FLAGS }, /* ttyS7 */ \ | ||
49 | { 0, BASE_BAUD, 0x2A0, 5, FOURPORT_FLAGS }, /* ttyS8 */ \ | ||
50 | { 0, BASE_BAUD, 0x2A8, 5, FOURPORT_FLAGS }, /* ttyS9 */ \ | ||
51 | { 0, BASE_BAUD, 0x2B0, 5, FOURPORT_FLAGS }, /* ttyS10 */ \ | ||
52 | { 0, BASE_BAUD, 0x2B8, 5, FOURPORT_FLAGS }, /* ttyS11 */ \ | ||
53 | { 0, BASE_BAUD, 0x330, 4, ACCENT_FLAGS }, /* ttyS12 */ \ | ||
54 | { 0, BASE_BAUD, 0x338, 4, ACCENT_FLAGS }, /* ttyS13 */ \ | ||
55 | { 0, BASE_BAUD, 0x000, 0, 0 }, /* ttyS14 (spare) */ \ | ||
56 | { 0, BASE_BAUD, 0x000, 0, 0 }, /* ttyS15 (spare) */ \ | ||
57 | { 0, BASE_BAUD, 0x100, 12, BOCA_FLAGS }, /* ttyS16 */ \ | ||
58 | { 0, BASE_BAUD, 0x108, 12, BOCA_FLAGS }, /* ttyS17 */ \ | ||
59 | { 0, BASE_BAUD, 0x110, 12, BOCA_FLAGS }, /* ttyS18 */ \ | ||
60 | { 0, BASE_BAUD, 0x118, 12, BOCA_FLAGS }, /* ttyS19 */ \ | ||
61 | { 0, BASE_BAUD, 0x120, 12, BOCA_FLAGS }, /* ttyS20 */ \ | ||
62 | { 0, BASE_BAUD, 0x128, 12, BOCA_FLAGS }, /* ttyS21 */ \ | ||
63 | { 0, BASE_BAUD, 0x130, 12, BOCA_FLAGS }, /* ttyS22 */ \ | ||
64 | { 0, BASE_BAUD, 0x138, 12, BOCA_FLAGS }, /* ttyS23 */ \ | ||
65 | { 0, BASE_BAUD, 0x140, 12, BOCA_FLAGS }, /* ttyS24 */ \ | ||
66 | { 0, BASE_BAUD, 0x148, 12, BOCA_FLAGS }, /* ttyS25 */ \ | ||
67 | { 0, BASE_BAUD, 0x150, 12, BOCA_FLAGS }, /* ttyS26 */ \ | ||
68 | { 0, BASE_BAUD, 0x158, 12, BOCA_FLAGS }, /* ttyS27 */ \ | ||
69 | { 0, BASE_BAUD, 0x160, 12, BOCA_FLAGS }, /* ttyS28 */ \ | ||
70 | { 0, BASE_BAUD, 0x168, 12, BOCA_FLAGS }, /* ttyS29 */ \ | ||
71 | { 0, BASE_BAUD, 0x170, 12, BOCA_FLAGS }, /* ttyS30 */ \ | ||
72 | { 0, BASE_BAUD, 0x178, 12, BOCA_FLAGS }, /* ttyS31 */ | ||
73 | #else | ||
74 | #define EXTRA_SERIAL_PORT_DEFNS | ||
75 | #endif | ||
76 | |||
77 | #define SERIAL_PORT_DFNS \ | ||
78 | STD_SERIAL_PORT_DEFNS \ | ||
79 | EXTRA_SERIAL_PORT_DEFNS | ||
diff --git a/include/asm-mips/serial.h b/include/asm-mips/serial.h index 8a70ff58f760..4eed8e2acdc3 100644 --- a/include/asm-mips/serial.h +++ b/include/asm-mips/serial.h | |||
@@ -29,32 +29,6 @@ | |||
29 | #define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF | 29 | #define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF |
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | #ifdef CONFIG_SERIAL_MANY_PORTS | ||
33 | #define FOURPORT_FLAGS ASYNC_FOURPORT | ||
34 | #define ACCENT_FLAGS 0 | ||
35 | #define BOCA_FLAGS 0 | ||
36 | #define HUB6_FLAGS 0 | ||
37 | #define RS_TABLE_SIZE 64 | ||
38 | #else | ||
39 | #define RS_TABLE_SIZE | ||
40 | #endif | ||
41 | |||
42 | /* | ||
43 | * The following define the access methods for the HUB6 card. All | ||
44 | * access is through two ports for all 24 possible chips. The card is | ||
45 | * selected through the high 2 bits, the port on that card with the | ||
46 | * "middle" 3 bits, and the register on that port with the bottom | ||
47 | * 3 bits. | ||
48 | * | ||
49 | * While the access port and interrupt is configurable, the default | ||
50 | * port locations are 0x302 for the port control register, and 0x303 | ||
51 | * for the data read/write register. Normally, the interrupt is at irq3 | ||
52 | * but can be anything from 3 to 7 inclusive. Note that using 3 will | ||
53 | * require disabling com2. | ||
54 | */ | ||
55 | |||
56 | #define C_P(card,port) (((card)<<6|(port)<<3) + 1) | ||
57 | |||
58 | #ifdef CONFIG_MACH_JAZZ | 32 | #ifdef CONFIG_MACH_JAZZ |
59 | #include <asm/jazz.h> | 33 | #include <asm/jazz.h> |
60 | 34 | ||
@@ -240,66 +214,10 @@ | |||
240 | { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \ | 214 | { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \ |
241 | { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */ | 215 | { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */ |
242 | 216 | ||
243 | #ifdef CONFIG_SERIAL_MANY_PORTS | ||
244 | #define EXTRA_SERIAL_PORT_DEFNS \ | ||
245 | { 0, BASE_BAUD, 0x1A0, 9, FOURPORT_FLAGS }, /* ttyS4 */ \ | ||
246 | { 0, BASE_BAUD, 0x1A8, 9, FOURPORT_FLAGS }, /* ttyS5 */ \ | ||
247 | { 0, BASE_BAUD, 0x1B0, 9, FOURPORT_FLAGS }, /* ttyS6 */ \ | ||
248 | { 0, BASE_BAUD, 0x1B8, 9, FOURPORT_FLAGS }, /* ttyS7 */ \ | ||
249 | { 0, BASE_BAUD, 0x2A0, 5, FOURPORT_FLAGS }, /* ttyS8 */ \ | ||
250 | { 0, BASE_BAUD, 0x2A8, 5, FOURPORT_FLAGS }, /* ttyS9 */ \ | ||
251 | { 0, BASE_BAUD, 0x2B0, 5, FOURPORT_FLAGS }, /* ttyS10 */ \ | ||
252 | { 0, BASE_BAUD, 0x2B8, 5, FOURPORT_FLAGS }, /* ttyS11 */ \ | ||
253 | { 0, BASE_BAUD, 0x330, 4, ACCENT_FLAGS }, /* ttyS12 */ \ | ||
254 | { 0, BASE_BAUD, 0x338, 4, ACCENT_FLAGS }, /* ttyS13 */ \ | ||
255 | { 0, BASE_BAUD, 0x000, 0, 0 }, /* ttyS14 (spare) */ \ | ||
256 | { 0, BASE_BAUD, 0x000, 0, 0 }, /* ttyS15 (spare) */ \ | ||
257 | { 0, BASE_BAUD, 0x100, 12, BOCA_FLAGS }, /* ttyS16 */ \ | ||
258 | { 0, BASE_BAUD, 0x108, 12, BOCA_FLAGS }, /* ttyS17 */ \ | ||
259 | { 0, BASE_BAUD, 0x110, 12, BOCA_FLAGS }, /* ttyS18 */ \ | ||
260 | { 0, BASE_BAUD, 0x118, 12, BOCA_FLAGS }, /* ttyS19 */ \ | ||
261 | { 0, BASE_BAUD, 0x120, 12, BOCA_FLAGS }, /* ttyS20 */ \ | ||
262 | { 0, BASE_BAUD, 0x128, 12, BOCA_FLAGS }, /* ttyS21 */ \ | ||
263 | { 0, BASE_BAUD, 0x130, 12, BOCA_FLAGS }, /* ttyS22 */ \ | ||
264 | { 0, BASE_BAUD, 0x138, 12, BOCA_FLAGS }, /* ttyS23 */ \ | ||
265 | { 0, BASE_BAUD, 0x140, 12, BOCA_FLAGS }, /* ttyS24 */ \ | ||
266 | { 0, BASE_BAUD, 0x148, 12, BOCA_FLAGS }, /* ttyS25 */ \ | ||
267 | { 0, BASE_BAUD, 0x150, 12, BOCA_FLAGS }, /* ttyS26 */ \ | ||
268 | { 0, BASE_BAUD, 0x158, 12, BOCA_FLAGS }, /* ttyS27 */ \ | ||
269 | { 0, BASE_BAUD, 0x160, 12, BOCA_FLAGS }, /* ttyS28 */ \ | ||
270 | { 0, BASE_BAUD, 0x168, 12, BOCA_FLAGS }, /* ttyS29 */ \ | ||
271 | { 0, BASE_BAUD, 0x170, 12, BOCA_FLAGS }, /* ttyS30 */ \ | ||
272 | { 0, BASE_BAUD, 0x178, 12, BOCA_FLAGS }, /* ttyS31 */ | ||
273 | #else /* CONFIG_SERIAL_MANY_PORTS */ | ||
274 | #define EXTRA_SERIAL_PORT_DEFNS | ||
275 | #endif /* CONFIG_SERIAL_MANY_PORTS */ | ||
276 | |||
277 | #else /* CONFIG_HAVE_STD_PC_SERIAL_PORTS */ | 217 | #else /* CONFIG_HAVE_STD_PC_SERIAL_PORTS */ |
278 | #define STD_SERIAL_PORT_DEFNS | 218 | #define STD_SERIAL_PORT_DEFNS |
279 | #define EXTRA_SERIAL_PORT_DEFNS | ||
280 | #endif /* CONFIG_HAVE_STD_PC_SERIAL_PORTS */ | 219 | #endif /* CONFIG_HAVE_STD_PC_SERIAL_PORTS */ |
281 | 220 | ||
282 | /* You can have up to four HUB6's in the system, but I've only | ||
283 | * included two cards here for a total of twelve ports. | ||
284 | */ | ||
285 | #if (defined(CONFIG_HUB6) && defined(CONFIG_SERIAL_MANY_PORTS)) | ||
286 | #define HUB6_SERIAL_PORT_DFNS \ | ||
287 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,0) }, /* ttyS32 */ \ | ||
288 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,1) }, /* ttyS33 */ \ | ||
289 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,2) }, /* ttyS34 */ \ | ||
290 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,3) }, /* ttyS35 */ \ | ||
291 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,4) }, /* ttyS36 */ \ | ||
292 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,5) }, /* ttyS37 */ \ | ||
293 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,0) }, /* ttyS38 */ \ | ||
294 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,1) }, /* ttyS39 */ \ | ||
295 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,2) }, /* ttyS40 */ \ | ||
296 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,3) }, /* ttyS41 */ \ | ||
297 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,4) }, /* ttyS42 */ \ | ||
298 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,5) }, /* ttyS43 */ | ||
299 | #else | ||
300 | #define HUB6_SERIAL_PORT_DFNS | ||
301 | #endif | ||
302 | |||
303 | #ifdef CONFIG_MOMENCO_JAGUAR_ATX | 221 | #ifdef CONFIG_MOMENCO_JAGUAR_ATX |
304 | /* Ordinary NS16552 duart with a 20MHz crystal. */ | 222 | /* Ordinary NS16552 duart with a 20MHz crystal. */ |
305 | #define JAGUAR_ATX_UART_CLK 20000000 | 223 | #define JAGUAR_ATX_UART_CLK 20000000 |
@@ -427,8 +345,6 @@ | |||
427 | COBALT_SERIAL_PORT_DEFNS \ | 345 | COBALT_SERIAL_PORT_DEFNS \ |
428 | DDB5477_SERIAL_PORT_DEFNS \ | 346 | DDB5477_SERIAL_PORT_DEFNS \ |
429 | EV96100_SERIAL_PORT_DEFNS \ | 347 | EV96100_SERIAL_PORT_DEFNS \ |
430 | EXTRA_SERIAL_PORT_DEFNS \ | ||
431 | HUB6_SERIAL_PORT_DFNS \ | ||
432 | IP32_SERIAL_PORT_DEFNS \ | 348 | IP32_SERIAL_PORT_DEFNS \ |
433 | ITE_SERIAL_PORT_DEFNS \ | 349 | ITE_SERIAL_PORT_DEFNS \ |
434 | IVR_SERIAL_PORT_DEFNS \ | 350 | IVR_SERIAL_PORT_DEFNS \ |
diff --git a/include/asm-parisc/serial.h b/include/asm-parisc/serial.h index 239c5dcab7e6..82fd820d684f 100644 --- a/include/asm-parisc/serial.h +++ b/include/asm-parisc/serial.h | |||
@@ -19,18 +19,4 @@ | |||
19 | * A500 w/ PCI serial cards: 5 + 4 * card ~= 17 | 19 | * A500 w/ PCI serial cards: 5 + 4 * card ~= 17 |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #define STD_SERIAL_PORT_DEFNS \ | 22 | #define SERIAL_PORT_DFNS |
23 | { 0, }, /* ttyS0 */ \ | ||
24 | { 0, }, /* ttyS1 */ \ | ||
25 | { 0, }, /* ttyS2 */ \ | ||
26 | { 0, }, /* ttyS3 */ \ | ||
27 | { 0, }, /* ttyS4 */ \ | ||
28 | { 0, }, /* ttyS5 */ \ | ||
29 | { 0, }, /* ttyS6 */ \ | ||
30 | { 0, }, /* ttyS7 */ \ | ||
31 | { 0, }, /* ttyS8 */ | ||
32 | |||
33 | |||
34 | #define SERIAL_PORT_DFNS \ | ||
35 | STD_SERIAL_PORT_DEFNS | ||
36 | |||
diff --git a/include/asm-ppc/pc_serial.h b/include/asm-ppc/pc_serial.h index fa9cbb67ce3e..8f994f9f8857 100644 --- a/include/asm-ppc/pc_serial.h +++ b/include/asm-ppc/pc_serial.h | |||
@@ -35,93 +35,9 @@ | |||
35 | #define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF | 35 | #define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF |
36 | #endif | 36 | #endif |
37 | 37 | ||
38 | #ifdef CONFIG_SERIAL_MANY_PORTS | 38 | #define SERIAL_PORT_DFNS \ |
39 | #define FOURPORT_FLAGS ASYNC_FOURPORT | ||
40 | #define ACCENT_FLAGS 0 | ||
41 | #define BOCA_FLAGS 0 | ||
42 | #define HUB6_FLAGS 0 | ||
43 | #endif | ||
44 | |||
45 | /* | ||
46 | * The following define the access methods for the HUB6 card. All | ||
47 | * access is through two ports for all 24 possible chips. The card is | ||
48 | * selected through the high 2 bits, the port on that card with the | ||
49 | * "middle" 3 bits, and the register on that port with the bottom | ||
50 | * 3 bits. | ||
51 | * | ||
52 | * While the access port and interrupt is configurable, the default | ||
53 | * port locations are 0x302 for the port control register, and 0x303 | ||
54 | * for the data read/write register. Normally, the interrupt is at irq3 | ||
55 | * but can be anything from 3 to 7 inclusive. Note that using 3 will | ||
56 | * require disabling com2. | ||
57 | */ | ||
58 | |||
59 | #define C_P(card,port) (((card)<<6|(port)<<3) + 1) | ||
60 | |||
61 | #define STD_SERIAL_PORT_DEFNS \ | ||
62 | /* UART CLK PORT IRQ FLAGS */ \ | 39 | /* UART CLK PORT IRQ FLAGS */ \ |
63 | { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \ | 40 | { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \ |
64 | { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS }, /* ttyS1 */ \ | 41 | { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS }, /* ttyS1 */ \ |
65 | { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \ | 42 | { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \ |
66 | { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */ | 43 | { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */ |
67 | |||
68 | |||
69 | #ifdef CONFIG_SERIAL_MANY_PORTS | ||
70 | #define EXTRA_SERIAL_PORT_DEFNS \ | ||
71 | { 0, BASE_BAUD, 0x1A0, 9, FOURPORT_FLAGS }, /* ttyS4 */ \ | ||
72 | { 0, BASE_BAUD, 0x1A8, 9, FOURPORT_FLAGS }, /* ttyS5 */ \ | ||
73 | { 0, BASE_BAUD, 0x1B0, 9, FOURPORT_FLAGS }, /* ttyS6 */ \ | ||
74 | { 0, BASE_BAUD, 0x1B8, 9, FOURPORT_FLAGS }, /* ttyS7 */ \ | ||
75 | { 0, BASE_BAUD, 0x2A0, 5, FOURPORT_FLAGS }, /* ttyS8 */ \ | ||
76 | { 0, BASE_BAUD, 0x2A8, 5, FOURPORT_FLAGS }, /* ttyS9 */ \ | ||
77 | { 0, BASE_BAUD, 0x2B0, 5, FOURPORT_FLAGS }, /* ttyS10 */ \ | ||
78 | { 0, BASE_BAUD, 0x2B8, 5, FOURPORT_FLAGS }, /* ttyS11 */ \ | ||
79 | { 0, BASE_BAUD, 0x330, 4, ACCENT_FLAGS }, /* ttyS12 */ \ | ||
80 | { 0, BASE_BAUD, 0x338, 4, ACCENT_FLAGS }, /* ttyS13 */ \ | ||
81 | { 0, BASE_BAUD, 0x000, 0, 0 }, /* ttyS14 (spare) */ \ | ||
82 | { 0, BASE_BAUD, 0x000, 0, 0 }, /* ttyS15 (spare) */ \ | ||
83 | { 0, BASE_BAUD, 0x100, 12, BOCA_FLAGS }, /* ttyS16 */ \ | ||
84 | { 0, BASE_BAUD, 0x108, 12, BOCA_FLAGS }, /* ttyS17 */ \ | ||
85 | { 0, BASE_BAUD, 0x110, 12, BOCA_FLAGS }, /* ttyS18 */ \ | ||
86 | { 0, BASE_BAUD, 0x118, 12, BOCA_FLAGS }, /* ttyS19 */ \ | ||
87 | { 0, BASE_BAUD, 0x120, 12, BOCA_FLAGS }, /* ttyS20 */ \ | ||
88 | { 0, BASE_BAUD, 0x128, 12, BOCA_FLAGS }, /* ttyS21 */ \ | ||
89 | { 0, BASE_BAUD, 0x130, 12, BOCA_FLAGS }, /* ttyS22 */ \ | ||
90 | { 0, BASE_BAUD, 0x138, 12, BOCA_FLAGS }, /* ttyS23 */ \ | ||
91 | { 0, BASE_BAUD, 0x140, 12, BOCA_FLAGS }, /* ttyS24 */ \ | ||
92 | { 0, BASE_BAUD, 0x148, 12, BOCA_FLAGS }, /* ttyS25 */ \ | ||
93 | { 0, BASE_BAUD, 0x150, 12, BOCA_FLAGS }, /* ttyS26 */ \ | ||
94 | { 0, BASE_BAUD, 0x158, 12, BOCA_FLAGS }, /* ttyS27 */ \ | ||
95 | { 0, BASE_BAUD, 0x160, 12, BOCA_FLAGS }, /* ttyS28 */ \ | ||
96 | { 0, BASE_BAUD, 0x168, 12, BOCA_FLAGS }, /* ttyS29 */ \ | ||
97 | { 0, BASE_BAUD, 0x170, 12, BOCA_FLAGS }, /* ttyS30 */ \ | ||
98 | { 0, BASE_BAUD, 0x178, 12, BOCA_FLAGS }, /* ttyS31 */ | ||
99 | #else | ||
100 | #define EXTRA_SERIAL_PORT_DEFNS | ||
101 | #endif | ||
102 | |||
103 | /* You can have up to four HUB6's in the system, but I've only | ||
104 | * included two cards here for a total of twelve ports. | ||
105 | */ | ||
106 | #if (defined(CONFIG_HUB6) && defined(CONFIG_SERIAL_MANY_PORTS)) | ||
107 | #define HUB6_SERIAL_PORT_DFNS \ | ||
108 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,0) }, /* ttyS32 */ \ | ||
109 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,1) }, /* ttyS33 */ \ | ||
110 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,2) }, /* ttyS34 */ \ | ||
111 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,3) }, /* ttyS35 */ \ | ||
112 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,4) }, /* ttyS36 */ \ | ||
113 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,5) }, /* ttyS37 */ \ | ||
114 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,0) }, /* ttyS38 */ \ | ||
115 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,1) }, /* ttyS39 */ \ | ||
116 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,2) }, /* ttyS40 */ \ | ||
117 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,3) }, /* ttyS41 */ \ | ||
118 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,4) }, /* ttyS42 */ \ | ||
119 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,5) }, /* ttyS43 */ | ||
120 | #else | ||
121 | #define HUB6_SERIAL_PORT_DFNS | ||
122 | #endif | ||
123 | |||
124 | #define SERIAL_PORT_DFNS \ | ||
125 | STD_SERIAL_PORT_DEFNS \ | ||
126 | EXTRA_SERIAL_PORT_DEFNS \ | ||
127 | HUB6_SERIAL_PORT_DFNS | ||
diff --git a/include/asm-sh/bigsur/serial.h b/include/asm-sh/bigsur/serial.h index 540f12205923..7233af42f755 100644 --- a/include/asm-sh/bigsur/serial.h +++ b/include/asm-sh/bigsur/serial.h | |||
@@ -14,13 +14,10 @@ | |||
14 | #define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST) | 14 | #define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST) |
15 | 15 | ||
16 | 16 | ||
17 | #define STD_SERIAL_PORT_DEFNS \ | 17 | #define SERIAL_PORT_DFNS \ |
18 | /* UART CLK PORT IRQ FLAGS */ \ | 18 | /* UART CLK PORT IRQ FLAGS */ \ |
19 | { 0, BASE_BAUD, 0x3F8, HD64465_IRQ_UART, STD_COM_FLAGS } /* ttyS0 */ | 19 | { 0, BASE_BAUD, 0x3F8, HD64465_IRQ_UART, STD_COM_FLAGS } /* ttyS0 */ |
20 | 20 | ||
21 | |||
22 | #define SERIAL_PORT_DFNS STD_SERIAL_PORT_DEFNS | ||
23 | |||
24 | /* XXX: This should be moved ino irq.h */ | 21 | /* XXX: This should be moved ino irq.h */ |
25 | #define irq_cannonicalize(x) (x) | 22 | #define irq_cannonicalize(x) (x) |
26 | 23 | ||
diff --git a/include/asm-sh/ec3104/serial.h b/include/asm-sh/ec3104/serial.h index f8eb16312ed9..cfe4d78ec1ee 100644 --- a/include/asm-sh/ec3104/serial.h +++ b/include/asm-sh/ec3104/serial.h | |||
@@ -10,13 +10,11 @@ | |||
10 | * it's got the keyboard controller behind it so we can't really use it | 10 | * it's got the keyboard controller behind it so we can't really use it |
11 | * (without moving the keyboard driver to userspace, which doesn't sound | 11 | * (without moving the keyboard driver to userspace, which doesn't sound |
12 | * like a very good idea) */ | 12 | * like a very good idea) */ |
13 | #define STD_SERIAL_PORT_DEFNS \ | 13 | #define SERIAL_PORT_DFNS \ |
14 | /* UART CLK PORT IRQ FLAGS */ \ | 14 | /* UART CLK PORT IRQ FLAGS */ \ |
15 | { 0, BASE_BAUD, 0x11C00, EC3104_IRQBASE+7, STD_COM_FLAGS }, /* ttyS0 */ \ | 15 | { 0, BASE_BAUD, 0x11C00, EC3104_IRQBASE+7, STD_COM_FLAGS }, /* ttyS0 */ \ |
16 | { 0, BASE_BAUD, 0x12000, EC3104_IRQBASE+8, STD_COM_FLAGS }, /* ttyS1 */ \ | 16 | { 0, BASE_BAUD, 0x12000, EC3104_IRQBASE+8, STD_COM_FLAGS }, /* ttyS1 */ \ |
17 | { 0, BASE_BAUD, 0x12400, EC3104_IRQBASE+9, STD_COM_FLAGS }, /* ttyS2 */ | 17 | { 0, BASE_BAUD, 0x12400, EC3104_IRQBASE+9, STD_COM_FLAGS }, /* ttyS2 */ |
18 | 18 | ||
19 | #define SERIAL_PORT_DFNS STD_SERIAL_PORT_DEFNS | ||
20 | |||
21 | /* XXX: This should be moved ino irq.h */ | 19 | /* XXX: This should be moved ino irq.h */ |
22 | #define irq_cannonicalize(x) (x) | 20 | #define irq_cannonicalize(x) (x) |
diff --git a/include/asm-sh/serial.h b/include/asm-sh/serial.h index 5474dbdbaa86..f51e232d5cd9 100644 --- a/include/asm-sh/serial.h +++ b/include/asm-sh/serial.h | |||
@@ -29,20 +29,18 @@ | |||
29 | #ifdef CONFIG_HD64465 | 29 | #ifdef CONFIG_HD64465 |
30 | #include <asm/hd64465.h> | 30 | #include <asm/hd64465.h> |
31 | 31 | ||
32 | #define STD_SERIAL_PORT_DEFNS \ | 32 | #define SERIAL_PORT_DFNS \ |
33 | /* UART CLK PORT IRQ FLAGS */ \ | 33 | /* UART CLK PORT IRQ FLAGS */ \ |
34 | { 0, BASE_BAUD, 0x3F8, HD64465_IRQ_UART, STD_COM_FLAGS } /* ttyS0 */ | 34 | { 0, BASE_BAUD, 0x3F8, HD64465_IRQ_UART, STD_COM_FLAGS } /* ttyS0 */ |
35 | 35 | ||
36 | #else | 36 | #else |
37 | 37 | ||
38 | #define STD_SERIAL_PORT_DEFNS \ | 38 | #define SERIAL_PORT_DFNS \ |
39 | /* UART CLK PORT IRQ FLAGS */ \ | 39 | /* UART CLK PORT IRQ FLAGS */ \ |
40 | { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \ | 40 | { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \ |
41 | { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS } /* ttyS1 */ | 41 | { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS } /* ttyS1 */ |
42 | 42 | ||
43 | #endif | 43 | #endif |
44 | 44 | ||
45 | #define SERIAL_PORT_DFNS STD_SERIAL_PORT_DEFNS | ||
46 | |||
47 | #endif | 45 | #endif |
48 | #endif /* _ASM_SERIAL_H */ | 46 | #endif /* _ASM_SERIAL_H */ |
diff --git a/include/asm-sh64/serial.h b/include/asm-sh64/serial.h index 8e39b4e90c76..29c9be15112b 100644 --- a/include/asm-sh64/serial.h +++ b/include/asm-sh64/serial.h | |||
@@ -20,13 +20,11 @@ | |||
20 | 20 | ||
21 | #define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST) | 21 | #define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST) |
22 | 22 | ||
23 | #define STD_SERIAL_PORT_DEFNS \ | 23 | #define SERIAL_PORT_DFNS \ |
24 | /* UART CLK PORT IRQ FLAGS */ \ | 24 | /* UART CLK PORT IRQ FLAGS */ \ |
25 | { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \ | 25 | { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \ |
26 | { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS } /* ttyS1 */ | 26 | { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS } /* ttyS1 */ |
27 | 27 | ||
28 | #define SERIAL_PORT_DFNS STD_SERIAL_PORT_DEFNS | ||
29 | |||
30 | /* XXX: This should be moved ino irq.h */ | 28 | /* XXX: This should be moved ino irq.h */ |
31 | #define irq_cannonicalize(x) (x) | 29 | #define irq_cannonicalize(x) (x) |
32 | 30 | ||
diff --git a/include/asm-x86_64/serial.h b/include/asm-x86_64/serial.h index dbab232044cd..dc752eafa681 100644 --- a/include/asm-x86_64/serial.h +++ b/include/asm-x86_64/serial.h | |||
@@ -22,109 +22,9 @@ | |||
22 | #define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF | 22 | #define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF |
23 | #endif | 23 | #endif |
24 | 24 | ||
25 | #ifdef CONFIG_SERIAL_MANY_PORTS | 25 | #define SERIAL_PORT_DFNS \ |
26 | #define FOURPORT_FLAGS ASYNC_FOURPORT | ||
27 | #define ACCENT_FLAGS 0 | ||
28 | #define BOCA_FLAGS 0 | ||
29 | #define HUB6_FLAGS 0 | ||
30 | #endif | ||
31 | |||
32 | #define MCA_COM_FLAGS (STD_COM_FLAGS|ASYNC_BOOT_ONLYMCA) | ||
33 | |||
34 | /* | ||
35 | * The following define the access methods for the HUB6 card. All | ||
36 | * access is through two ports for all 24 possible chips. The card is | ||
37 | * selected through the high 2 bits, the port on that card with the | ||
38 | * "middle" 3 bits, and the register on that port with the bottom | ||
39 | * 3 bits. | ||
40 | * | ||
41 | * While the access port and interrupt is configurable, the default | ||
42 | * port locations are 0x302 for the port control register, and 0x303 | ||
43 | * for the data read/write register. Normally, the interrupt is at irq3 | ||
44 | * but can be anything from 3 to 7 inclusive. Note that using 3 will | ||
45 | * require disabling com2. | ||
46 | */ | ||
47 | |||
48 | #define C_P(card,port) (((card)<<6|(port)<<3) + 1) | ||
49 | |||
50 | #define STD_SERIAL_PORT_DEFNS \ | ||
51 | /* UART CLK PORT IRQ FLAGS */ \ | 26 | /* UART CLK PORT IRQ FLAGS */ \ |
52 | { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \ | 27 | { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \ |
53 | { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS }, /* ttyS1 */ \ | 28 | { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS }, /* ttyS1 */ \ |
54 | { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \ | 29 | { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \ |
55 | { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */ | 30 | { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */ |
56 | |||
57 | |||
58 | #ifdef CONFIG_SERIAL_MANY_PORTS | ||
59 | #define EXTRA_SERIAL_PORT_DEFNS \ | ||
60 | { 0, BASE_BAUD, 0x1A0, 9, FOURPORT_FLAGS }, /* ttyS4 */ \ | ||
61 | { 0, BASE_BAUD, 0x1A8, 9, FOURPORT_FLAGS }, /* ttyS5 */ \ | ||
62 | { 0, BASE_BAUD, 0x1B0, 9, FOURPORT_FLAGS }, /* ttyS6 */ \ | ||
63 | { 0, BASE_BAUD, 0x1B8, 9, FOURPORT_FLAGS }, /* ttyS7 */ \ | ||
64 | { 0, BASE_BAUD, 0x2A0, 5, FOURPORT_FLAGS }, /* ttyS8 */ \ | ||
65 | { 0, BASE_BAUD, 0x2A8, 5, FOURPORT_FLAGS }, /* ttyS9 */ \ | ||
66 | { 0, BASE_BAUD, 0x2B0, 5, FOURPORT_FLAGS }, /* ttyS10 */ \ | ||
67 | { 0, BASE_BAUD, 0x2B8, 5, FOURPORT_FLAGS }, /* ttyS11 */ \ | ||
68 | { 0, BASE_BAUD, 0x330, 4, ACCENT_FLAGS }, /* ttyS12 */ \ | ||
69 | { 0, BASE_BAUD, 0x338, 4, ACCENT_FLAGS }, /* ttyS13 */ \ | ||
70 | { 0, BASE_BAUD, 0x000, 0, 0 }, /* ttyS14 (spare) */ \ | ||
71 | { 0, BASE_BAUD, 0x000, 0, 0 }, /* ttyS15 (spare) */ \ | ||
72 | { 0, BASE_BAUD, 0x100, 12, BOCA_FLAGS }, /* ttyS16 */ \ | ||
73 | { 0, BASE_BAUD, 0x108, 12, BOCA_FLAGS }, /* ttyS17 */ \ | ||
74 | { 0, BASE_BAUD, 0x110, 12, BOCA_FLAGS }, /* ttyS18 */ \ | ||
75 | { 0, BASE_BAUD, 0x118, 12, BOCA_FLAGS }, /* ttyS19 */ \ | ||
76 | { 0, BASE_BAUD, 0x120, 12, BOCA_FLAGS }, /* ttyS20 */ \ | ||
77 | { 0, BASE_BAUD, 0x128, 12, BOCA_FLAGS }, /* ttyS21 */ \ | ||
78 | { 0, BASE_BAUD, 0x130, 12, BOCA_FLAGS }, /* ttyS22 */ \ | ||
79 | { 0, BASE_BAUD, 0x138, 12, BOCA_FLAGS }, /* ttyS23 */ \ | ||
80 | { 0, BASE_BAUD, 0x140, 12, BOCA_FLAGS }, /* ttyS24 */ \ | ||
81 | { 0, BASE_BAUD, 0x148, 12, BOCA_FLAGS }, /* ttyS25 */ \ | ||
82 | { 0, BASE_BAUD, 0x150, 12, BOCA_FLAGS }, /* ttyS26 */ \ | ||
83 | { 0, BASE_BAUD, 0x158, 12, BOCA_FLAGS }, /* ttyS27 */ \ | ||
84 | { 0, BASE_BAUD, 0x160, 12, BOCA_FLAGS }, /* ttyS28 */ \ | ||
85 | { 0, BASE_BAUD, 0x168, 12, BOCA_FLAGS }, /* ttyS29 */ \ | ||
86 | { 0, BASE_BAUD, 0x170, 12, BOCA_FLAGS }, /* ttyS30 */ \ | ||
87 | { 0, BASE_BAUD, 0x178, 12, BOCA_FLAGS }, /* ttyS31 */ | ||
88 | #else | ||
89 | #define EXTRA_SERIAL_PORT_DEFNS | ||
90 | #endif | ||
91 | |||
92 | /* You can have up to four HUB6's in the system, but I've only | ||
93 | * included two cards here for a total of twelve ports. | ||
94 | */ | ||
95 | #if (defined(CONFIG_HUB6) && defined(CONFIG_SERIAL_MANY_PORTS)) | ||
96 | #define HUB6_SERIAL_PORT_DFNS \ | ||
97 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,0) }, /* ttyS32 */ \ | ||
98 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,1) }, /* ttyS33 */ \ | ||
99 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,2) }, /* ttyS34 */ \ | ||
100 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,3) }, /* ttyS35 */ \ | ||
101 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,4) }, /* ttyS36 */ \ | ||
102 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,5) }, /* ttyS37 */ \ | ||
103 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,0) }, /* ttyS38 */ \ | ||
104 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,1) }, /* ttyS39 */ \ | ||
105 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,2) }, /* ttyS40 */ \ | ||
106 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,3) }, /* ttyS41 */ \ | ||
107 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,4) }, /* ttyS42 */ \ | ||
108 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,5) }, /* ttyS43 */ | ||
109 | #else | ||
110 | #define HUB6_SERIAL_PORT_DFNS | ||
111 | #endif | ||
112 | |||
113 | #ifdef CONFIG_MCA | ||
114 | #define MCA_SERIAL_PORT_DFNS \ | ||
115 | { 0, BASE_BAUD, 0x3220, 3, MCA_COM_FLAGS }, \ | ||
116 | { 0, BASE_BAUD, 0x3228, 3, MCA_COM_FLAGS }, \ | ||
117 | { 0, BASE_BAUD, 0x4220, 3, MCA_COM_FLAGS }, \ | ||
118 | { 0, BASE_BAUD, 0x4228, 3, MCA_COM_FLAGS }, \ | ||
119 | { 0, BASE_BAUD, 0x5220, 3, MCA_COM_FLAGS }, \ | ||
120 | { 0, BASE_BAUD, 0x5228, 3, MCA_COM_FLAGS }, | ||
121 | #else | ||
122 | #define MCA_SERIAL_PORT_DFNS | ||
123 | #endif | ||
124 | |||
125 | #define SERIAL_PORT_DFNS \ | ||
126 | STD_SERIAL_PORT_DEFNS \ | ||
127 | EXTRA_SERIAL_PORT_DEFNS \ | ||
128 | HUB6_SERIAL_PORT_DFNS \ | ||
129 | MCA_SERIAL_PORT_DFNS | ||
130 | |||