1 // SPDX-License-Identifier: GPL-2.0-only
3 * arch/arm/mach-iop33x/uart.c
5 * Author: Dave Jiang (dave.jiang@intel.com)
6 * Copyright (C) 2004 Intel Corporation.
10 #include <linux/init.h>
11 #include <linux/major.h>
13 #include <linux/platform_device.h>
14 #include <linux/serial.h>
15 #include <linux/tty.h>
16 #include <linux/serial_8250.h>
18 #include <asm/pgtable.h>
20 #include <asm/mach/map.h>
21 #include <asm/setup.h>
22 #include <asm/memory.h>
23 #include <mach/hardware.h>
24 #include <asm/hardware/iop3xx.h>
25 #include <asm/mach/arch.h>
27 #define IOP33X_UART_XTAL 33334000
29 static struct plat_serial8250_port iop33x_uart0_data[] = {
31 .membase = (char *)IOP33X_UART0_VIRT,
32 .mapbase = IOP33X_UART0_PHYS,
33 .irq = IRQ_IOP33X_UART0,
34 .uartclk = IOP33X_UART_XTAL,
37 .flags = UPF_SKIP_TEST,
42 static struct resource iop33x_uart0_resources[] = {
44 .start = IOP33X_UART0_PHYS,
45 .end = IOP33X_UART0_PHYS + 0x3f,
46 .flags = IORESOURCE_MEM,
49 .start = IRQ_IOP33X_UART0,
50 .end = IRQ_IOP33X_UART0,
51 .flags = IORESOURCE_IRQ,
55 struct platform_device iop33x_uart0_device = {
57 .id = PLAT8250_DEV_PLATFORM,
59 .platform_data = iop33x_uart0_data,
62 .resource = iop33x_uart0_resources,
66 static struct resource iop33x_uart1_resources[] = {
68 .start = IOP33X_UART1_PHYS,
69 .end = IOP33X_UART1_PHYS + 0x3f,
70 .flags = IORESOURCE_MEM,
73 .start = IRQ_IOP33X_UART1,
74 .end = IRQ_IOP33X_UART1,
75 .flags = IORESOURCE_IRQ,
79 static struct plat_serial8250_port iop33x_uart1_data[] = {
81 .membase = (char *)IOP33X_UART1_VIRT,
82 .mapbase = IOP33X_UART1_PHYS,
83 .irq = IRQ_IOP33X_UART1,
84 .uartclk = IOP33X_UART_XTAL,
87 .flags = UPF_SKIP_TEST,
92 struct platform_device iop33x_uart1_device = {
94 .id = PLAT8250_DEV_PLATFORM1,
96 .platform_data = iop33x_uart1_data,
99 .resource = iop33x_uart1_resources,