aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/8250.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2005-06-27 06:12:54 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2005-06-27 06:12:54 -0400
commitec9f47cd6a14ca069bb7552a984c0a338fc7262b (patch)
tree61f26f0bd348c6ddac8b3b1105e00fa790ea3ea6 /drivers/serial/8250.c
parentaddcc4a10f10ffde88b2ee6dc3af46fab6dff1e2 (diff)
[PATCH] Serial: Split 8250 port table
Add separate files for the different 8250 ISA-based serial boards. Looking across all the various architectures, it seems reasonable that we can key the availability of the configuration options for these beasts to the bus-related symbols (iow, CONFIG_ISA). We also standardise the base baud/uart clock rate for these boards - I'm sure that isn't architecture specific, but is solely dependent on the crystal fitted on the board (which should be the same no matter what type of machine its fitted into.) Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/serial/8250.c')
-rw-r--r--drivers/serial/8250.c25
1 files changed, 9 insertions, 16 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}