aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-iop33x/uart.c
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@wantstofly.org>2006-09-18 18:24:52 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-09-25 05:25:50 -0400
commitc680b77efe4542830bb170e1cc40db1c47c569bc (patch)
treeed79bf5cb4bab39e694690747c34cee8798c6d02 /arch/arm/mach-iop33x/uart.c
parent7412b10f7967ef4210ed6f793004d23642dc5140 (diff)
[ARM] 3830/1: iop3xx: board support file cleanup
Revamp the iop3xx board support: move the support code for each iop board type into its own file, start using platform serial and platform physmap flash devices, switch to a per-board time tick rate, and get rid of the ARCH_EP80219 and STEPD config options by doing the relevant checks at run time. Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-iop33x/uart.c')
-rw-r--r--arch/arm/mach-iop33x/uart.c106
1 files changed, 106 insertions, 0 deletions
diff --git a/arch/arm/mach-iop33x/uart.c b/arch/arm/mach-iop33x/uart.c
new file mode 100644
index 000000000000..d221d4abaa87
--- /dev/null
+++ b/arch/arm/mach-iop33x/uart.c
@@ -0,0 +1,106 @@
1/*
2 * linux/arch/arm/mach-iop33x/uart.c
3 *
4 * Author: Dave Jiang (dave.jiang@intel.com)
5 * Copyright (C) 2004 Intel Corporation.
6 *
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.
10 */
11
12#include <linux/mm.h>
13#include <linux/init.h>
14#include <linux/major.h>
15#include <linux/fs.h>
16#include <linux/platform_device.h>
17#include <linux/serial.h>
18#include <linux/tty.h>
19#include <linux/serial_8250.h>
20
21#include <asm/io.h>
22#include <asm/pgtable.h>
23#include <asm/page.h>
24#include <asm/mach/map.h>
25#include <asm/setup.h>
26#include <asm/system.h>
27#include <asm/memory.h>
28#include <asm/hardware.h>
29#include <asm/hardware/iop3xx.h>
30#include <asm/mach-types.h>
31#include <asm/mach/arch.h>
32
33#define IOP331_UART_XTAL 33334000
34
35static struct plat_serial8250_port iop33x_uart0_data[] = {
36 {
37 .membase = (char *)IOP331_UART0_VIRT,
38 .mapbase = IOP331_UART0_PHYS,
39 .irq = IRQ_IOP331_UART0,
40 .uartclk = IOP331_UART_XTAL,
41 .regshift = 2,
42 .iotype = UPIO_MEM,
43 .flags = UPF_SKIP_TEST,
44 },
45 { },
46};
47
48static struct resource iop33x_uart0_resources[] = {
49 [0] = {
50 .start = IOP331_UART0_PHYS,
51 .end = IOP331_UART0_PHYS + 0x3f,
52 .flags = IORESOURCE_MEM,
53 },
54 [1] = {
55 .start = IRQ_IOP331_UART0,
56 .end = IRQ_IOP331_UART0,
57 .flags = IORESOURCE_IRQ,
58 },
59};
60
61struct platform_device iop33x_uart0_device = {
62 .name = "serial8250",
63 .id = PLAT8250_DEV_PLATFORM,
64 .dev = {
65 .platform_data = iop33x_uart0_data,
66 },
67 .num_resources = 2,
68 .resource = iop33x_uart0_resources,
69};
70
71
72static struct resource iop33x_uart1_resources[] = {
73 [0] = {
74 .start = IOP331_UART1_PHYS,
75 .end = IOP331_UART1_PHYS + 0x3f,
76 .flags = IORESOURCE_MEM,
77 },
78 [1] = {
79 .start = IRQ_IOP331_UART1,
80 .end = IRQ_IOP331_UART1,
81 .flags = IORESOURCE_IRQ,
82 },
83};
84
85static struct plat_serial8250_port iop33x_uart1_data[] = {
86 {
87 .membase = (char *)IOP331_UART1_VIRT,
88 .mapbase = IOP331_UART1_PHYS,
89 .irq = IRQ_IOP331_UART1,
90 .uartclk = IOP331_UART_XTAL,
91 .regshift = 2,
92 .iotype = UPIO_MEM,
93 .flags = UPF_SKIP_TEST,
94 },
95 { },
96};
97
98struct platform_device iop33x_uart1_device = {
99 .name = "serial8250",
100 .id = PLAT8250_DEV_PLATFORM1,
101 .dev = {
102 .platform_data = iop33x_uart1_data,
103 },
104 .num_resources = 2,
105 .resource = iop33x_uart1_resources,
106};