With new interface timecounter_initialize we can initialize timecounter fields and underlying cyclecounter together. Update xilinx_tc init with this new function.
Signed-off-by: Sagar Arun Kamble <[email protected]> Cc: Richard Cochran <[email protected]> Cc: Michal Simek <[email protected]> Cc: Daniel Lezcano <[email protected]> Cc: Neil Armstrong <[email protected]> Cc: Nicolai Stange <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Rob Herring <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] --- arch/microblaze/kernel/timer.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/arch/microblaze/kernel/timer.c b/arch/microblaze/kernel/timer.c index b7f89e9..b32a896 100644 --- a/arch/microblaze/kernel/timer.c +++ b/arch/microblaze/kernel/timer.c @@ -204,20 +204,21 @@ static u64 xilinx_cc_read(const struct cyclecounter *cc) return xilinx_read(NULL); } -static struct timecounter xilinx_tc = { - .cc.read = xilinx_cc_read, - .cc.mask = CLOCKSOURCE_MASK(32), - .cc.mult = 0, - .cc.shift = 8, -}; +static struct timecounter xilinx_tc; static int __init init_xilinx_timecounter(void) { - struct cyclecounter *cc = &xilinx_tc.cc; + u32 mult = 0; + u32 shift = 8; - cc->mult = div_sc(timer_clock_freq, NSEC_PER_SEC, cc->shift); + mult = div_sc(timer_clock_freq, NSEC_PER_SEC, shift); - timecounter_init(&xilinx_tc, sched_clock()); + timecounter_initialize(&xilinx_tc, + xilinx_cc_read, + CLOCKSOURCE_MASK(32), + mult, + shift, + sched_clock()); return 0; } -- 1.9.1

