aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s5pv210/common.c
diff options
context:
space:
mode:
authorTomasz Figa <t.figa@samsung.com>2013-04-12 15:17:22 -0400
committerTomasz Figa <tomasz.figa@gmail.com>2013-08-05 19:21:46 -0400
commit1c161fd0d453ff63c8bb3a703d46d10ac5eba7a4 (patch)
tree9e97777321ec67219ca9cc42b4ad593b0593da86 /arch/arm/mach-s5pv210/common.c
parent95e43d4640b9891482c46470389fe8bf7267079d (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-s5pv210/common.c')
-rw-r--r--arch/arm/mach-s5pv210/common.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/arm/mach-s5pv210/common.c b/arch/arm/mach-s5pv210/common.c
index 023f1a796a9c..306b29aa58bc 100644
--- a/arch/arm/mach-s5pv210/common.c
+++ b/arch/arm/mach-s5pv210/common.c
@@ -19,6 +19,7 @@
19#include <linux/clk.h> 19#include <linux/clk.h>
20#include <linux/io.h> 20#include <linux/io.h>
21#include <linux/device.h> 21#include <linux/device.h>
22#include <clocksource/samsung_pwm.h>
22#include <linux/platform_device.h> 23#include <linux/platform_device.h>
23#include <linux/sched.h> 24#include <linux/sched.h>
24#include <linux/dma-mapping.h> 25#include <linux/dma-mapping.h>
@@ -42,6 +43,7 @@
42#include <plat/fimc-core.h> 43#include <plat/fimc-core.h>
43#include <plat/iic-core.h> 44#include <plat/iic-core.h>
44#include <plat/keypad-core.h> 45#include <plat/keypad-core.h>
46#include <plat/pwm-core.h>
45#include <plat/tv-core.h> 47#include <plat/tv-core.h>
46#include <plat/spi-core.h> 48#include <plat/spi-core.h>
47#include <plat/regs-serial.h> 49#include <plat/regs-serial.h>
@@ -148,6 +150,13 @@ void s5pv210_restart(enum reboot_mode mode, const char *cmd)
148 __raw_writel(0x1, S5P_SWRESET); 150 __raw_writel(0x1, S5P_SWRESET);
149} 151}
150 152
153static struct samsung_pwm_variant s5pv210_pwm_variant = {
154 .bits = 32,
155 .div_base = 0,
156 .has_tint_cstat = true,
157 .tclk_mask = (1 << 5),
158};
159
151/* 160/*
152 * s5pv210_map_io 161 * s5pv210_map_io
153 * 162 *
@@ -165,6 +174,8 @@ void __init s5pv210_init_io(struct map_desc *mach_desc, int size)
165 s5p_init_cpu(S5P_VA_CHIPID); 174 s5p_init_cpu(S5P_VA_CHIPID);
166 175
167 s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids)); 176 s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids));
177
178 samsung_pwm_set_platdata(&s5pv210_pwm_variant);
168} 179}
169 180
170void __init s5pv210_map_io(void) 181void __init s5pv210_map_io(void)