]> Zhao Yanbai Git Server - minix.git/commit
ARM: provide free running clock to replace ccnt 84/284/2
authorThomas Veerman <thomas@minix3.org>
Tue, 29 Jan 2013 19:58:00 +0000 (20:58 +0100)
committerThomas Veerman <thomas@minix3.org>
Thu, 31 Jan 2013 15:19:11 +0000 (15:19 +0000)
commitdb8c1ee9d00c2376197c7508f7599ab2f7637f21
treec7602829a2e1e50046fd6c883b4c5c926166fd73
parente3e5cf6d34284a84489ea4f81301af1c81cd163f
ARM: provide free running clock to replace ccnt

The Cycle CouNTer on ARM cannot be used reliably as it wraps around
rather quickly and can be altered by user space (on Minix). Furthermore,
it's buggy when wrapping and is not implemented at all on the Linaro
Beagleboard emulator.

This patch programs GPTIMER10 as a free running clock at 1.625 MHz (it
doesn't generate interrupts). It's memory mapped into every process,
which enables libsys to provide micro_delay().

Change-Id: Iba004c6c62976762fe154ea390d69e518eec1531
12 files changed:
include/minix/sysutil.h
include/minix/type.h
kernel/arch/earm/arch_clock.c
kernel/arch/earm/memory.c
kernel/arch/earm/omap_timer.c
kernel/arch/earm/omap_timer.h
kernel/arch/earm/omap_timer_registers.h [new file with mode: 0644]
kernel/arch/i386/memory.c
lib/libsys/arch/earm/Makefile.inc
lib/libsys/arch/earm/frclock_util.c [new file with mode: 0644]
lib/libsys/arch/earm/spin.c [new file with mode: 0644]
lib/libsys/arch/earm/tsc_util.c