aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/plat-s3c/include/plat/devs.h1
-rw-r--r--arch/arm/plat-s5p/dev-uart.c165
-rw-r--r--drivers/serial/Kconfig8
3 files changed, 170 insertions, 4 deletions
diff --git a/arch/arm/plat-s3c/include/plat/devs.h b/arch/arm/plat-s3c/include/plat/devs.h
index c1c20b023917..8a4153b49f40 100644
--- a/arch/arm/plat-s3c/include/plat/devs.h
+++ b/arch/arm/plat-s3c/include/plat/devs.h
@@ -18,6 +18,7 @@ struct s3c24xx_uart_resources {
18 18
19extern struct s3c24xx_uart_resources s3c2410_uart_resources[]; 19extern struct s3c24xx_uart_resources s3c2410_uart_resources[];
20extern struct s3c24xx_uart_resources s3c64xx_uart_resources[]; 20extern struct s3c24xx_uart_resources s3c64xx_uart_resources[];
21extern struct s3c24xx_uart_resources s5p_uart_resources[];
21 22
22extern struct platform_device *s3c24xx_uart_devs[]; 23extern struct platform_device *s3c24xx_uart_devs[];
23extern struct platform_device *s3c24xx_uart_src[]; 24extern struct platform_device *s3c24xx_uart_src[];
diff --git a/arch/arm/plat-s5p/dev-uart.c b/arch/arm/plat-s5p/dev-uart.c
new file mode 100644
index 000000000000..af726f47385e
--- /dev/null
+++ b/arch/arm/plat-s5p/dev-uart.c
@@ -0,0 +1,165 @@
1/* linux/arch/arm/plat-s5p/dev-uart.c
2 *
3 * Copyright (c) 2009 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com/
5 *
6 * Base S5P UART resource and device definitions
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#include <linux/kernel.h>
14#include <linux/types.h>
15#include <linux/interrupt.h>
16#include <linux/list.h>
17#include <linux/platform_device.h>
18
19#include <asm/mach/arch.h>
20#include <asm/mach/irq.h>
21#include <mach/hardware.h>
22#include <mach/map.h>
23
24#include <plat/devs.h>
25
26 /* Serial port registrations */
27
28static struct resource s5p_uart0_resource[] = {
29 [0] = {
30 .start = S5P_PA_UART0,
31 .end = S5P_PA_UART0 + S5P_SZ_UART,
32 .flags = IORESOURCE_MEM,
33 },
34 [1] = {
35 .start = IRQ_S5P_UART_RX0,
36 .end = IRQ_S5P_UART_RX0,
37 .flags = IORESOURCE_IRQ,
38 },
39 [2] = {
40 .start = IRQ_S5P_UART_TX0,
41 .end = IRQ_S5P_UART_TX0,
42 .flags = IORESOURCE_IRQ,
43 },
44 [3] = {
45 .start = IRQ_S5P_UART_ERR0,
46 .end = IRQ_S5P_UART_ERR0,
47 .flags = IORESOURCE_IRQ,
48 }
49};
50
51static struct resource s5p_uart1_resource[] = {
52 [0] = {
53 .start = S5P_PA_UART1,
54 .end = S5P_PA_UART1 + S5P_SZ_UART,
55 .flags = IORESOURCE_MEM,
56 },
57 [1] = {
58 .start = IRQ_S5P_UART_RX1,
59 .end = IRQ_S5P_UART_RX1,
60 .flags = IORESOURCE_IRQ,
61 },
62 [2] = {
63 .start = IRQ_S5P_UART_TX1,
64 .end = IRQ_S5P_UART_TX1,
65 .flags = IORESOURCE_IRQ,
66 },
67 [3] = {
68 .start = IRQ_S5P_UART_ERR1,
69 .end = IRQ_S5P_UART_ERR1,
70 .flags = IORESOURCE_IRQ,
71 },
72};
73
74static struct resource s5p_uart2_resource[] = {
75 [0] = {
76 .start = S5P_PA_UART2,
77 .end = S5P_PA_UART2 + S5P_SZ_UART,
78 .flags = IORESOURCE_MEM,
79 },
80 [1] = {
81 .start = IRQ_S5P_UART_RX2,
82 .end = IRQ_S5P_UART_RX2,
83 .flags = IORESOURCE_IRQ,
84 },
85 [2] = {
86 .start = IRQ_S5P_UART_TX2,
87 .end = IRQ_S5P_UART_TX2,
88 .flags = IORESOURCE_IRQ,
89 },
90 [3] = {
91 .start = IRQ_S5P_UART_ERR2,
92 .end = IRQ_S5P_UART_ERR2,
93 .flags = IORESOURCE_IRQ,
94 },
95};
96
97static struct resource s5p_uart3_resource[] = {
98 [0] = {
99 .start = S5P_PA_UART3,
100 .end = S5P_PA_UART3 + S5P_SZ_UART,
101 .flags = IORESOURCE_MEM,
102 },
103 [1] = {
104 .start = IRQ_S5P_UART_RX3,
105 .end = IRQ_S5P_UART_RX3,
106 .flags = IORESOURCE_IRQ,
107 },
108 [2] = {
109 .start = IRQ_S5P_UART_TX3,
110 .end = IRQ_S5P_UART_TX3,
111 .flags = IORESOURCE_IRQ,
112 },
113 [3] = {
114 .start = IRQ_S5P_UART_ERR3,
115 .end = IRQ_S5P_UART_ERR3,
116 .flags = IORESOURCE_IRQ,
117 },
118};
119
120struct s3c24xx_uart_resources s5p_uart_resources[] __initdata = {
121 [0] = {
122 .resources = s5p_uart0_resource,
123 .nr_resources = ARRAY_SIZE(s5p_uart0_resource),
124 },
125 [1] = {
126 .resources = s5p_uart1_resource,
127 .nr_resources = ARRAY_SIZE(s5p_uart1_resource),
128 },
129 [2] = {
130 .resources = s5p_uart2_resource,
131 .nr_resources = ARRAY_SIZE(s5p_uart2_resource),
132 },
133 [3] = {
134 .resources = s5p_uart3_resource,
135 .nr_resources = ARRAY_SIZE(s5p_uart3_resource),
136 },
137};
138
139/* uart devices */
140
141static struct platform_device s5p_uart_device0 = {
142 .id = 0,
143};
144
145static struct platform_device s5p_uart_device1 = {
146 .id = 1,
147};
148
149static struct platform_device s5p_uart_device2 = {
150 .id = 2,
151};
152
153static struct platform_device s5p_uart_device3 = {
154 .id = 3,
155};
156
157struct platform_device *s3c24xx_uart_src[4] = {
158 &s5p_uart_device0,
159 &s5p_uart_device1,
160 &s5p_uart_device2,
161 &s5p_uart_device3,
162};
163
164struct platform_device *s3c24xx_uart_devs[4] = {
165};
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index 9ff47db0b2ce..d7d687f0d201 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -459,7 +459,7 @@ config SERIAL_SAMSUNG_UARTS
459 int 459 int
460 depends on ARM && PLAT_S3C 460 depends on ARM && PLAT_S3C
461 default 2 if ARCH_S3C2400 461 default 2 if ARCH_S3C2400
462 default 4 if ARCH_S5PC1XX || ARCH_S3C64XX || CPU_S3C2443 462 default 4 if ARCH_S5P6440 || ARCH_S5PC1XX || ARCH_S3C64XX || CPU_S3C2443
463 default 3 463 default 3
464 help 464 help
465 Select the number of available UART ports for the Samsung S3C 465 Select the number of available UART ports for the Samsung S3C
@@ -526,11 +526,11 @@ config SERIAL_S3C24A0
526 Serial port support for the Samsung S3C24A0 SoC 526 Serial port support for the Samsung S3C24A0 SoC
527 527
528config SERIAL_S3C6400 528config SERIAL_S3C6400
529 tristate "Samsung S3C6400/S3C6410 Serial port support" 529 tristate "Samsung S3C6400/S3C6410/S5P6440 Serial port support"
530 depends on SERIAL_SAMSUNG && (CPU_S3C6400 || CPU_S3C6410) 530 depends on SERIAL_SAMSUNG && (CPU_S3C6400 || CPU_S3C6410 || CPU_S5P6440)
531 default y 531 default y
532 help 532 help
533 Serial port support for the Samsung S3C6400 and S3C6410 533 Serial port support for the Samsung S3C6400, S3C6410 and S5P6440
534 SoCs 534 SoCs
535 535
536config SERIAL_S5PC100 536config SERIAL_S5PC100