diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-01-14 15:07:35 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-05-02 04:35:36 -0400 |
commit | f5fc00826d1e60af0e22cb9f65b933d823a8ed84 (patch) | |
tree | bcff2df77e951dbfc0833cda47620ee3c65694ac /arch/arm/mach-realview | |
parent | 6be4826e37122b25cb10b215fc84c3a0b1fe1402 (diff) |
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-realview')
-rw-r--r-- | arch/arm/mach-realview/core.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c index 80b8142463c1..f97f001e874b 100644 --- a/arch/arm/mach-realview/core.c +++ b/arch/arm/mach-realview/core.c | |||
@@ -53,8 +53,6 @@ | |||
53 | 53 | ||
54 | #include "core.h" | 54 | #include "core.h" |
55 | 55 | ||
56 | #define REALVIEW_REFCOUNTER (__io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_24MHz_OFFSET) | ||
57 | |||
58 | /* used by entry-macro.S and platsmp.c */ | 56 | /* used by entry-macro.S and platsmp.c */ |
59 | void __iomem *gic_cpu_base_addr; | 57 | void __iomem *gic_cpu_base_addr; |
60 | 58 | ||
@@ -77,20 +75,6 @@ void __init realview_adjust_zones(int node, unsigned long *size, | |||
77 | } | 75 | } |
78 | #endif | 76 | #endif |
79 | 77 | ||
80 | /* | ||
81 | * This is the RealView sched_clock implementation. This has | ||
82 | * a resolution of 41.7ns, and a maximum value of about 179s. | ||
83 | */ | ||
84 | unsigned long long sched_clock(void) | ||
85 | { | ||
86 | unsigned long long v; | ||
87 | |||
88 | v = (unsigned long long)readl(REALVIEW_REFCOUNTER) * 125; | ||
89 | do_div(v, 3); | ||
90 | |||
91 | return v; | ||
92 | } | ||
93 | |||
94 | 78 | ||
95 | #define REALVIEW_FLASHCTRL (__io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_FLASH_OFFSET) | 79 | #define REALVIEW_FLASHCTRL (__io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_FLASH_OFFSET) |
96 | 80 | ||