0001
0002
0003
0004
0005
0006 #include <linux/module.h>
0007 #include <linux/init.h>
0008 #include <linux/serial_8250.h>
0009
0010 #define HUB6(card, port) \
0011 { \
0012 .iobase = 0x302, \
0013 .irq = 3, \
0014 .uartclk = 1843200, \
0015 .iotype = UPIO_HUB6, \
0016 .flags = UPF_BOOT_AUTOCONF, \
0017 .hub6 = (card) << 6 | (port) << 3 | 1, \
0018 }
0019
0020 static struct plat_serial8250_port hub6_data[] = {
0021 HUB6(0, 0),
0022 HUB6(0, 1),
0023 HUB6(0, 2),
0024 HUB6(0, 3),
0025 HUB6(0, 4),
0026 HUB6(0, 5),
0027 HUB6(1, 0),
0028 HUB6(1, 1),
0029 HUB6(1, 2),
0030 HUB6(1, 3),
0031 HUB6(1, 4),
0032 HUB6(1, 5),
0033 { },
0034 };
0035
0036 static struct platform_device hub6_device = {
0037 .name = "serial8250",
0038 .id = PLAT8250_DEV_HUB6,
0039 .dev = {
0040 .platform_data = hub6_data,
0041 },
0042 };
0043
0044 static int __init hub6_init(void)
0045 {
0046 return platform_device_register(&hub6_device);
0047 }
0048
0049 module_init(hub6_init);
0050
0051 MODULE_AUTHOR("Russell King");
0052 MODULE_DESCRIPTION("8250 serial probe module for Hub6 cards");
0053 MODULE_LICENSE("GPL");