diff --git a/sys/arm/arm/generic_timer.c b/sys/arm/arm/generic_timer.c --- a/sys/arm/arm/generic_timer.c +++ b/sys/arm/arm/generic_timer.c @@ -800,26 +800,18 @@ BUS_PASS_TIMER + BUS_PASS_ORDER_MIDDLE); #endif -static int64_t +static uint64_t arm_tmr_get_counts(int usec) { - int64_t counts, counts_per_usec; + uint64_t counts_per_usec; + + if (usec < 0) + return (0); /* Get the number of times to count */ counts_per_usec = ((arm_tmr_timecount.tc_frequency / 1000000) + 1); - /* - * Clamp the timeout at a maximum value (about 32 seconds with - * a 66MHz clock). *Nobody* should be delay()ing for anywhere - * near that length of time and if they are, they should be hung - * out to dry. - */ - if (usec >= (0x80000000U / counts_per_usec)) - counts = (0x80000000U / counts_per_usec) - 1; - else - counts = usec * counts_per_usec; - - return counts; + return (usec * counts_per_usec); } static void