clocksource/drivers/timer-ti-dm: Simplify register reads with dmtimer_read()
authorTony Lindgren <tony@atomide.com>
Mon, 15 Aug 2022 13:12:43 +0000 (16:12 +0300)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Tue, 20 Sep 2022 08:49:45 +0000 (10:49 +0200)
commit90c9aada19606ae78259cef78a46646a97ec8f67
tree44af32cd0409a258d013d41728495b71e4554006
parentcaa590067efd659d8811ad8904489536912ebc53
clocksource/drivers/timer-ti-dm: Simplify register reads with dmtimer_read()

We can simplify register read access by checking for the register write
posted mode in the read function. This way we can combine the functions
for __omap_dm_timer_read() and omap_dm_timer_read_reg() into a single
function dmtimer_read().

We update the shared register access first, the timer revision specific
register access will be updated in a later patch.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Janusz Krzysztofik <jmkrzyszt@gmail.com>
Link: https://lore.kernel.org/r/20220815131250.34603-3-tony@atomide.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/clocksource/timer-ti-dm.c