diff options
author | Tomasz Figa <tomasz.figa@gmail.com> | 2013-04-27 20:25:01 -0400 |
---|---|---|
committer | Tomasz Figa <tomasz.figa@gmail.com> | 2013-08-05 19:21:46 -0400 |
commit | 4280506ac9bb17f2450cf1042edf929d26d24a8e (patch) | |
tree | 363304c12a68b8066c1f52caa46e6070603f446b /arch/arm/mach-s3c24xx/common.c | |
parent | 1c161fd0d453ff63c8bb3a703d46d10ac5eba7a4 (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/common.c')
-rw-r--r-- | arch/arm/mach-s3c24xx/common.c | 16 |
1 files changed, 16 insertions, 0 deletions
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 | ||
248 | void __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 | |||
254 | void __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) |