summary refs log tree commit diff stats
path: root/include/hw/timer
diff options
context:
space:
mode:
authorLaurent Vivier <lvivier@redhat.com>2015-08-25 17:13:01 +0200
committerLaurent Vivier <lvivier@redhat.com>2015-09-25 14:56:05 +0200
commit0a4f9240f5b8b1bfe2d5c5c2748545bc23771bb4 (patch)
tree31b198f7c8c1d4bbdb0530278766a422c8a0bc2c /include/hw/timer
parent352c98e502893dee405d0bd8301264fca3b79179 (diff)
downloadfocaccia-qemu-0a4f9240f5b8b1bfe2d5c5c2748545bc23771bb4.tar.gz
focaccia-qemu-0a4f9240f5b8b1bfe2d5c5c2748545bc23771bb4.zip
hpet: remove muldiv64()
hpet defines a clock period in femtoseconds but
then converts it to nanoseconds to use the internal
timers.

We can define the period in nanoseconds and use it
directly, this allows to remove muldiv64().

We only need to convert the period to femtoseconds
to put it in internal hpet capability register.

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/hw/timer')
-rw-r--r--include/hw/timer/hpet.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/hw/timer/hpet.h b/include/hw/timer/hpet.h
index 773953be75..d872909ce1 100644
--- a/include/hw/timer/hpet.h
+++ b/include/hw/timer/hpet.h
@@ -16,9 +16,9 @@
 #include "qom/object.h"
 
 #define HPET_BASE               0xfed00000
-#define HPET_CLK_PERIOD         10000000ULL /* 10000000 femtoseconds == 10ns*/
+#define HPET_CLK_PERIOD         10 /* 10 ns*/
 
-#define FS_PER_NS 1000000
+#define FS_PER_NS 1000000       /* 1000000 femtoseconds == 1 ns */
 #define HPET_MIN_TIMERS         3
 #define HPET_MAX_TIMERS         32