1 /* linux/arch/arm/plat-s3c64xx/dev-uart.c
3 * Copyright 2008 Openmoko, Inc.
4 * Copyright 2008 Simtec Electronics
5 * Ben Dooks <ben@simtec.co.uk>
6 * http://armlinux.simtec.co.uk/
8 * Base S3C64XX UART resource and device definitions
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
16 #include <linux/kernel.h>
17 #include <linux/types.h>
18 #include <linux/interrupt.h>
19 #include <linux/list.h>
20 #include <linux/platform_device.h>
22 #include <asm/mach/arch.h>
23 #include <asm/mach/irq.h>
24 #include <mach/hardware.h>
27 #include <plat/devs.h>
29 /* Serial port registrations */
31 /* 64xx uarts are closer together */
33 static struct resource s3c64xx_uart0_resource
[] = {
35 .start
= S3C_PA_UART0
,
36 .end
= S3C_PA_UART0
+ 0x100,
37 .flags
= IORESOURCE_MEM
,
40 .start
= IRQ_S3CUART_RX0
,
41 .end
= IRQ_S3CUART_RX0
,
42 .flags
= IORESOURCE_IRQ
,
45 .start
= IRQ_S3CUART_TX0
,
46 .end
= IRQ_S3CUART_TX0
,
47 .flags
= IORESOURCE_IRQ
,
51 .start
= IRQ_S3CUART_ERR0
,
52 .end
= IRQ_S3CUART_ERR0
,
53 .flags
= IORESOURCE_IRQ
,
57 static struct resource s3c64xx_uart1_resource
[] = {
59 .start
= S3C_PA_UART1
,
60 .end
= S3C_PA_UART1
+ 0x100,
61 .flags
= IORESOURCE_MEM
,
64 .start
= IRQ_S3CUART_RX1
,
65 .end
= IRQ_S3CUART_RX1
,
66 .flags
= IORESOURCE_IRQ
,
69 .start
= IRQ_S3CUART_TX1
,
70 .end
= IRQ_S3CUART_TX1
,
71 .flags
= IORESOURCE_IRQ
,
75 .start
= IRQ_S3CUART_ERR1
,
76 .end
= IRQ_S3CUART_ERR1
,
77 .flags
= IORESOURCE_IRQ
,
81 static struct resource s3c6xx_uart2_resource
[] = {
83 .start
= S3C_PA_UART2
,
84 .end
= S3C_PA_UART2
+ 0x100,
85 .flags
= IORESOURCE_MEM
,
88 .start
= IRQ_S3CUART_RX2
,
89 .end
= IRQ_S3CUART_RX2
,
90 .flags
= IORESOURCE_IRQ
,
93 .start
= IRQ_S3CUART_TX2
,
94 .end
= IRQ_S3CUART_TX2
,
95 .flags
= IORESOURCE_IRQ
,
99 .start
= IRQ_S3CUART_ERR2
,
100 .end
= IRQ_S3CUART_ERR2
,
101 .flags
= IORESOURCE_IRQ
,
105 static struct resource s3c64xx_uart3_resource
[] = {
107 .start
= S3C_PA_UART3
,
108 .end
= S3C_PA_UART3
+ 0x100,
109 .flags
= IORESOURCE_MEM
,
112 .start
= IRQ_S3CUART_RX3
,
113 .end
= IRQ_S3CUART_RX3
,
114 .flags
= IORESOURCE_IRQ
,
117 .start
= IRQ_S3CUART_TX3
,
118 .end
= IRQ_S3CUART_TX3
,
119 .flags
= IORESOURCE_IRQ
,
123 .start
= IRQ_S3CUART_ERR3
,
124 .end
= IRQ_S3CUART_ERR3
,
125 .flags
= IORESOURCE_IRQ
,
130 struct s3c24xx_uart_resources s3c64xx_uart_resources
[] __initdata
= {
132 .resources
= s3c64xx_uart0_resource
,
133 .nr_resources
= ARRAY_SIZE(s3c64xx_uart0_resource
),
136 .resources
= s3c64xx_uart1_resource
,
137 .nr_resources
= ARRAY_SIZE(s3c64xx_uart1_resource
),
140 .resources
= s3c6xx_uart2_resource
,
141 .nr_resources
= ARRAY_SIZE(s3c6xx_uart2_resource
),
144 .resources
= s3c64xx_uart3_resource
,
145 .nr_resources
= ARRAY_SIZE(s3c64xx_uart3_resource
),