Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eae1ddc6 authored by Marc Zyngier's avatar Marc Zyngier Committed by Will Deacon
Browse files

watchdog/sbsa: Use arch_timer_read_counter instead of arch_counter_get_cntvct



Only arch_timer_read_counter will guarantee that workarounds are
applied. So let's use this one instead of arch_counter_get_cntvct.

Acked-by: default avatarMark Rutland <mark.rutland@arm.com>
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
parent 1f5b62f0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -161,7 +161,7 @@ static unsigned int sbsa_gwdt_get_timeleft(struct watchdog_device *wdd)
		timeleft += readl(gwdt->control_base + SBSA_GWDT_WOR);

	timeleft += lo_hi_readq(gwdt->control_base + SBSA_GWDT_WCV) -
		    arch_counter_get_cntvct();
		    arch_timer_read_counter();

	do_div(timeleft, gwdt->clk);