diff options
Diffstat (limited to 'sys/arch/armish/stand/boot/time.c')
-rw-r--r-- | sys/arch/armish/stand/boot/time.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/arch/armish/stand/boot/time.c b/sys/arch/armish/stand/boot/time.c new file mode 100644 index 00000000000..1b0e9fcc838 --- /dev/null +++ b/sys/arch/armish/stand/boot/time.c @@ -0,0 +1,12 @@ +#include <sys/types.h> + +#include "libsa.h" + +time_t +getsecs(void) +{ + uint32_t count; + + __asm volatile ("mrc p6, 0, %0, c3, c1, 0" : "=r" (count)); + return ((0xffffffff - count) / 12500000); +} |