summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-versatile
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2010-01-14 20:07:35 +0000
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-05-02 09:35:36 +0100
commitf5fc00826d1e60af0e22cb9f65b933d823a8ed84 (patch)
treebcff2df77e951dbfc0833cda47620ee3c65694ac /arch/arm/mach-versatile
parent6be4826e37122b25cb10b215fc84c3a0b1fe1402 (diff)
downloadop-kernel-dev-f5fc00826d1e60af0e22cb9f65b933d823a8ed84.zip
op-kernel-dev-f5fc00826d1e60af0e22cb9f65b933d823a8ed84.tar.gz
ARM: Realview/Versatile: separate out common sched_clock()
Provide a common sched_clock() implementation for Versatile and Realview. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-versatile')
-rw-r--r--arch/arm/mach-versatile/core.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c
index b68ddd3..490fc75 100644
--- a/arch/arm/mach-versatile/core.c
+++ b/arch/arm/mach-versatile/core.c
@@ -28,7 +28,6 @@
#include <linux/amba/clcd.h>
#include <linux/amba/pl061.h>
#include <linux/amba/mmci.h>
-#include <linux/cnt32_to_63.h>
#include <linux/io.h>
#include <asm/clkdev.h>
@@ -227,27 +226,6 @@ void __init versatile_map_io(void)
iotable_init(versatile_io_desc, ARRAY_SIZE(versatile_io_desc));
}
-#define VERSATILE_REFCOUNTER (__io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_24MHz_OFFSET)
-
-/*
- * This is the Versatile sched_clock implementation. This has
- * a resolution of 41.7ns, and a maximum value of about 35583 days.
- *
- * The return value is guaranteed to be monotonic in that range as
- * long as there is always less than 89 seconds between successive
- * calls to this function.
- */
-unsigned long long sched_clock(void)
-{
- unsigned long long v = cnt32_to_63(readl(VERSATILE_REFCOUNTER));
-
- /* the <<1 gets rid of the cnt_32_to_63 top bit saving on a bic insn */
- v *= 125<<1;
- do_div(v, 3<<1);
-
- return v;
-}
-
#define VERSATILE_FLASHCTRL (__io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_FLASH_OFFSET)
OpenPOWER on IntegriCloud