mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-24 13:43:28 +00:00
wdt: designware: fix timeout calculation due to expecting KHz
The timeout calculation is based on the clk being in KHz but the clk api returns the clk value in Hz. Convert this to KHz to calculate the correct timeout value. Signed-off-by: Jack Mitchell <ml@embed.me.uk>
This commit is contained in:
parent
0eabb2ff23
commit
d9b9c91b5d
1 changed files with 1 additions and 1 deletions
|
@ -130,7 +130,7 @@ static int designware_wdt_probe(struct udevice *dev)
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
priv->clk_khz = clk_get_rate(&clk);
|
||||
priv->clk_khz = clk_get_rate(&clk) / 1000;
|
||||
if (!priv->clk_khz)
|
||||
return -EINVAL;
|
||||
#else
|
||||
|
|
Loading…
Reference in a new issue