From 4280506ac9bb17f2450cf1042edf929d26d24a8e Mon Sep 17 00:00:00 2001 From: Tomasz Figa Date: Sun, 28 Apr 2013 02:25:01 +0200 Subject: 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 Reviewed-by: Daniel Lezcano Reviewed-by: Sylwester Nawrocki Tested-by: Heiko Stuebner Tested-by: Mark Brown Tested-by: Sylwester Nawrocki Acked-by: Arnd Bergmann --- arch/arm/mach-s5p64x0/common.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'arch/arm/mach-s5p64x0/common.c') diff --git a/arch/arm/mach-s5p64x0/common.c b/arch/arm/mach-s5p64x0/common.c index 49687f277108..42e14f2e7ca7 100644 --- a/arch/arm/mach-s5p64x0/common.c +++ b/arch/arm/mach-s5p64x0/common.c @@ -166,6 +166,23 @@ static struct samsung_pwm_variant s5p64x0_pwm_variant = { .tclk_mask = 0, }; +void __init samsung_set_timer_source(unsigned int event, unsigned int source) +{ + s5p64x0_pwm_variant.output_mask = BIT(SAMSUNG_PWM_NUM) - 1; + s5p64x0_pwm_variant.output_mask &= ~(BIT(event) | BIT(source)); +} + +void __init samsung_timer_init(void) +{ + unsigned int timer_irqs[SAMSUNG_PWM_NUM] = { + IRQ_TIMER0_VIC, IRQ_TIMER1_VIC, IRQ_TIMER2_VIC, + IRQ_TIMER3_VIC, IRQ_TIMER4_VIC, + }; + + samsung_pwm_clocksource_init(S3C_VA_TIMER, + timer_irqs, &s5p64x0_pwm_variant); +} + /* * s5p64x0_map_io * -- cgit v1.2.3-55-g7522