aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2010-01-12 01:15:28 -0500
committerBen Dooks <ben-linux@fluff.org>2010-01-18 19:23:50 -0500
commit0a6361316d6493b9dcbdda9a6a4586c3ccbfd008 (patch)
tree67cf139b9538677b886dbc10c14b635107eb4294 /arch
parent0f61628e37e121b7786bff2653fc25a321e82ec4 (diff)
ARM: SAMSUNG: Make UART device code common
Move s3c24xx_uart_devs, s3c24xx_uart_src and the platform devices to a common entry in plat-samsung since they are the same in all the current implementations. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/plat-s3c24xx/devs.c28
-rw-r--r--arch/arm/plat-s3c64xx/dev-uart.c29
-rw-r--r--arch/arm/plat-s5p/dev-uart.c28
-rw-r--r--arch/arm/plat-s5pc1xx/dev-uart.c29
-rw-r--r--arch/arm/plat-samsung/Makefile1
-rw-r--r--arch/arm/plat-samsung/dev-uart.c44
6 files changed, 45 insertions, 114 deletions
diff --git a/arch/arm/plat-s3c24xx/devs.c b/arch/arm/plat-s3c24xx/devs.c
index 7f686a31e672..38c358c14aa2 100644
--- a/arch/arm/plat-s3c24xx/devs.c
+++ b/arch/arm/plat-s3c24xx/devs.c
@@ -112,34 +112,6 @@ struct s3c24xx_uart_resources s3c2410_uart_resources[] __initdata = {
112 }, 112 },
113}; 113};
114 114
115/* yart devices */
116
117static struct platform_device s3c24xx_uart_device0 = {
118 .id = 0,
119};
120
121static struct platform_device s3c24xx_uart_device1 = {
122 .id = 1,
123};
124
125static struct platform_device s3c24xx_uart_device2 = {
126 .id = 2,
127};
128
129static struct platform_device s3c24xx_uart_device3 = {
130 .id = 3,
131};
132
133struct platform_device *s3c24xx_uart_src[4] = {
134 &s3c24xx_uart_device0,
135 &s3c24xx_uart_device1,
136 &s3c24xx_uart_device2,
137 &s3c24xx_uart_device3,
138};
139
140struct platform_device *s3c24xx_uart_devs[4] = {
141};
142
143/* LCD Controller */ 115/* LCD Controller */
144 116
145static struct resource s3c_lcd_resource[] = { 117static struct resource s3c_lcd_resource[] = {
diff --git a/arch/arm/plat-s3c64xx/dev-uart.c b/arch/arm/plat-s3c64xx/dev-uart.c
index 62c11a6fc7ba..f797f748b999 100644
--- a/arch/arm/plat-s3c64xx/dev-uart.c
+++ b/arch/arm/plat-s3c64xx/dev-uart.c
@@ -145,32 +145,3 @@ struct s3c24xx_uart_resources s3c64xx_uart_resources[] __initdata = {
145 .nr_resources = ARRAY_SIZE(s3c64xx_uart3_resource), 145 .nr_resources = ARRAY_SIZE(s3c64xx_uart3_resource),
146 }, 146 },
147}; 147};
148
149/* uart devices */
150
151static struct platform_device s3c24xx_uart_device0 = {
152 .id = 0,
153};
154
155static struct platform_device s3c24xx_uart_device1 = {
156 .id = 1,
157};
158
159static struct platform_device s3c24xx_uart_device2 = {
160 .id = 2,
161};
162
163static struct platform_device s3c24xx_uart_device3 = {
164 .id = 3,
165};
166
167struct platform_device *s3c24xx_uart_src[4] = {
168 &s3c24xx_uart_device0,
169 &s3c24xx_uart_device1,
170 &s3c24xx_uart_device2,
171 &s3c24xx_uart_device3,
172};
173
174struct platform_device *s3c24xx_uart_devs[4] = {
175};
176
diff --git a/arch/arm/plat-s5p/dev-uart.c b/arch/arm/plat-s5p/dev-uart.c
index af726f47385e..23c75316d491 100644
--- a/arch/arm/plat-s5p/dev-uart.c
+++ b/arch/arm/plat-s5p/dev-uart.c
@@ -135,31 +135,3 @@ struct s3c24xx_uart_resources s5p_uart_resources[] __initdata = {
135 .nr_resources = ARRAY_SIZE(s5p_uart3_resource), 135 .nr_resources = ARRAY_SIZE(s5p_uart3_resource),
136 }, 136 },
137}; 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/arch/arm/plat-s5pc1xx/dev-uart.c b/arch/arm/plat-s5pc1xx/dev-uart.c
index f749bc5407b5..586c95c60bfe 100644
--- a/arch/arm/plat-s5pc1xx/dev-uart.c
+++ b/arch/arm/plat-s5pc1xx/dev-uart.c
@@ -143,32 +143,3 @@ struct s3c24xx_uart_resources s5pc1xx_uart_resources[] __initdata = {
143 .nr_resources = ARRAY_SIZE(s5pc1xx_uart3_resource), 143 .nr_resources = ARRAY_SIZE(s5pc1xx_uart3_resource),
144 }, 144 },
145}; 145};
146
147/* uart devices */
148
149static struct platform_device s3c24xx_uart_device0 = {
150 .id = 0,
151};
152
153static struct platform_device s3c24xx_uart_device1 = {
154 .id = 1,
155};
156
157static struct platform_device s3c24xx_uart_device2 = {
158 .id = 2,
159};
160
161static struct platform_device s3c24xx_uart_device3 = {
162 .id = 3,
163};
164
165struct platform_device *s3c24xx_uart_src[4] = {
166 &s3c24xx_uart_device0,
167 &s3c24xx_uart_device1,
168 &s3c24xx_uart_device2,
169 &s3c24xx_uart_device3,
170};
171
172struct platform_device *s3c24xx_uart_devs[4] = {
173};
174
diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile
index aeb7e12d1f63..f834e42d95da 100644
--- a/arch/arm/plat-samsung/Makefile
+++ b/arch/arm/plat-samsung/Makefile
@@ -28,6 +28,7 @@ obj-$(CONFIG_S3C_DEV_HSMMC2) += dev-hsmmc2.o
28obj-y += dev-i2c0.o 28obj-y += dev-i2c0.o
29obj-$(CONFIG_S3C_DEV_I2C1) += dev-i2c1.o 29obj-$(CONFIG_S3C_DEV_I2C1) += dev-i2c1.o
30obj-$(CONFIG_S3C_DEV_FB) += dev-fb.o 30obj-$(CONFIG_S3C_DEV_FB) += dev-fb.o
31obj-y += dev-uart.o
31obj-$(CONFIG_S3C_DEV_USB_HOST) += dev-usb.o 32obj-$(CONFIG_S3C_DEV_USB_HOST) += dev-usb.o
32obj-$(CONFIG_S3C_DEV_USB_HSOTG) += dev-usb-hsotg.o 33obj-$(CONFIG_S3C_DEV_USB_HSOTG) += dev-usb-hsotg.o
33obj-$(CONFIG_S3C_DEV_NAND) += dev-nand.o 34obj-$(CONFIG_S3C_DEV_NAND) += dev-nand.o
diff --git a/arch/arm/plat-samsung/dev-uart.c b/arch/arm/plat-samsung/dev-uart.c
new file mode 100644
index 000000000000..3776cd952450
--- /dev/null
+++ b/arch/arm/plat-samsung/dev-uart.c
@@ -0,0 +1,44 @@
1/* linux/arch/arm/plat-samsung/dev-uart.c
2 * originally from arch/arm/plat-s3c24xx/devs.c
3 *x
4 * Copyright (c) 2004 Simtec Electronics
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * Base S3C24XX platform device definitions
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 *
13*/
14
15#include <linux/kernel.h>
16#include <linux/platform_device.h>
17
18/* uart devices */
19
20static struct platform_device s3c24xx_uart_device0 = {
21 .id = 0,
22};
23
24static struct platform_device s3c24xx_uart_device1 = {
25 .id = 1,
26};
27
28static struct platform_device s3c24xx_uart_device2 = {
29 .id = 2,
30};
31
32static struct platform_device s3c24xx_uart_device3 = {
33 .id = 3,
34};
35
36struct platform_device *s3c24xx_uart_src[4] = {
37 &s3c24xx_uart_device0,
38 &s3c24xx_uart_device1,
39 &s3c24xx_uart_device2,
40 &s3c24xx_uart_device3,
41};
42
43struct platform_device *s3c24xx_uart_devs[4] = {
44};