aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c24xx
diff options
context:
space:
mode:
authorTomasz Figa <tomasz.figa@gmail.com>2013-04-27 20:25:01 -0400
committerTomasz Figa <tomasz.figa@gmail.com>2013-08-05 19:21:46 -0400
commit4280506ac9bb17f2450cf1042edf929d26d24a8e (patch)
tree363304c12a68b8066c1f52caa46e6070603f446b /arch/arm/mach-s3c24xx
parent1c161fd0d453ff63c8bb3a703d46d10ac5eba7a4 (diff)
ARM: SAMSUNG: Move all platforms to new clocksource driver
This patch moves all Samsung platforms using PWM clocksource from legacy samsung-time to new samsung-pwm-timer driver. Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com> Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org> 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/Kconfig6
-rw-r--r--arch/arm/mach-s3c24xx/common.c16
2 files changed, 16 insertions, 6 deletions
diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig
index 7791ac76f945..dba2173e70f3 100644
--- a/arch/arm/mach-s3c24xx/Kconfig
+++ b/arch/arm/mach-s3c24xx/Kconfig
@@ -30,7 +30,6 @@ config CPU_S3C2410
30 select S3C2410_CLOCK 30 select S3C2410_CLOCK
31 select ARM_S3C2410_CPUFREQ if ARM_S3C24XX_CPUFREQ 31 select ARM_S3C2410_CPUFREQ if ARM_S3C24XX_CPUFREQ
32 select S3C2410_PM if PM 32 select S3C2410_PM if PM
33 select SAMSUNG_HRT
34 select SAMSUNG_WDT_RESET 33 select SAMSUNG_WDT_RESET
35 help 34 help
36 Support for S3C2410 and S3C2410A family from the S3C24XX line 35 Support for S3C2410 and S3C2410A family from the S3C24XX line
@@ -42,7 +41,6 @@ config CPU_S3C2412
42 select CPU_LLSERIAL_S3C2440 41 select CPU_LLSERIAL_S3C2440
43 select S3C2412_DMA if S3C24XX_DMA 42 select S3C2412_DMA if S3C24XX_DMA
44 select S3C2412_PM if PM 43 select S3C2412_PM if PM
45 select SAMSUNG_HRT
46 help 44 help
47 Support for the S3C2412 and S3C2413 SoCs from the S3C24XX line 45 Support for the S3C2412 and S3C2413 SoCs from the S3C24XX line
48 46
@@ -54,7 +52,6 @@ config CPU_S3C2416
54 select S3C2443_COMMON 52 select S3C2443_COMMON
55 select S3C2443_DMA if S3C24XX_DMA 53 select S3C2443_DMA if S3C24XX_DMA
56 select SAMSUNG_CLKSRC 54 select SAMSUNG_CLKSRC
57 select SAMSUNG_HRT
58 help 55 help
59 Support for the S3C2416 SoC from the S3C24XX line 56 Support for the S3C2416 SoC from the S3C24XX line
60 57
@@ -65,7 +62,6 @@ config CPU_S3C2440
65 select S3C2410_CLOCK 62 select S3C2410_CLOCK
66 select S3C2410_PM if PM 63 select S3C2410_PM if PM
67 select S3C2440_DMA if S3C24XX_DMA 64 select S3C2440_DMA if S3C24XX_DMA
68 select SAMSUNG_HRT
69 help 65 help
70 Support for S3C2440 Samsung Mobile CPU based systems. 66 Support for S3C2440 Samsung Mobile CPU based systems.
71 67
@@ -75,7 +71,6 @@ config CPU_S3C2442
75 select CPU_LLSERIAL_S3C2440 71 select CPU_LLSERIAL_S3C2440
76 select S3C2410_CLOCK 72 select S3C2410_CLOCK
77 select S3C2410_PM if PM 73 select S3C2410_PM if PM
78 select SAMSUNG_HRT
79 help 74 help
80 Support for S3C2442 Samsung Mobile CPU based systems. 75 Support for S3C2442 Samsung Mobile CPU based systems.
81 76
@@ -91,7 +86,6 @@ config CPU_S3C2443
91 select S3C2443_COMMON 86 select S3C2443_COMMON
92 select S3C2443_DMA if S3C24XX_DMA 87 select S3C2443_DMA if S3C24XX_DMA
93 select SAMSUNG_CLKSRC 88 select SAMSUNG_CLKSRC
94 select SAMSUNG_HRT
95 help 89 help
96 Support for the S3C2443 SoC from the S3C24XX line 90 Support for the S3C2443 SoC from the S3C24XX line
97 91
diff --git a/arch/arm/mach-s3c24xx/common.c b/arch/arm/mach-s3c24xx/common.c
index e5e7d7dee6f2..457261c98433 100644
--- a/arch/arm/mach-s3c24xx/common.c
+++ b/arch/arm/mach-s3c24xx/common.c
@@ -245,6 +245,22 @@ void __init s3c24xx_init_io(struct map_desc *mach_desc, int size)
245 samsung_pwm_set_platdata(&s3c24xx_pwm_variant); 245 samsung_pwm_set_platdata(&s3c24xx_pwm_variant);
246} 246}
247 247
248void __init samsung_set_timer_source(unsigned int event, unsigned int source)
249{
250 s3c24xx_pwm_variant.output_mask = BIT(SAMSUNG_PWM_NUM) - 1;
251 s3c24xx_pwm_variant.output_mask &= ~(BIT(event) | BIT(source));
252}
253
254void __init samsung_timer_init(void)
255{
256 unsigned int timer_irqs[SAMSUNG_PWM_NUM] = {
257 IRQ_TIMER0, IRQ_TIMER1, IRQ_TIMER2, IRQ_TIMER3, IRQ_TIMER4,
258 };
259
260 samsung_pwm_clocksource_init(S3C_VA_TIMER,
261 timer_irqs, &s3c24xx_pwm_variant);
262}
263
248/* Serial port registrations */ 264/* Serial port registrations */
249 265
250#define S3C2410_PA_UART0 (S3C24XX_PA_UART) 266#define S3C2410_PA_UART0 (S3C24XX_PA_UART)