2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
6 * Copyright (C) 2007 MIPS Technologies, Inc.
7 * written by Ralf Baechle (ralf@linux-mips.org)
9 * Probe driver for the Malta's UART ports:
11 * o 2 ports in the SMC SuperIO
12 * o 1 port in the CBUS UART, a discrete 16550 which normally is only used
15 * We don't use 8250_platform.c on Malta as it would result in the CBUS
16 * UART becoming ttyS0.
18 #include <linux/module.h>
19 #include <linux/init.h>
20 #include <linux/serial_8250.h>
22 #define SMC_PORT(base, int) \
27 .iotype = UPIO_PORT, \
28 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, \
32 #define CBUS_UART_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP)
34 static struct plat_serial8250_port uart8250_data
[] = {
38 .mapbase
= 0x1f000900, /* The CBUS UART */
39 .irq
= MIPS_CPU_IRQ_BASE
+ 2,
40 .uartclk
= 3686400, /* Twice the usual clk! */
42 .flags
= CBUS_UART_FLAGS
,
48 static struct platform_device uart8250_device
= {
50 .id
= PLAT8250_DEV_PLATFORM2
,
52 .platform_data
= uart8250_data
,
56 static int __init
uart8250_init(void)
58 return platform_device_register(&uart8250_device
);
61 module_init(uart8250_init
);
63 MODULE_AUTHOR("Ralf Baechle <ralf@linux-mips.org>");
64 MODULE_LICENSE("GPL");
65 MODULE_DESCRIPTION("8250 UART probe driver for the Malta CBUS UART");