2 * arch/arm/mach-iop33x/uart.c
4 * Author: Dave Jiang (dave.jiang@intel.com)
5 * Copyright (C) 2004 Intel Corporation.
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
13 #include <linux/init.h>
14 #include <linux/major.h>
16 #include <linux/platform_device.h>
17 #include <linux/serial.h>
18 #include <linux/tty.h>
19 #include <linux/serial_8250.h>
21 #include <asm/pgtable.h>
23 #include <asm/mach/map.h>
24 #include <asm/setup.h>
25 #include <asm/system.h>
26 #include <asm/memory.h>
27 #include <asm/hardware.h>
28 #include <asm/hardware/iop3xx.h>
29 #include <asm/mach-types.h>
30 #include <asm/mach/arch.h>
32 #define IOP33X_UART_XTAL 33334000
34 static struct plat_serial8250_port iop33x_uart0_data[] = {
36 .membase = (char *)IOP33X_UART0_VIRT,
37 .mapbase = IOP33X_UART0_PHYS,
38 .irq = IRQ_IOP33X_UART0,
39 .uartclk = IOP33X_UART_XTAL,
42 .flags = UPF_SKIP_TEST,
47 static struct resource iop33x_uart0_resources[] = {
49 .start = IOP33X_UART0_PHYS,
50 .end = IOP33X_UART0_PHYS + 0x3f,
51 .flags = IORESOURCE_MEM,
54 .start = IRQ_IOP33X_UART0,
55 .end = IRQ_IOP33X_UART0,
56 .flags = IORESOURCE_IRQ,
60 struct platform_device iop33x_uart0_device = {
62 .id = PLAT8250_DEV_PLATFORM,
64 .platform_data = iop33x_uart0_data,
67 .resource = iop33x_uart0_resources,
71 static struct resource iop33x_uart1_resources[] = {
73 .start = IOP33X_UART1_PHYS,
74 .end = IOP33X_UART1_PHYS + 0x3f,
75 .flags = IORESOURCE_MEM,
78 .start = IRQ_IOP33X_UART1,
79 .end = IRQ_IOP33X_UART1,
80 .flags = IORESOURCE_IRQ,
84 static struct plat_serial8250_port iop33x_uart1_data[] = {
86 .membase = (char *)IOP33X_UART1_VIRT,
87 .mapbase = IOP33X_UART1_PHYS,
88 .irq = IRQ_IOP33X_UART1,
89 .uartclk = IOP33X_UART_XTAL,
92 .flags = UPF_SKIP_TEST,
97 struct platform_device iop33x_uart1_device = {
99 .id = PLAT8250_DEV_PLATFORM1,
101 .platform_data = iop33x_uart1_data,
104 .resource = iop33x_uart1_resources,