Skip to content

Commit bb26081

Browse files
nicstangeMichal Simek
authored andcommitted
microblaze: Set ->min_delta_ticks and ->max_delta_ticks for timer
In preparation for making the clockevents core NTP correction aware, all clockevent device drivers must set ->min_delta_ticks and ->max_delta_ticks rather than ->min_delta_ns and ->max_delta_ns: a clockevent device's rate is going to change dynamically and thus, the ratio of ns to ticks ceases to stay invariant. Make the microblaze arch's clockevent driver initialize these fields properly. This patch alone doesn't introduce any change in functionality as the clockevents core still looks exclusively at the (untouched) ->min_delta_ns and ->max_delta_ns. As soon as this has changed, a followup patch will purge the initialization of ->min_delta_ns and ->max_delta_ns from this driver. Signed-off-by: Nicolai Stange <nicstange@gmail.com> Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
1 parent e56751c commit bb26081

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/microblaze/kernel/timer.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,10 @@ static __init int xilinx_clockevent_init(void)
178178
clockevent_xilinx_timer.shift);
179179
clockevent_xilinx_timer.max_delta_ns =
180180
clockevent_delta2ns((u32)~0, &clockevent_xilinx_timer);
181+
clockevent_xilinx_timer.max_delta_ticks = (u32)~0;
181182
clockevent_xilinx_timer.min_delta_ns =
182183
clockevent_delta2ns(1, &clockevent_xilinx_timer);
184+
clockevent_xilinx_timer.min_delta_ticks = 1;
183185
clockevent_xilinx_timer.cpumask = cpumask_of(0);
184186
clockevents_register_device(&clockevent_xilinx_timer);
185187

0 commit comments

Comments
 (0)