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/memory.h>
26 #include <mach/hardware.h>
27 #include <asm/hardware/iop3xx.h>
28 #include <asm/mach/arch.h>
30 #define IOP33X_UART_XTAL 33334000
32 static struct plat_serial8250_port iop33x_uart0_data
[] = {
34 .membase
= (char *)IOP33X_UART0_VIRT
,
35 .mapbase
= IOP33X_UART0_PHYS
,
36 .irq
= IRQ_IOP33X_UART0
,
37 .uartclk
= IOP33X_UART_XTAL
,
40 .flags
= UPF_SKIP_TEST
,
45 static struct resource iop33x_uart0_resources
[] = {
47 .start
= IOP33X_UART0_PHYS
,
48 .end
= IOP33X_UART0_PHYS
+ 0x3f,
49 .flags
= IORESOURCE_MEM
,
52 .start
= IRQ_IOP33X_UART0
,
53 .end
= IRQ_IOP33X_UART0
,
54 .flags
= IORESOURCE_IRQ
,
58 struct platform_device iop33x_uart0_device
= {
60 .id
= PLAT8250_DEV_PLATFORM
,
62 .platform_data
= iop33x_uart0_data
,
65 .resource
= iop33x_uart0_resources
,
69 static struct resource iop33x_uart1_resources
[] = {
71 .start
= IOP33X_UART1_PHYS
,
72 .end
= IOP33X_UART1_PHYS
+ 0x3f,
73 .flags
= IORESOURCE_MEM
,
76 .start
= IRQ_IOP33X_UART1
,
77 .end
= IRQ_IOP33X_UART1
,
78 .flags
= IORESOURCE_IRQ
,
82 static struct plat_serial8250_port iop33x_uart1_data
[] = {
84 .membase
= (char *)IOP33X_UART1_VIRT
,
85 .mapbase
= IOP33X_UART1_PHYS
,
86 .irq
= IRQ_IOP33X_UART1
,
87 .uartclk
= IOP33X_UART_XTAL
,
90 .flags
= UPF_SKIP_TEST
,
95 struct platform_device iop33x_uart1_device
= {
97 .id
= PLAT8250_DEV_PLATFORM1
,
99 .platform_data
= iop33x_uart1_data
,
102 .resource
= iop33x_uart1_resources
,