aboutsummaryrefslogtreecommitdiff
path: root/hw/watchdog/wdt_i6300esb.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2015-09-25 18:03:19 +0100
committerPeter Maydell <peter.maydell@linaro.org>2015-09-25 18:03:19 +0100
commit690b286fefa806f130dfc1931b5ba0b4dd2fb415 (patch)
treeccea2619650e9e981a81429769111746237d2587 /hw/watchdog/wdt_i6300esb.c
parentcdf98182420e3bec62e2fd957eb8a17761161c0f (diff)
parentab60b7485cece312ad9c21327ee678f0f9898fb5 (diff)
Merge remote-tracking branch 'remotes/vivier-misc/tags/pull-muldiv64-20150925' into staging
Remove muldiv64() by using period instead of frequency # gpg: Signature made Fri 25 Sep 2015 14:54:37 BST using RSA key ID 3F2FBE3C # gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" # gpg: aka "Laurent Vivier <laurent@vivier.eu>" # gpg: aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F 5173 F30C 38BD 3F2F BE3C * remotes/vivier-misc/tags/pull-muldiv64-20150925: net: remove muldiv64() bt: remove muldiv64() hpet: remove muldiv64() arm: clarify the use of muldiv64() openrisc: remove muldiv64() mips: remove muldiv64() pcnet: remove muldiv64() rtl8139: remove muldiv64() i6300esb: remove muldiv64() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/watchdog/wdt_i6300esb.c')
-rw-r--r--hw/watchdog/wdt_i6300esb.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/hw/watchdog/wdt_i6300esb.c b/hw/watchdog/wdt_i6300esb.c
index 3e07d44878..a91c8fdad0 100644
--- a/hw/watchdog/wdt_i6300esb.c
+++ b/hw/watchdog/wdt_i6300esb.c
@@ -129,14 +129,9 @@ static void i6300esb_restart_timer(I6300State *d, int stage)
else
timeout <<= 5;
- /* Get the timeout in units of ticks_per_sec.
- *
- * ticks_per_sec is typically 10^9 == 0x3B9ACA00 (30 bits), with
- * 20 bits of user supplied preload, and 15 bits of scale, the
- * multiply here can exceed 64-bits, before we divide by 33MHz, so
- * we use a higher-precision intermediate result.
- */
- timeout = muldiv64(timeout, get_ticks_per_sec(), 33000000);
+ /* Get the timeout in nanoseconds. */
+
+ timeout = timeout * 30; /* on a PCI bus, 1 tick is 30 ns*/
i6300esb_debug("stage %d, timeout %" PRIi64 "\n", d->stage, timeout);