From: Sean Anderson <seanga2@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH 3/7] wdt: dw: Fix clock rate being off by 1000
Date: Wed, 5 Aug 2020 15:14:09 -0400 [thread overview]
Message-ID: <20200805191414.146609-3-seanga2@gmail.com> (raw)
In-Reply-To: <20200805191414.146609-1-seanga2@gmail.com>
The clock subsystem returns clock rates in Hz. We need to divide by 1000 so
the rate is in kHz.
Fixes: cf89ef8d10f240554541c20b2e1bdcdd58d1d7e6
Signed-off-by: Sean Anderson <seanga2@gmail.com>
---
drivers/watchdog/designware_wdt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/watchdog/designware_wdt.c b/drivers/watchdog/designware_wdt.c
index 1d46382f67..c7a0c896b8 100644
--- a/drivers/watchdog/designware_wdt.c
+++ b/drivers/watchdog/designware_wdt.c
@@ -129,7 +129,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
--
2.27.0
next prev parent reply other threads:[~2020-08-05 19:14 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-05 19:14 [PATCH 1/7] wdt: dw: Switch to using fls for log2 Sean Anderson
2020-08-05 19:14 ` [PATCH 2/7] wdt: dw: Switch to if(CONFIG()) instead of using #if Sean Anderson
2020-08-05 21:10 ` Heinrich Schuchardt
2020-08-05 19:14 ` Sean Anderson [this message]
2020-08-16 3:39 ` [PATCH 3/7] wdt: dw: Fix clock rate being off by 1000 Simon Glass
2020-08-05 19:14 ` [PATCH 4/7] wdt: dw: Enable the clock before using it Sean Anderson
2020-08-16 3:39 ` Simon Glass
2020-08-05 19:14 ` [PATCH 5/7] wdt: dw: Free the clock on error Sean Anderson
2020-08-16 3:39 ` Simon Glass
2020-08-05 19:14 ` [PATCH 6/7] riscv: Add watchdog bindings for the k210 Sean Anderson
2020-08-05 19:14 ` [PATCH 7/7] riscv: Enable watchdog " Sean Anderson
2020-08-05 21:06 ` [PATCH 1/7] wdt: dw: Switch to using fls for log2 Heinrich Schuchardt
2020-08-05 22:14 ` Sean Anderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200805191414.146609-3-seanga2@gmail.com \
--to=seanga2@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox