aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/timer/hpet.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/dev/timer/hpet.c b/sys/dev/timer/hpet.c
index 9e9180f..f5b1621 100644
--- a/sys/dev/timer/hpet.c
+++ b/sys/dev/timer/hpet.c
@@ -31,6 +31,7 @@
#include <firmware/acpi/acpi.h>
#include <sys/panic.h>
#include <sys/cdefs.h>
+#include <sys/timer.h>
#include <sys/syslog.h>
#include <sys/mmio.h>
@@ -62,6 +63,7 @@ __KERNEL_META("$Vega$: hpet.c, Ian Marco Moffett, "
#define spinwait_hint() __nothing
#endif /* defined(__x86_64__) */
+static struct timer timer = { 0 };
static struct hpet *acpi_hpet = NULL;
static void *hpet_base = NULL;
static bool is_faulty = false;
@@ -177,6 +179,12 @@ hpet_init(void)
hpet_write(HPET_REG_MAIN_COUNTER, 0);
hpet_write(HPET_GENERAL_CONFIG, 1);
+ /* Setup the timer descriptor */
+ timer.name = "HIGH_PRECISION_EVENT_TIMER";
+ timer.msleep = hpet_msleep;
+ timer.usleep = hpet_usleep;
+ timer.nsleep = hpet_nsleep;
+
/* Not faulty */
is_faulty = false;
return 0;