From b36dd1e38cf17ce4f3cbc0956f6f7f6a54a36333 Mon Sep 17 00:00:00 2001 From: cheloha Date: Sun, 22 Jan 2023 18:36:38 +0000 Subject: [PATCH] gptimer(4): remove dead MD microtime(9) implementation --- sys/arch/armv7/omap/gptimer.c | 41 +---------------------------------- 1 file changed, 1 insertion(+), 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 * @@ -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) { -- 2.20.1