xref: /linux/drivers/tty/serial/8250/8250_fourport.c (revision fbc872c38c8fed31948c85683b5326ee5ab9fccc)
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 #include "8250.h"
14 
15 #define SERIAL8250_FOURPORT(_base, _irq) \
16 	SERIAL8250_PORT_FLAGS(_base, _irq, UPF_FOURPORT)
17 
18 static struct plat_serial8250_port fourport_data[] = {
19 	SERIAL8250_FOURPORT(0x1a0, 9),
20 	SERIAL8250_FOURPORT(0x1a8, 9),
21 	SERIAL8250_FOURPORT(0x1b0, 9),
22 	SERIAL8250_FOURPORT(0x1b8, 9),
23 	SERIAL8250_FOURPORT(0x2a0, 5),
24 	SERIAL8250_FOURPORT(0x2a8, 5),
25 	SERIAL8250_FOURPORT(0x2b0, 5),
26 	SERIAL8250_FOURPORT(0x2b8, 5),
27 	{ },
28 };
29 
30 static struct platform_device fourport_device = {
31 	.name			= "serial8250",
32 	.id			= PLAT8250_DEV_FOURPORT,
33 	.dev			= {
34 		.platform_data	= fourport_data,
35 	},
36 };
37 
38 static int __init fourport_init(void)
39 {
40 	return platform_device_register(&fourport_device);
41 }
42 
43 module_init(fourport_init);
44 
45 MODULE_AUTHOR("Russell King");
46 MODULE_DESCRIPTION("8250 serial probe module for AST Fourport cards");
47 MODULE_LICENSE("GPL");
48