From 1c161fd0d453ff63c8bb3a703d46d10ac5eba7a4 Mon Sep 17 00:00:00 2001 From: Tomasz Figa Date: Fri, 12 Apr 2013 21:17:22 +0200 Subject: 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 Signed-off-by: Kyungmin Park Reviewed-by: Sylwester Nawrocki Tested-by: Heiko Stuebner Tested-by: Mark Brown Tested-by: Sylwester Nawrocki Acked-by: Arnd Bergmann --- arch/arm/mach-s3c64xx/common.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'arch/arm/mach-s3c64xx') diff --git a/arch/arm/mach-s3c64xx/common.c b/arch/arm/mach-s3c64xx/common.c index 3f62e467b129..ca05e61f401c 100644 --- a/arch/arm/mach-s3c64xx/common.c +++ b/arch/arm/mach-s3c64xx/common.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -43,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -149,6 +151,13 @@ static struct device s3c64xx_dev = { .bus = &s3c64xx_subsys, }; +static struct samsung_pwm_variant s3c64xx_pwm_variant = { + .bits = 32, + .div_base = 0, + .has_tint_cstat = true, + .tclk_mask = (1 << 7) | (1 << 6) | (1 << 5), +}; + /* read cpu identification code */ void __init s3c64xx_init_io(struct map_desc *mach_desc, int size) @@ -161,6 +170,8 @@ void __init s3c64xx_init_io(struct map_desc *mach_desc, int size) s3c64xx_init_cpu(); s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids)); + + samsung_pwm_set_platdata(&s3c64xx_pwm_variant); } static __init int s3c64xx_dev_init(void) -- cgit v1.2.3