diff options
author | Tomasz Figa <t.figa@samsung.com> | 2013-04-12 15:17:22 -0400 |
---|---|---|
committer | Tomasz Figa <tomasz.figa@gmail.com> | 2013-08-05 19:21:46 -0400 |
commit | 1c161fd0d453ff63c8bb3a703d46d10ac5eba7a4 (patch) | |
tree | 9e97777321ec67219ca9cc42b4ad593b0593da86 /arch/arm/mach-s3c24xx | |
parent | 95e43d4640b9891482c46470389fe8bf7267079d (diff) |
ARM: SAMSUNG: Set PWM platform data
This patch adds PWM platform data needed for legacy (non-DT) platforms
to handle SoC-specific bits of the PWM/timer block.
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Mark Brown <broonie@linaro.org>
Tested-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/mach-s3c24xx')
-rw-r--r-- | arch/arm/mach-s3c24xx/common.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c24xx/common.c b/arch/arm/mach-s3c24xx/common.c index c157103ed8eb..e5e7d7dee6f2 100644 --- a/arch/arm/mach-s3c24xx/common.c +++ b/arch/arm/mach-s3c24xx/common.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/interrupt.h> | 27 | #include <linux/interrupt.h> |
28 | #include <linux/ioport.h> | 28 | #include <linux/ioport.h> |
29 | #include <linux/serial_core.h> | 29 | #include <linux/serial_core.h> |
30 | #include <clocksource/samsung_pwm.h> | ||
30 | #include <linux/platform_device.h> | 31 | #include <linux/platform_device.h> |
31 | #include <linux/delay.h> | 32 | #include <linux/delay.h> |
32 | #include <linux/io.h> | 33 | #include <linux/io.h> |
@@ -49,6 +50,7 @@ | |||
49 | #include <plat/clock.h> | 50 | #include <plat/clock.h> |
50 | #include <plat/cpu-freq.h> | 51 | #include <plat/cpu-freq.h> |
51 | #include <plat/pll.h> | 52 | #include <plat/pll.h> |
53 | #include <plat/pwm-core.h> | ||
52 | 54 | ||
53 | #include "common.h" | 55 | #include "common.h" |
54 | 56 | ||
@@ -216,6 +218,13 @@ static void s3c24xx_default_idle(void) | |||
216 | S3C2410_CLKCON); | 218 | S3C2410_CLKCON); |
217 | } | 219 | } |
218 | 220 | ||
221 | static struct samsung_pwm_variant s3c24xx_pwm_variant = { | ||
222 | .bits = 16, | ||
223 | .div_base = 1, | ||
224 | .has_tint_cstat = false, | ||
225 | .tclk_mask = (1 << 4), | ||
226 | }; | ||
227 | |||
219 | void __init s3c24xx_init_io(struct map_desc *mach_desc, int size) | 228 | void __init s3c24xx_init_io(struct map_desc *mach_desc, int size) |
220 | { | 229 | { |
221 | arm_pm_idle = s3c24xx_default_idle; | 230 | arm_pm_idle = s3c24xx_default_idle; |
@@ -232,6 +241,8 @@ void __init s3c24xx_init_io(struct map_desc *mach_desc, int size) | |||
232 | s3c24xx_init_cpu(); | 241 | s3c24xx_init_cpu(); |
233 | 242 | ||
234 | s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids)); | 243 | s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids)); |
244 | |||
245 | samsung_pwm_set_platdata(&s3c24xx_pwm_variant); | ||
235 | } | 246 | } |
236 | 247 | ||
237 | /* Serial port registrations */ | 248 | /* Serial port registrations */ |