aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/8250.c25
-rw-r--r--drivers/serial/8250_accent.c47
-rw-r--r--drivers/serial/8250_boca.c61
-rw-r--r--drivers/serial/8250_fourport.c53
-rw-r--r--drivers/serial/8250_hub6.c58
-rw-r--r--drivers/serial/8250_mca.c64
-rw-r--r--drivers/serial/Kconfig75
-rw-r--r--drivers/serial/Makefile5
8 files changed, 356 insertions, 32 deletions
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index d8b9d2b8c200..34e75bc8f4cc 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -77,23 +77,9 @@ static unsigned int share_irqs = SERIAL8250_SHARE_IRQS;
77 */ 77 */
78#define is_real_interrupt(irq) ((irq) != 0) 78#define is_real_interrupt(irq) ((irq) != 0)
79 79
80/*
81 * This converts from our new CONFIG_ symbols to the symbols
82 * that asm/serial.h expects. You _NEED_ to comment out the
83 * linux/config.h include contained inside asm/serial.h for
84 * this to work.
85 */
86#undef CONFIG_SERIAL_MANY_PORTS
87#undef CONFIG_SERIAL_DETECT_IRQ
88#undef CONFIG_SERIAL_MULTIPORT
89#undef CONFIG_HUB6
90
91#ifdef CONFIG_SERIAL_8250_DETECT_IRQ 80#ifdef CONFIG_SERIAL_8250_DETECT_IRQ
92#define CONFIG_SERIAL_DETECT_IRQ 1 81#define CONFIG_SERIAL_DETECT_IRQ 1
93#endif 82#endif
94#ifdef CONFIG_SERIAL_8250_MULTIPORT
95#define CONFIG_SERIAL_MULTIPORT 1
96#endif
97#ifdef CONFIG_SERIAL_8250_MANY_PORTS 83#ifdef CONFIG_SERIAL_8250_MANY_PORTS
98#define CONFIG_SERIAL_MANY_PORTS 1 84#define CONFIG_SERIAL_MANY_PORTS 1
99#endif 85#endif
@@ -2323,10 +2309,11 @@ static int __devinit serial8250_probe(struct device *dev)
2323{ 2309{
2324 struct plat_serial8250_port *p = dev->platform_data; 2310 struct plat_serial8250_port *p = dev->platform_data;
2325 struct uart_port port; 2311 struct uart_port port;
2312 int ret, i;
2326 2313
2327 memset(&port, 0, sizeof(struct uart_port)); 2314 memset(&port, 0, sizeof(struct uart_port));
2328 2315
2329 for (; p && p->flags != 0; p++) { 2316 for (i = 0; p && p->flags != 0; p++, i++) {
2330 port.iobase = p->iobase; 2317 port.iobase = p->iobase;
2331 port.membase = p->membase; 2318 port.membase = p->membase;
2332 port.irq = p->irq; 2319 port.irq = p->irq;
@@ -2335,10 +2322,16 @@ static int __devinit serial8250_probe(struct device *dev)
2335 port.iotype = p->iotype; 2322 port.iotype = p->iotype;
2336 port.flags = p->flags; 2323 port.flags = p->flags;
2337 port.mapbase = p->mapbase; 2324 port.mapbase = p->mapbase;
2325 port.hub6 = p->hub6;
2338 port.dev = dev; 2326 port.dev = dev;
2339 if (share_irqs) 2327 if (share_irqs)
2340 port.flags |= UPF_SHARE_IRQ; 2328 port.flags |= UPF_SHARE_IRQ;
2341 serial8250_register_port(&port); 2329 ret = serial8250_register_port(&port);
2330 if (ret < 0) {
2331 dev_err(dev, "unable to register port at index %d "
2332 "(IO%lx MEM%lx IRQ%d): %d\n", i,
2333 p->iobase, p->mapbase, p->irq, ret);
2334 }
2342 } 2335 }
2343 return 0; 2336 return 0;
2344} 2337}
diff --git a/drivers/serial/8250_accent.c b/drivers/serial/8250_accent.c
new file mode 100644
index 000000000000..1f2c276063ef
--- /dev/null
+++ b/drivers/serial/8250_accent.c
@@ -0,0 +1,47 @@
1/*
2 * linux/drivers/serial/8250_accent.c
3 *
4 * Copyright (C) 2005 Russell King.
5 * Data taken from include/asm-i386/serial.h
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11#include <linux/module.h>
12#include <linux/init.h>
13#include <linux/serial_8250.h>
14
15#define PORT(_base,_irq) \
16 { \
17 .iobase = _base, \
18 .irq = _irq, \
19 .uartclk = 1843200, \
20 .iotype = UPIO_PORT, \
21 .flags = UPF_BOOT_AUTOCONF, \
22 }
23
24static struct plat_serial8250_port accent_data[] = {
25 PORT(0x330, 4),
26 PORT(0x338, 4),
27 { },
28};
29
30static struct platform_device accent_device = {
31 .name = "serial8250",
32 .id = 2,
33 .dev = {
34 .platform_data = accent_data,
35 },
36};
37
38static int __init accent_init(void)
39{
40 return platform_device_register(&accent_device);
41}
42
43module_init(accent_init);
44
45MODULE_AUTHOR("Russell King");
46MODULE_DESCRIPTION("8250 serial probe module for Accent Async cards");
47MODULE_LICENSE("GPL");
diff --git a/drivers/serial/8250_boca.c b/drivers/serial/8250_boca.c
new file mode 100644
index 000000000000..465c9ea1e7a3
--- /dev/null
+++ b/drivers/serial/8250_boca.c
@@ -0,0 +1,61 @@
1/*
2 * linux/drivers/serial/8250_boca.c
3 *
4 * Copyright (C) 2005 Russell King.
5 * Data taken from include/asm-i386/serial.h
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11#include <linux/module.h>
12#include <linux/init.h>
13#include <linux/serial_8250.h>
14
15#define PORT(_base,_irq) \
16 { \
17 .iobase = _base, \
18 .irq = _irq, \
19 .uartclk = 1843200, \
20 .iotype = UPIO_PORT, \
21 .flags = UPF_BOOT_AUTOCONF, \
22 }
23
24static struct plat_serial8250_port boca_data[] = {
25 PORT(0x100, 12),
26 PORT(0x108, 12),
27 PORT(0x110, 12),
28 PORT(0x118, 12),
29 PORT(0x120, 12),
30 PORT(0x128, 12),
31 PORT(0x130, 12),
32 PORT(0x138, 12),
33 PORT(0x140, 12),
34 PORT(0x148, 12),
35 PORT(0x150, 12),
36 PORT(0x158, 12),
37 PORT(0x160, 12),
38 PORT(0x168, 12),
39 PORT(0x170, 12),
40 PORT(0x178, 12),
41 { },
42};
43
44static struct platform_device boca_device = {
45 .name = "serial8250",
46 .id = 3,
47 .dev = {
48 .platform_data = boca_data,
49 },
50};
51
52static int __init boca_init(void)
53{
54 return platform_device_register(&boca_device);
55}
56
57module_init(boca_init);
58
59MODULE_AUTHOR("Russell King");
60MODULE_DESCRIPTION("8250 serial probe module for Boca cards");
61MODULE_LICENSE("GPL");
diff --git a/drivers/serial/8250_fourport.c b/drivers/serial/8250_fourport.c
new file mode 100644
index 000000000000..e9b4d908ef42
--- /dev/null
+++ b/drivers/serial/8250_fourport.c
@@ -0,0 +1,53 @@
1/*
2 * linux/drivers/serial/8250_fourport.c
3 *
4 * Copyright (C) 2005 Russell King.
5 * Data taken from include/asm-i386/serial.h
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11#include <linux/module.h>
12#include <linux/init.h>
13#include <linux/serial_8250.h>
14
15#define PORT(_base,_irq) \
16 { \
17 .iobase = _base, \
18 .irq = _irq, \
19 .uartclk = 1843200, \
20 .iotype = UPIO_PORT, \
21 .flags = UPF_BOOT_AUTOCONF | UPF_FOURPORT, \
22 }
23
24static struct plat_serial8250_port fourport_data[] = {
25 PORT(0x1a0, 9),
26 PORT(0x1a8, 9),
27 PORT(0x1b0, 9),
28 PORT(0x1b8, 9),
29 PORT(0x2a0, 5),
30 PORT(0x2a8, 5),
31 PORT(0x2b0, 5),
32 PORT(0x2b8, 5),
33 { },
34};
35
36static struct platform_device fourport_device = {
37 .name = "serial8250",
38 .id = 1,
39 .dev = {
40 .platform_data = fourport_data,
41 },
42};
43
44static int __init fourport_init(void)
45{
46 return platform_device_register(&fourport_device);
47}
48
49module_init(fourport_init);
50
51MODULE_AUTHOR("Russell King");
52MODULE_DESCRIPTION("8250 serial probe module for AST Fourport cards");
53MODULE_LICENSE("GPL");
diff --git a/drivers/serial/8250_hub6.c b/drivers/serial/8250_hub6.c
new file mode 100644
index 000000000000..77f396f84b4c
--- /dev/null
+++ b/drivers/serial/8250_hub6.c
@@ -0,0 +1,58 @@
1/*
2 * linux/drivers/serial/8250_hub6.c
3 *
4 * Copyright (C) 2005 Russell King.
5 * Data taken from include/asm-i386/serial.h
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11#include <linux/module.h>
12#include <linux/init.h>
13#include <linux/serial_8250.h>
14
15#define HUB6(card,port) \
16 { \
17 .iobase = 0x302, \
18 .irq = 3, \
19 .uartclk = 1843200, \
20 .iotype = UPIO_HUB6, \
21 .flags = UPF_BOOT_AUTOCONF, \
22 .hub6 = (card) << 6 | (port) << 3 | 1, \
23 }
24
25static struct plat_serial8250_port hub6_data[] = {
26 HUB6(0,0),
27 HUB6(0,1),
28 HUB6(0,2),
29 HUB6(0,3),
30 HUB6(0,4),
31 HUB6(0,5),
32 HUB6(1,0),
33 HUB6(1,1),
34 HUB6(1,2),
35 HUB6(1,3),
36 HUB6(1,4),
37 HUB6(1,5),
38 { },
39};
40
41static struct platform_device hub6_device = {
42 .name = "serial8250",
43 .id = 4,
44 .dev = {
45 .platform_data = hub6_data,
46 },
47};
48
49static int __init hub6_init(void)
50{
51 return platform_device_register(&hub6_device);
52}
53
54module_init(hub6_init);
55
56MODULE_AUTHOR("Russell King");
57MODULE_DESCRIPTION("8250 serial probe module for Hub6 cards");
58MODULE_LICENSE("GPL");
diff --git a/drivers/serial/8250_mca.c b/drivers/serial/8250_mca.c
new file mode 100644
index 000000000000..f0c40d68b8c1
--- /dev/null
+++ b/drivers/serial/8250_mca.c
@@ -0,0 +1,64 @@
1/*
2 * linux/drivers/serial/8250_mca.c
3 *
4 * Copyright (C) 2005 Russell King.
5 * Data taken from include/asm-i386/serial.h
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11#include <linux/config.h>
12#include <linux/module.h>
13#include <linux/init.h>
14#include <linux/mca.h>
15#include <linux/serial_8250.h>
16
17/*
18 * FIXME: Should we be doing AUTO_IRQ here?
19 */
20#ifdef CONFIG_SERIAL_8250_DETECT_IRQ
21#define MCA_FLAGS UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_AUTO_IRQ
22#else
23#define MCA_FLAGS UPF_BOOT_AUTOCONF | UPF_SKIP_TEST
24#endif
25
26#define PORT(_base,_irq) \
27 { \
28 .iobase = _base, \
29 .irq = _irq, \
30 .uartclk = 1843200, \
31 .iotype = UPIO_PORT, \
32 .flags = MCA_FLAGS, \
33 }
34
35static struct plat_serial8250_port mca_data[] = {
36 PORT(0x3220, 3),
37 PORT(0x3228, 3),
38 PORT(0x4220, 3),
39 PORT(0x4228, 3),
40 PORT(0x5220, 3),
41 PORT(0x5228, 3),
42 { },
43};
44
45static struct platform_device mca_device = {
46 .name = "serial8250",
47 .id = 5,
48 .dev = {
49 .platform_data = mca_data,
50 },
51};
52
53static int __init mca_init(void)
54{
55 if (!MCA_bus)
56 return -ENODEV;
57 return platform_device_register(&mca_device);
58}
59
60module_init(mca_init);
61
62MODULE_AUTHOR("Russell King");
63MODULE_DESCRIPTION("8250 serial probe module for MCA ports");
64MODULE_LICENSE("GPL");
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index 25fcef2c42de..e879bce160df 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -89,11 +89,11 @@ config SERIAL_8250_NR_UARTS
89 int "Maximum number of non-legacy 8250/16550 serial ports" 89 int "Maximum number of non-legacy 8250/16550 serial ports"
90 depends on SERIAL_8250 90 depends on SERIAL_8250
91 default "4" 91 default "4"
92 ---help--- 92 help
93 Set this to the number of non-legacy serial ports you want 93 Set this to the number of serial ports you want the driver
94 the driver to support. This includes any ports discovered 94 to support. This includes any ports discovered via ACPI or
95 via ACPI or PCI enumeration and any ports that may be added 95 PCI enumeration and any ports that may be added at run-time
96 at run-time via hot-plug. 96 via hot-plug, or any ISA multi-port serial cards.
97 97
98config SERIAL_8250_EXTENDED 98config SERIAL_8250_EXTENDED
99 bool "Extended 8250/16550 serial driver options" 99 bool "Extended 8250/16550 serial driver options"
@@ -141,31 +141,74 @@ config SERIAL_8250_DETECT_IRQ
141 141
142 If unsure, say N. 142 If unsure, say N.
143 143
144config SERIAL_8250_MULTIPORT
145 bool "Support special multiport boards"
146 depends on SERIAL_8250_EXTENDED
147 help
148 Some multiport serial ports have special ports which are used to
149 signal when there are any serial ports on the board which need
150 servicing. Say Y here to enable the serial driver to take advantage
151 of those special I/O ports.
152
153config SERIAL_8250_RSA 144config SERIAL_8250_RSA
154 bool "Support RSA serial ports" 145 bool "Support RSA serial ports"
155 depends on SERIAL_8250_EXTENDED 146 depends on SERIAL_8250_EXTENDED
156 help 147 help
157 ::: To be written ::: 148 ::: To be written :::
158 149
159comment "Non-8250 serial port support" 150#
151# Multi-port serial cards
152#
153
154config SERIAL_8250_FOURPORT
155 tristate "Support Fourport cards"
156 depends on SERIAL_8250 != n && ISA && SERIAL_8250_MANY_PORTS
157 help
158 Say Y here if you have an AST FourPort serial board.
159
160 To compile this driver as a module, choose M here: the module
161 will be called 8250_fourport.
162
163config SERIAL_8250_ACCENT
164 tristate "Support Accent cards"
165 depends on SERIAL_8250 != n && ISA && SERIAL_8250_MANY_PORTS
166 help
167 Say Y here if you have an Accent Async serial board.
168
169 To compile this driver as a module, choose M here: the module
170 will be called 8250_accent.
171
172
173config SERIAL_8250_BOCA
174 tristate "Support Boca cards"
175 depends on SERIAL_8250 != n && ISA && SERIAL_8250_MANY_PORTS
176 help
177 Say Y here if you have a Boca serial board. Please read the Boca
178 mini-HOWTO, avaialble from <http://www.tldp.org/docs.html#howto>
179
180 To compile this driver as a module, choose M here: the module
181 will be called 8250_boca.
182
183
184config SERIAL_8250_HUB6
185 tristate "Support Hub6 cards"
186 depends on SERIAL_8250 != n && ISA && SERIAL_8250_MANY_PORTS
187 help
188 Say Y here if you have a HUB6 serial board.
189
190 To compile this driver as a module, choose M here: the module
191 will be called 8250_hub6.
192
193config SERIAL_8250_MCA
194 tristate "Support 8250-type ports on MCA buses"
195 depends on SERIAL_8250 != n && MCA
196 help
197 Say Y here if you have a MCA serial ports.
198
199 To compile this driver as a module, choose M here: the module
200 will be called 8250_mca.
160 201
161config SERIAL_8250_ACORN 202config SERIAL_8250_ACORN
162 tristate "Acorn expansion card serial port support" 203 tristate "Acorn expansion card serial port support"
163 depends on ARM && ARCH_ACORN && SERIAL_8250 204 depends on ARCH_ACORN && SERIAL_8250
164 help 205 help
165 If you have an Atomwide Serial card or Serial Port card for an Acorn 206 If you have an Atomwide Serial card or Serial Port card for an Acorn
166 system, say Y to this option. The driver can handle 1, 2, or 3 port 207 system, say Y to this option. The driver can handle 1, 2, or 3 port
167 cards. If unsure, say N. 208 cards. If unsure, say N.
168 209
210comment "Non-8250 serial port support"
211
169config SERIAL_AMBA_PL010 212config SERIAL_AMBA_PL010
170 tristate "ARM AMBA PL010 serial port support" 213 tristate "ARM AMBA PL010 serial port support"
171 depends on ARM_AMBA 214 depends on ARM_AMBA
diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile
index 8f1cdde7dbed..65bd4381685e 100644
--- a/drivers/serial/Makefile
+++ b/drivers/serial/Makefile
@@ -17,6 +17,11 @@ obj-$(CONFIG_SERIAL_8250) += 8250.o $(serial-8250-y)
17obj-$(CONFIG_SERIAL_8250_CS) += serial_cs.o 17obj-$(CONFIG_SERIAL_8250_CS) += serial_cs.o
18obj-$(CONFIG_SERIAL_8250_ACORN) += 8250_acorn.o 18obj-$(CONFIG_SERIAL_8250_ACORN) += 8250_acorn.o
19obj-$(CONFIG_SERIAL_8250_CONSOLE) += 8250_early.o 19obj-$(CONFIG_SERIAL_8250_CONSOLE) += 8250_early.o
20obj-$(CONFIG_SERIAL_8250_FOURPORT) += 8250_fourport.o
21obj-$(CONFIG_SERIAL_8250_ACCENT) += 8250_accent.o
22obj-$(CONFIG_SERIAL_8250_BOCA) += 8250_boca.o
23obj-$(CONFIG_SERIAL_8250_HUB6) += 8250_hub6.o
24obj-$(CONFIG_SERIAL_8250_MCA) += 8250_mca.o
20obj-$(CONFIG_SERIAL_AMBA_PL010) += amba-pl010.o 25obj-$(CONFIG_SERIAL_AMBA_PL010) += amba-pl010.o
21obj-$(CONFIG_SERIAL_AMBA_PL011) += amba-pl011.o 26obj-$(CONFIG_SERIAL_AMBA_PL011) += amba-pl011.o
22obj-$(CONFIG_SERIAL_CLPS711X) += clps711x.o 27obj-$(CONFIG_SERIAL_CLPS711X) += clps711x.o