Skip to content
Commit 740e237a authored by Linus Walleij's avatar Linus Walleij Committed by Daniel Lezcano
Browse files

clocksource/drivers/fttmr010: Optimize sched_clock()



The sched_clock() call should be really fast so we want to
avoid an extra if() clause on the read path if possible.

Implement two sched_clock_read() functions, one if the timer
counts up and one if it counts down. Incidentally this also
mirrors how clocksource_mmio_init() works and make things
simple and easy to understand.

Suggested-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Cc: Andrew Jeffery <andrew@aj.id.au>
Cc: Joel Stanley <joel@jms.id.au>
Cc: Jonas Jensen <jonas.jensen@gmail.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
parent 8b7a3b56
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment