xref: /linux/drivers/tty/serial/8250/8250_fourport.c (revision e3b3d0f549c1d19b94e6ac55c66643166ea649ef)
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3  *  Copyright (C) 2005 Russell King.
4  *  Data taken from include/asm-i386/serial.h
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  */
10 #include <linux/module.h>
11 #include <linux/init.h>
12 #include <linux/serial_8250.h>
13 
14 #include "8250.h"
15 
16 #define SERIAL8250_FOURPORT(_base, _irq) \
17 	SERIAL8250_PORT_FLAGS(_base, _irq, UPF_FOURPORT)
18 
19 static struct plat_serial8250_port fourport_data[] = {
20 	SERIAL8250_FOURPORT(0x1a0, 9),
21 	SERIAL8250_FOURPORT(0x1a8, 9),
22 	SERIAL8250_FOURPORT(0x1b0, 9),
23 	SERIAL8250_FOURPORT(0x1b8, 9),
24 	SERIAL8250_FOURPORT(0x2a0, 5),
25 	SERIAL8250_FOURPORT(0x2a8, 5),
26 	SERIAL8250_FOURPORT(0x2b0, 5),
27 	SERIAL8250_FOURPORT(0x2b8, 5),
28 	{ },
29 };
30 
31 static struct platform_device fourport_device = {
32 	.name			= "serial8250",
33 	.id			= PLAT8250_DEV_FOURPORT,
34 	.dev			= {
35 		.platform_data	= fourport_data,
36 	},
37 };
38 
39 static int __init fourport_init(void)
40 {
41 	return platform_device_register(&fourport_device);
42 }
43 
44 module_init(fourport_init);
45 
46 MODULE_AUTHOR("Russell King");
47 MODULE_DESCRIPTION("8250 serial probe module for AST Fourport cards");
48 MODULE_LICENSE("GPL");
49