aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/8250_hub6.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_hub6.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_hub6.c')
-rw-r--r--drivers/serial/8250_hub6.c58
1 files changed, 58 insertions, 0 deletions
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");