From: Sean Anderson Date: Thu, 11 Mar 2021 02:02:19 +0000 (-0500) Subject: wdt: dw: Enable the clock before using it X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=4cb0ab4ebcffbeee93d9bdb4e8ee831e16bc8d2c;p=u-boot.git wdt: dw: Enable the clock before using it The watchdog won't work if the clock isn't enabled. Fixes: cf89ef8d10f240554541c20b2e1bdcdd58d1d7e6 Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- diff --git a/drivers/watchdog/designware_wdt.c b/drivers/watchdog/designware_wdt.c index a65487d4f3..709a67fbc3 100644 --- a/drivers/watchdog/designware_wdt.c +++ b/drivers/watchdog/designware_wdt.c @@ -129,6 +129,10 @@ static int designware_wdt_probe(struct udevice *dev) if (ret) return ret; + ret = clk_enable(&clk); + if (ret) + return ret; + priv->clk_khz = clk_get_rate(&clk) / 1000; if (!priv->clk_khz) return -EINVAL;