diff options
author | Scott Soule Cheloha <cheloha@cvs.openbsd.org> | 2023-01-22 18:36:39 +0000 |
---|---|---|
committer | Scott Soule Cheloha <cheloha@cvs.openbsd.org> | 2023-01-22 18:36:39 +0000 |
commit | 245b16b536e1f411a6287472c29ce3dd7d52dfdf (patch) | |
tree | c6b75db216a2120a6c0f453b8ca5e9ea3fac997b | |
parent | c371947dedabc0c4a1e6bad9cc3f26d24c8fb305 (diff) |
gptimer(4): remove dead MD microtime(9) implementation
-rw-r--r-- | sys/arch/armv7/omap/gptimer.c | 41 |
1 files changed, 1 insertions, 40 deletions
diff --git a/sys/arch/armv7/omap/gptimer.c b/sys/arch/armv7/omap/gptimer.c index 459112c34b0..c0e4a6cbfd9 100644 --- a/sys/arch/armv7/omap/gptimer.c +++ b/sys/arch/armv7/omap/gptimer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gptimer.c,v 1.16 2022/02/21 10:57:58 jsg Exp $ */ +/* $OpenBSD: gptimer.c,v 1.17 2023/01/22 18:36:38 cheloha Exp $ */ /* * Copyright (c) 2007,2009 Dale Rahn <drahn@openbsd.org> * @@ -328,45 +328,6 @@ gptimer_wait(int reg) ; } -#if 0 -void -microtime(struct timeval *tvp) -{ - int s; - int deltacnt; - u_int32_t counter, expected; - s = splhigh(); - - if (1) { /* not inited */ - tvp->tv_sec = 0; - tvp->tv_usec = 0; - return; - } - s = splhigh(); - counter = bus_space_read_4(gptimer_iot, gptimer_ioh1, GP_TCRR); - expected = nexttickevent; - - *tvp = time; - splx(s); - - deltacnt = counter - expected + ticks_per_intr; - -#if 1 - /* low frequency timer algorithm */ - tvp->tv_usec += deltacnt * 1000000ULL / TIMER_FREQUENCY; -#else - /* high frequency timer algorithm - XXX */ - tvp->tv_usec += deltacnt / (TIMER_FREQUENCY / 1000000ULL); -#endif - - while (tvp->tv_usec >= 1000000) { - tvp->tv_sec++; - tvp->tv_usec -= 1000000; - } - -} -#endif - void gptimer_delay(u_int usecs) { |