diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-01-04 15:35:18 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-01-04 15:35:18 -0500 |
| commit | 14107c750b840d6efd7fdf2f6d513f35e2eb6230 (patch) | |
| tree | f91f581134b581e553c7fb1f6158172cee07a069 | |
| parent | 846f99749ab68bbc7f75c74fec305de675b1a1bf (diff) | |
| parent | 70670e4b8d75291f7d03771e26f7f7794d2d3eba (diff) | |
Merge branch 'for-linus/samsung' of git://git.fluff.org/bjdooks/linux
* 'for-linus/samsung' of git://git.fluff.org/bjdooks/linux:
ARM: S3C: Fix NAND device registration by s3c_nand_set_platdata().
ARM: S3C24XX: touchscreen device definition
ARM: mach-bast: add NAND_SCAN_SILENT_NODEV to optional devices
ARM: mach-osiris: add NAND_SCAN_SILENT_NODEV to optional devices
ARM: S3C24XX: touchscreen device definition
| -rw-r--r-- | arch/arm/mach-s3c2410/include/mach/ts.h | 21 | ||||
| -rw-r--r-- | arch/arm/mach-s3c2410/mach-bast.c | 3 | ||||
| -rw-r--r-- | arch/arm/mach-s3c2410/mach-h1940.c | 8 | ||||
| -rw-r--r-- | arch/arm/mach-s3c2440/mach-osiris.c | 2 | ||||
| -rw-r--r-- | arch/arm/plat-s3c/dev-nand.c | 4 | ||||
| -rw-r--r-- | arch/arm/plat-s3c/include/plat/devs.h | 1 | ||||
| -rw-r--r-- | arch/arm/plat-s3c24xx/devs.c | 18 | ||||
| -rw-r--r-- | arch/arm/plat-s3c24xx/s3c244x.c | 1 |
8 files changed, 57 insertions, 1 deletions
diff --git a/arch/arm/mach-s3c2410/include/mach/ts.h b/arch/arm/mach-s3c2410/include/mach/ts.h new file mode 100644 index 000000000000..dc361700d695 --- /dev/null +++ b/arch/arm/mach-s3c2410/include/mach/ts.h | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | /* linux/include/asm/arch-s3c2410/ts.h | ||
| 2 | * | ||
| 3 | * Copyright (c) 2005 Arnaud Patard <arnaud.patard@rtp-net.org> | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License version 2 as | ||
| 7 | * published by the Free Software Foundation. | ||
| 8 | */ | ||
| 9 | |||
| 10 | #ifndef __ASM_ARM_TS_H | ||
| 11 | #define __ASM_ARM_TS_H | ||
| 12 | |||
| 13 | struct s3c2410_ts_mach_info { | ||
| 14 | int delay; | ||
| 15 | int presc; | ||
| 16 | int oversampling_shift; | ||
| 17 | }; | ||
| 18 | |||
| 19 | extern void s3c24xx_ts_set_platdata(struct s3c2410_ts_mach_info *); | ||
| 20 | |||
| 21 | #endif /* __ASM_ARM_TS_H */ | ||
diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c index 4c79ac8a6c33..97162fdd0590 100644 --- a/arch/arm/mach-s3c2410/mach-bast.c +++ b/arch/arm/mach-s3c2410/mach-bast.c | |||
| @@ -279,6 +279,7 @@ static struct s3c2410_nand_set __initdata bast_nand_sets[] = { | |||
| 279 | .name = "SmartMedia", | 279 | .name = "SmartMedia", |
| 280 | .nr_chips = 1, | 280 | .nr_chips = 1, |
| 281 | .nr_map = smartmedia_map, | 281 | .nr_map = smartmedia_map, |
| 282 | .options = NAND_SCAN_SILENT_NODEV, | ||
| 282 | .nr_partitions = ARRAY_SIZE(bast_default_nand_part), | 283 | .nr_partitions = ARRAY_SIZE(bast_default_nand_part), |
| 283 | .partitions = bast_default_nand_part, | 284 | .partitions = bast_default_nand_part, |
| 284 | }, | 285 | }, |
| @@ -293,6 +294,7 @@ static struct s3c2410_nand_set __initdata bast_nand_sets[] = { | |||
| 293 | .name = "chip1", | 294 | .name = "chip1", |
| 294 | .nr_chips = 1, | 295 | .nr_chips = 1, |
| 295 | .nr_map = chip1_map, | 296 | .nr_map = chip1_map, |
| 297 | .options = NAND_SCAN_SILENT_NODEV, | ||
| 296 | .nr_partitions = ARRAY_SIZE(bast_default_nand_part), | 298 | .nr_partitions = ARRAY_SIZE(bast_default_nand_part), |
| 297 | .partitions = bast_default_nand_part, | 299 | .partitions = bast_default_nand_part, |
| 298 | }, | 300 | }, |
| @@ -300,6 +302,7 @@ static struct s3c2410_nand_set __initdata bast_nand_sets[] = { | |||
| 300 | .name = "chip2", | 302 | .name = "chip2", |
| 301 | .nr_chips = 1, | 303 | .nr_chips = 1, |
| 302 | .nr_map = chip2_map, | 304 | .nr_map = chip2_map, |
| 305 | .options = NAND_SCAN_SILENT_NODEV, | ||
| 303 | .nr_partitions = ARRAY_SIZE(bast_default_nand_part), | 306 | .nr_partitions = ARRAY_SIZE(bast_default_nand_part), |
| 304 | .partitions = bast_default_nand_part, | 307 | .partitions = bast_default_nand_part, |
| 305 | } | 308 | } |
diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c index 49053254c98d..1e34abe1a19e 100644 --- a/arch/arm/mach-s3c2410/mach-h1940.c +++ b/arch/arm/mach-s3c2410/mach-h1940.c | |||
| @@ -46,6 +46,7 @@ | |||
| 46 | #include <mach/h1940.h> | 46 | #include <mach/h1940.h> |
| 47 | #include <mach/h1940-latch.h> | 47 | #include <mach/h1940-latch.h> |
| 48 | #include <mach/fb.h> | 48 | #include <mach/fb.h> |
| 49 | #include <mach/ts.h> | ||
| 49 | #include <plat/udc.h> | 50 | #include <plat/udc.h> |
| 50 | #include <plat/iic.h> | 51 | #include <plat/iic.h> |
| 51 | 52 | ||
| @@ -140,6 +141,11 @@ static struct s3c2410_udc_mach_info h1940_udc_cfg __initdata = { | |||
| 140 | .vbus_pin_inverted = 1, | 141 | .vbus_pin_inverted = 1, |
| 141 | }; | 142 | }; |
| 142 | 143 | ||
| 144 | static struct s3c2410_ts_mach_info h1940_ts_cfg __initdata = { | ||
| 145 | .delay = 10000, | ||
| 146 | .presc = 49, | ||
| 147 | .oversampling_shift = 2, | ||
| 148 | }; | ||
| 143 | 149 | ||
| 144 | /** | 150 | /** |
| 145 | * Set lcd on or off | 151 | * Set lcd on or off |
| @@ -265,6 +271,7 @@ static struct platform_device h1940_lcd_powerdev = { | |||
| 265 | }; | 271 | }; |
| 266 | 272 | ||
| 267 | static struct platform_device *h1940_devices[] __initdata = { | 273 | static struct platform_device *h1940_devices[] __initdata = { |
| 274 | &s3c_device_ts, | ||
| 268 | &s3c_device_usb, | 275 | &s3c_device_usb, |
| 269 | &s3c_device_lcd, | 276 | &s3c_device_lcd, |
| 270 | &s3c_device_wdt, | 277 | &s3c_device_wdt, |
| @@ -305,6 +312,7 @@ static void __init h1940_init(void) | |||
| 305 | 312 | ||
| 306 | s3c24xx_fb_set_platdata(&h1940_fb_info); | 313 | s3c24xx_fb_set_platdata(&h1940_fb_info); |
| 307 | s3c24xx_udc_set_platdata(&h1940_udc_cfg); | 314 | s3c24xx_udc_set_platdata(&h1940_udc_cfg); |
| 315 | s3c24xx_ts_set_platdata(&h1940_ts_cfg); | ||
| 308 | s3c_i2c0_set_platdata(NULL); | 316 | s3c_i2c0_set_platdata(NULL); |
| 309 | 317 | ||
| 310 | s3c_device_sdi.dev.platform_data = &h1940_mmc_cfg; | 318 | s3c_device_sdi.dev.platform_data = &h1940_mmc_cfg; |
diff --git a/arch/arm/mach-s3c2440/mach-osiris.c b/arch/arm/mach-s3c2440/mach-osiris.c index 015dfb2a80da..f35371db33f5 100644 --- a/arch/arm/mach-s3c2440/mach-osiris.c +++ b/arch/arm/mach-s3c2440/mach-osiris.c | |||
| @@ -208,6 +208,7 @@ static struct s3c2410_nand_set __initdata osiris_nand_sets[] = { | |||
| 208 | .name = "External", | 208 | .name = "External", |
| 209 | .nr_chips = 1, | 209 | .nr_chips = 1, |
| 210 | .nr_map = external_map, | 210 | .nr_map = external_map, |
| 211 | .options = NAND_SCAN_SILENT_NODEV, | ||
| 211 | .nr_partitions = ARRAY_SIZE(osiris_default_nand_part), | 212 | .nr_partitions = ARRAY_SIZE(osiris_default_nand_part), |
| 212 | .partitions = osiris_default_nand_part, | 213 | .partitions = osiris_default_nand_part, |
| 213 | }, | 214 | }, |
| @@ -222,6 +223,7 @@ static struct s3c2410_nand_set __initdata osiris_nand_sets[] = { | |||
| 222 | .name = "chip1", | 223 | .name = "chip1", |
| 223 | .nr_chips = 1, | 224 | .nr_chips = 1, |
| 224 | .nr_map = chip1_map, | 225 | .nr_map = chip1_map, |
| 226 | .options = NAND_SCAN_SILENT_NODEV, | ||
| 225 | .nr_partitions = ARRAY_SIZE(osiris_default_nand_part), | 227 | .nr_partitions = ARRAY_SIZE(osiris_default_nand_part), |
| 226 | .partitions = osiris_default_nand_part, | 228 | .partitions = osiris_default_nand_part, |
| 227 | }, | 229 | }, |
diff --git a/arch/arm/plat-s3c/dev-nand.c b/arch/arm/plat-s3c/dev-nand.c index e771e77dcd54..84808ccda70e 100644 --- a/arch/arm/plat-s3c/dev-nand.c +++ b/arch/arm/plat-s3c/dev-nand.c | |||
| @@ -114,7 +114,7 @@ void __init s3c_nand_set_platdata(struct s3c2410_platform_nand *nand) | |||
| 114 | 114 | ||
| 115 | for (i = 0; i < npd->nr_sets; i++) { | 115 | for (i = 0; i < npd->nr_sets; i++) { |
| 116 | ret = s3c_nand_copy_set(to); | 116 | ret = s3c_nand_copy_set(to); |
| 117 | if (!ret) { | 117 | if (ret) { |
| 118 | printk(KERN_ERR "%s: failed to copy set %d\n", | 118 | printk(KERN_ERR "%s: failed to copy set %d\n", |
| 119 | __func__, i); | 119 | __func__, i); |
| 120 | return; | 120 | return; |
| @@ -122,6 +122,8 @@ void __init s3c_nand_set_platdata(struct s3c2410_platform_nand *nand) | |||
| 122 | to++; | 122 | to++; |
| 123 | } | 123 | } |
| 124 | } | 124 | } |
| 125 | |||
| 126 | s3c_device_nand.dev.platform_data = npd; | ||
| 125 | } | 127 | } |
| 126 | 128 | ||
| 127 | EXPORT_SYMBOL_GPL(s3c_nand_set_platdata); | 129 | EXPORT_SYMBOL_GPL(s3c_nand_set_platdata); |
diff --git a/arch/arm/plat-s3c/include/plat/devs.h b/arch/arm/plat-s3c/include/plat/devs.h index 932cbbbb4273..c1c20b023917 100644 --- a/arch/arm/plat-s3c/include/plat/devs.h +++ b/arch/arm/plat-s3c/include/plat/devs.h | |||
| @@ -31,6 +31,7 @@ extern struct platform_device s3c64xx_device_iisv4; | |||
| 31 | extern struct platform_device s3c64xx_device_pcm0; | 31 | extern struct platform_device s3c64xx_device_pcm0; |
| 32 | extern struct platform_device s3c64xx_device_pcm1; | 32 | extern struct platform_device s3c64xx_device_pcm1; |
| 33 | 33 | ||
| 34 | extern struct platform_device s3c_device_ts; | ||
| 34 | extern struct platform_device s3c_device_fb; | 35 | extern struct platform_device s3c_device_fb; |
| 35 | extern struct platform_device s3c_device_usb; | 36 | extern struct platform_device s3c_device_usb; |
| 36 | extern struct platform_device s3c_device_lcd; | 37 | extern struct platform_device s3c_device_lcd; |
diff --git a/arch/arm/plat-s3c24xx/devs.c b/arch/arm/plat-s3c24xx/devs.c index f52a92ce8dda..7f686a31e672 100644 --- a/arch/arm/plat-s3c24xx/devs.c +++ b/arch/arm/plat-s3c24xx/devs.c | |||
| @@ -37,6 +37,8 @@ | |||
| 37 | #include <plat/cpu.h> | 37 | #include <plat/cpu.h> |
| 38 | #include <plat/regs-spi.h> | 38 | #include <plat/regs-spi.h> |
| 39 | 39 | ||
| 40 | #include <mach/ts.h> | ||
| 41 | |||
| 40 | /* Serial port registrations */ | 42 | /* Serial port registrations */ |
| 41 | 43 | ||
| 42 | static struct resource s3c2410_uart0_resource[] = { | 44 | static struct resource s3c2410_uart0_resource[] = { |
| @@ -182,6 +184,22 @@ void __init s3c24xx_fb_set_platdata(struct s3c2410fb_mach_info *pd) | |||
| 182 | } | 184 | } |
| 183 | } | 185 | } |
| 184 | 186 | ||
| 187 | /* Touchscreen */ | ||
| 188 | struct platform_device s3c_device_ts = { | ||
| 189 | .name = "s3c2410-ts", | ||
| 190 | .id = -1, | ||
| 191 | }; | ||
| 192 | EXPORT_SYMBOL(s3c_device_ts); | ||
| 193 | |||
| 194 | static struct s3c2410_ts_mach_info s3c2410ts_info; | ||
| 195 | |||
| 196 | void __init s3c24xx_ts_set_platdata(struct s3c2410_ts_mach_info *hard_s3c2410ts_info) | ||
| 197 | { | ||
| 198 | memcpy(&s3c2410ts_info, hard_s3c2410ts_info, sizeof(struct s3c2410_ts_mach_info)); | ||
| 199 | s3c_device_ts.dev.platform_data = &s3c2410ts_info; | ||
| 200 | } | ||
| 201 | EXPORT_SYMBOL(s3c24xx_ts_set_platdata); | ||
| 202 | |||
| 185 | /* USB Device (Gadget)*/ | 203 | /* USB Device (Gadget)*/ |
| 186 | 204 | ||
| 187 | static struct resource s3c_usbgadget_resource[] = { | 205 | static struct resource s3c_usbgadget_resource[] = { |
diff --git a/arch/arm/plat-s3c24xx/s3c244x.c b/arch/arm/plat-s3c24xx/s3c244x.c index 1364317d421e..12623a474b54 100644 --- a/arch/arm/plat-s3c24xx/s3c244x.c +++ b/arch/arm/plat-s3c24xx/s3c244x.c | |||
| @@ -70,6 +70,7 @@ void __init s3c244x_map_io(void) | |||
| 70 | s3c_device_sdi.name = "s3c2440-sdi"; | 70 | s3c_device_sdi.name = "s3c2440-sdi"; |
| 71 | s3c_device_i2c0.name = "s3c2440-i2c"; | 71 | s3c_device_i2c0.name = "s3c2440-i2c"; |
| 72 | s3c_device_nand.name = "s3c2440-nand"; | 72 | s3c_device_nand.name = "s3c2440-nand"; |
| 73 | s3c_device_ts.name = "s3c2440-ts"; | ||
| 73 | s3c_device_usbgadget.name = "s3c2440-usbgadget"; | 74 | s3c_device_usbgadget.name = "s3c2440-usbgadget"; |
| 74 | } | 75 | } |
| 75 | 76 | ||
