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) 2012 MIPS Technologies, Inc. All rights reserved.
8 #include <linux/init.h>
9 #include <linux/irqchip/mips-gic.h>
10 #include <linux/serial_8250.h>
12 #include <asm/mips-boards/sead3int.h>
18 .uartclk = 14745600, \
19 .iotype = UPIO_MEM32, \
20 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, \
24 static struct plat_serial8250_port uart8250_data[] = {
25 UART(0x1f000900), /* ttyS0 = USB */
26 UART(0x1f000800), /* ttyS1 = RS232 */
30 static struct platform_device uart8250_device = {
32 .id = PLAT8250_DEV_PLATFORM2,
34 .platform_data = uart8250_data,
38 static int __init uart8250_init(void)
41 uart8250_data[0].irq = MIPS_GIC_IRQ_BASE + GIC_INT_UART0;
42 uart8250_data[1].irq = MIPS_GIC_IRQ_BASE + GIC_INT_UART1;
44 uart8250_data[0].irq = MIPS_CPU_IRQ_BASE + CPU_INT_UART0;
45 uart8250_data[1].irq = MIPS_CPU_IRQ_BASE + CPU_INT_UART1;
47 return platform_device_register(&uart8250_device);
50 device_initcall(uart8250_init);