blob: a5c778e83de054d7e35c57c65b0921319e905e75 [file] [log] [blame]
Russell Kingec9f47c2005-06-27 11:12:54 +01001/*
Russell Kingec9f47c2005-06-27 11:12:54 +01002 * Copyright (C) 2005 Russell King.
3 * Data taken from include/asm-i386/serial.h
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 */
9#include <linux/module.h>
10#include <linux/init.h>
11#include <linux/serial_8250.h>
12
13#define HUB6(card,port) \
14 { \
15 .iobase = 0x302, \
16 .irq = 3, \
17 .uartclk = 1843200, \
18 .iotype = UPIO_HUB6, \
19 .flags = UPF_BOOT_AUTOCONF, \
20 .hub6 = (card) << 6 | (port) << 3 | 1, \
21 }
22
23static struct plat_serial8250_port hub6_data[] = {
Alan Cox3b0fd362008-02-08 04:18:51 -080024 HUB6(0, 0),
25 HUB6(0, 1),
26 HUB6(0, 2),
27 HUB6(0, 3),
28 HUB6(0, 4),
29 HUB6(0, 5),
30 HUB6(1, 0),
31 HUB6(1, 1),
32 HUB6(1, 2),
33 HUB6(1, 3),
34 HUB6(1, 4),
35 HUB6(1, 5),
Russell Kingec9f47c2005-06-27 11:12:54 +010036 { },
37};
38
39static struct platform_device hub6_device = {
40 .name = "serial8250",
Russell King6df29de2005-09-08 16:04:41 +010041 .id = PLAT8250_DEV_HUB6,
Russell Kingec9f47c2005-06-27 11:12:54 +010042 .dev = {
43 .platform_data = hub6_data,
44 },
45};
46
47static int __init hub6_init(void)
48{
49 return platform_device_register(&hub6_device);
50}
51
52module_init(hub6_init);
53
54MODULE_AUTHOR("Russell King");
55MODULE_DESCRIPTION("8250 serial probe module for Hub6 cards");
56MODULE_LICENSE("GPL");