aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-s3c24xx/devs.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/plat-s3c24xx/devs.c')
-rw-r--r--arch/arm/plat-s3c24xx/devs.c78
1 files changed, 50 insertions, 28 deletions
diff --git a/arch/arm/plat-s3c24xx/devs.c b/arch/arm/plat-s3c24xx/devs.c
index f52a92ce8dda..9265f09bfa58 100644
--- a/arch/arm/plat-s3c24xx/devs.c
+++ b/arch/arm/plat-s3c24xx/devs.c
@@ -20,6 +20,7 @@
20#include <linux/serial_core.h> 20#include <linux/serial_core.h>
21#include <linux/platform_device.h> 21#include <linux/platform_device.h>
22#include <linux/io.h> 22#include <linux/io.h>
23#include <linux/slab.h>
23 24
24#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
25#include <asm/mach/map.h> 26#include <asm/mach/map.h>
@@ -32,11 +33,14 @@
32 33
33#include <plat/regs-serial.h> 34#include <plat/regs-serial.h>
34#include <plat/udc.h> 35#include <plat/udc.h>
36#include <plat/mci.h>
35 37
36#include <plat/devs.h> 38#include <plat/devs.h>
37#include <plat/cpu.h> 39#include <plat/cpu.h>
38#include <plat/regs-spi.h> 40#include <plat/regs-spi.h>
39 41
42#include <mach/ts.h>
43
40/* Serial port registrations */ 44/* Serial port registrations */
41 45
42static struct resource s3c2410_uart0_resource[] = { 46static struct resource s3c2410_uart0_resource[] = {
@@ -110,34 +114,6 @@ struct s3c24xx_uart_resources s3c2410_uart_resources[] __initdata = {
110 }, 114 },
111}; 115};
112 116
113/* yart devices */
114
115static struct platform_device s3c24xx_uart_device0 = {
116 .id = 0,
117};
118
119static struct platform_device s3c24xx_uart_device1 = {
120 .id = 1,
121};
122
123static struct platform_device s3c24xx_uart_device2 = {
124 .id = 2,
125};
126
127static struct platform_device s3c24xx_uart_device3 = {
128 .id = 3,
129};
130
131struct platform_device *s3c24xx_uart_src[4] = {
132 &s3c24xx_uart_device0,
133 &s3c24xx_uart_device1,
134 &s3c24xx_uart_device2,
135 &s3c24xx_uart_device3,
136};
137
138struct platform_device *s3c24xx_uart_devs[4] = {
139};
140
141/* LCD Controller */ 117/* LCD Controller */
142 118
143static struct resource s3c_lcd_resource[] = { 119static struct resource s3c_lcd_resource[] = {
@@ -182,6 +158,40 @@ void __init s3c24xx_fb_set_platdata(struct s3c2410fb_mach_info *pd)
182 } 158 }
183} 159}
184 160
161/* Touchscreen */
162
163static struct resource s3c_ts_resource[] = {
164 [0] = {
165 .start = S3C24XX_PA_ADC,
166 .end = S3C24XX_PA_ADC + S3C24XX_SZ_ADC - 1,
167 .flags = IORESOURCE_MEM,
168 },
169 [1] = {
170 .start = IRQ_TC,
171 .end = IRQ_TC,
172 .flags = IORESOURCE_IRQ,
173 },
174
175};
176
177struct platform_device s3c_device_ts = {
178 .name = "s3c2410-ts",
179 .id = -1,
180 .dev.parent = &s3c_device_adc.dev,
181 .num_resources = ARRAY_SIZE(s3c_ts_resource),
182 .resource = s3c_ts_resource,
183};
184EXPORT_SYMBOL(s3c_device_ts);
185
186static struct s3c2410_ts_mach_info s3c2410ts_info;
187
188void __init s3c24xx_ts_set_platdata(struct s3c2410_ts_mach_info *hard_s3c2410ts_info)
189{
190 memcpy(&s3c2410ts_info, hard_s3c2410ts_info, sizeof(struct s3c2410_ts_mach_info));
191 s3c_device_ts.dev.platform_data = &s3c2410ts_info;
192}
193EXPORT_SYMBOL(s3c24xx_ts_set_platdata);
194
185/* USB Device (Gadget)*/ 195/* USB Device (Gadget)*/
186 196
187static struct resource s3c_usbgadget_resource[] = { 197static struct resource s3c_usbgadget_resource[] = {
@@ -361,6 +371,18 @@ struct platform_device s3c_device_sdi = {
361 371
362EXPORT_SYMBOL(s3c_device_sdi); 372EXPORT_SYMBOL(s3c_device_sdi);
363 373
374void s3c24xx_mci_set_platdata(struct s3c24xx_mci_pdata *pdata)
375{
376 struct s3c24xx_mci_pdata *npd;
377
378 npd = kmemdup(pdata, sizeof(struct s3c24xx_mci_pdata), GFP_KERNEL);
379 if (!npd)
380 printk(KERN_ERR "%s: no memory to copy pdata", __func__);
381
382 s3c_device_sdi.dev.platform_data = npd;
383}
384
385
364/* SPI (0) */ 386/* SPI (0) */
365 387
366static struct resource s3c_spi0_resource[] = { 388static struct resource s3c_spi0_resource[] = {