Skip to content

Commit

Permalink
clocksource: samsung_pwm_timer: Use proper clockevents max_delta
Browse files Browse the repository at this point in the history
This patch replaces hardcoded -1 argument passed to
clockevents_config_and_register() with tcnt_max calculated based on
variant data.

This fixes invalid max delta configuration for 16-bit timers of s3c24xx.

Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
  • Loading branch information
Tomasz Figa authored and Olof Johansson committed Apr 28, 2013
1 parent f9bb48a commit e9b852b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/clocksource/samsung_pwm_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,8 @@ static void __init samsung_clockevent_init(void)
pwm.clock_count_per_tick = clock_rate / HZ;

time_event_device.cpumask = cpumask_of(0);
clockevents_config_and_register(&time_event_device, clock_rate, 1, -1);
clockevents_config_and_register(&time_event_device,
clock_rate, 1, pwm.tcnt_max);

irq_number = pwm.irq[pwm.event_id];
setup_irq(irq_number, &samsung_clock_event_irq);
Expand Down

0 comments on commit e9b852b

Please sign in to comment.