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
22static 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
34static struct platform_device fourport_device = {
35	.name			= "serial8250",
36	.id			= PLAT8250_DEV_FOURPORT,
37	.dev			= {
38		.platform_data	= fourport_data,
39	},
40};
41
42static int __init fourport_init(void)
43{
44	return platform_device_register(&fourport_device);
45}
46
47module_init(fourport_init);
48
49MODULE_AUTHOR("Russell King");
50MODULE_DESCRIPTION("8250 serial probe module for AST Fourport cards");
51MODULE_LICENSE("GPL");
52