2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
6 #include <hardware/pit.h>
8 #include "kernel_base.h"
9 #include "kernel_debug.h"
10 #include "kernel_timer.h"
14 /* See timer/ticks.c for the explanation */
15 static const unsigned int timer_rpr
= 3599597124UL;
17 static inline unsigned int usec2tick(unsigned int usec
)
21 asm volatile("divl %2":"+a"(ret
),"+d"(usec
):"m"(timer_rpr
));
25 void pit_udelay(unsigned int usec
)
27 unsigned int start
= usec2tick(usec
);
29 D(bug("[PIT] udelay: %d usec = %d ticks\n", usec
, start
));