From: Marc Zyngier Date: Mon, 8 Apr 2019 15:49:02 +0000 (+0100) Subject: watchdog/sbsa: Use arch_timer_read_counter instead of arch_counter_get_cntvct X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=eae1ddc615bef9e1a1958a4b867a0a1678049bb3;p=openwrt%2Fstaging%2Fblogic.git 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: Mark Rutland Reviewed-by: Guenter Roeck Signed-off-by: Marc Zyngier Signed-off-by: Will Deacon --- diff --git a/drivers/watchdog/sbsa_gwdt.c b/drivers/watchdog/sbsa_gwdt.c index e8bd9887c566..e221e47396ab 100644 --- a/drivers/watchdog/sbsa_gwdt.c +++ b/drivers/watchdog/sbsa_gwdt.c @@ -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);