]> git.sur5r.net Git - u-boot/commitdiff
watchdog: cadence: Show used timeout value
authorMichal Simek <michal.simek@xilinx.com>
Thu, 19 Apr 2018 13:22:04 +0000 (15:22 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Fri, 11 May 2018 07:23:43 +0000 (09:23 +0200)
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>
drivers/watchdog/cdns_wdt.c

index fb045fcdd53f5f0f6179b74cb9194f877c5d8f9c..9a07fa10fd9b7d644224345fcb2bb4c0bbc2a541 100644 (file)
@@ -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;