watchdog/sbsa: Use arch_timer_read_counter instead of arch_counter_get_cntvct
authorMarc Zyngier <marc.zyngier@arm.com>
Mon, 8 Apr 2019 15:49:02 +0000 (16:49 +0100)
committerWill Deacon <will.deacon@arm.com>
Tue, 30 Apr 2019 15:09:27 +0000 (16:09 +0100)
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: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
drivers/watchdog/sbsa_gwdt.c

index e8bd9887c56638aaf81659c45d7505c424266b55..e221e47396ab72ddd8615ce81c8c6f7d9247d941 100644 (file)
@@ -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);