diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /arch/arm/plat-s3c24xx/devs.c | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'arch/arm/plat-s3c24xx/devs.c')
-rw-r--r-- | arch/arm/plat-s3c24xx/devs.c | 78 |
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 | ||
42 | static struct resource s3c2410_uart0_resource[] = { | 46 | static 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 | |||
115 | static struct platform_device s3c24xx_uart_device0 = { | ||
116 | .id = 0, | ||
117 | }; | ||
118 | |||
119 | static struct platform_device s3c24xx_uart_device1 = { | ||
120 | .id = 1, | ||
121 | }; | ||
122 | |||
123 | static struct platform_device s3c24xx_uart_device2 = { | ||
124 | .id = 2, | ||
125 | }; | ||
126 | |||
127 | static struct platform_device s3c24xx_uart_device3 = { | ||
128 | .id = 3, | ||
129 | }; | ||
130 | |||
131 | struct platform_device *s3c24xx_uart_src[4] = { | ||
132 | &s3c24xx_uart_device0, | ||
133 | &s3c24xx_uart_device1, | ||
134 | &s3c24xx_uart_device2, | ||
135 | &s3c24xx_uart_device3, | ||
136 | }; | ||
137 | |||
138 | struct platform_device *s3c24xx_uart_devs[4] = { | ||
139 | }; | ||
140 | |||
141 | /* LCD Controller */ | 117 | /* LCD Controller */ |
142 | 118 | ||
143 | static struct resource s3c_lcd_resource[] = { | 119 | static 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 | |||
163 | static 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 | |||
177 | struct 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 | }; | ||
184 | EXPORT_SYMBOL(s3c_device_ts); | ||
185 | |||
186 | static struct s3c2410_ts_mach_info s3c2410ts_info; | ||
187 | |||
188 | void __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 | } | ||
193 | EXPORT_SYMBOL(s3c24xx_ts_set_platdata); | ||
194 | |||
185 | /* USB Device (Gadget)*/ | 195 | /* USB Device (Gadget)*/ |
186 | 196 | ||
187 | static struct resource s3c_usbgadget_resource[] = { | 197 | static struct resource s3c_usbgadget_resource[] = { |
@@ -361,6 +371,18 @@ struct platform_device s3c_device_sdi = { | |||
361 | 371 | ||
362 | EXPORT_SYMBOL(s3c_device_sdi); | 372 | EXPORT_SYMBOL(s3c_device_sdi); |
363 | 373 | ||
374 | void 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 | ||
366 | static struct resource s3c_spi0_resource[] = { | 388 | static struct resource s3c_spi0_resource[] = { |