Skip to content
Browse files

drivers: wdog_cmsdk_apb: Get clock frequency from DTS

The wdog_cmsdk_apb driver used system clock frequency
as a base for timeout calculation. This commit corrects
that by obtaining the needed value from DTS.

Signed-off-by: Piotr Zięcik <>
  • Loading branch information...
pizi-nordic authored and carlescufi committed Apr 11, 2019
1 parent 08f8abc commit a901e32a3887aee0ced0d0c81bc523ed1d3c3a47
Showing with 2 additions and 1 deletion.
  1. +2 −1 drivers/watchdog/wdt_cmsdk_apb.c
@@ -110,7 +110,8 @@ static int wdog_cmsdk_apb_install_timeout(struct device *dev,

/* Reload value */
reload_s = config->window.max * CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC;
reload_s = config->window.max *
flags = config->flags;

wdog->load = reload_s;

0 comments on commit a901e32

Please sign in to comment.
You can’t perform that action at this time.