Merge branch 'sh-latest' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal...
[pandora-kernel.git] / drivers / tty / serial / 8250_fourport.c
1 /*
2  *  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 PORT(_base,_irq)                                                \
14         {                                                               \
15                 .iobase         = _base,                                \
16                 .irq            = _irq,                                 \
17                 .uartclk        = 1843200,                              \
18                 .iotype         = UPIO_PORT,                            \
19                 .flags          = UPF_BOOT_AUTOCONF | UPF_FOURPORT,     \
20         }
21
22 static struct plat_serial8250_port fourport_data[] = {
23         PORT(0x1a0, 9),
24         PORT(0x1a8, 9),
25         PORT(0x1b0, 9),
26         PORT(0x1b8, 9),
27         PORT(0x2a0, 5),
28         PORT(0x2a8, 5),
29         PORT(0x2b0, 5),
30         PORT(0x2b8, 5),
31         { },
32 };
33
34 static struct platform_device fourport_device = {
35         .name                   = "serial8250",
36         .id                     = PLAT8250_DEV_FOURPORT,
37         .dev                    = {
38                 .platform_data  = fourport_data,
39         },
40 };
41
42 static int __init fourport_init(void)
43 {
44         return platform_device_register(&fourport_device);
45 }
46
47 module_init(fourport_init);
48
49 MODULE_AUTHOR("Russell King");
50 MODULE_DESCRIPTION("8250 serial probe module for AST Fourport cards");
51 MODULE_LICENSE("GPL");