summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@xilinx.com>2018-04-19 15:22:04 +0200
committerMichal Simek <michal.simek@xilinx.com>2018-05-11 09:23:43 +0200
commit5b410deac6023338a658e0085c744b29f9880fbe (patch)
treeaab2fed58aec28f213b66db83a6fa751b1eca4ad
parente00656b2a911be40745e6556cb663096f439bc8d (diff)
watchdog: cadence: Show used timeout value
Debug message was showing timeout value which was passed to start function but there is a checking if this value can be setup. The patch is moving this debug printf function below checking. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
-rw-r--r--drivers/watchdog/cdns_wdt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/watchdog/cdns_wdt.c b/drivers/watchdog/cdns_wdt.c
index fb045fcdd5..9a07fa10fd 100644
--- a/drivers/watchdog/cdns_wdt.c
+++ b/drivers/watchdog/cdns_wdt.c
@@ -142,13 +142,13 @@ static int cdns_wdt_start(struct udevice *dev, u64 timeout, ulong flags)
return -1;
}
- debug("%s: CLK_FREQ %ld, timeout %lld\n", __func__, clk_f, timeout);
-
if ((timeout < CDNS_WDT_MIN_TIMEOUT) ||
(timeout > CDNS_WDT_MAX_TIMEOUT)) {
timeout = priv->timeout;
}
+ debug("%s: CLK_FREQ %ld, timeout %lld\n", __func__, clk_f, timeout);
+
if (clk_f <= CDNS_WDT_CLK_75MHZ) {
prescaler = CDNS_WDT_PRESCALE_512;
ctrl_clksel = CDNS_WDT_PRESCALE_SELECT_512;