diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-01-05 13:09:03 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-01-05 13:09:03 -0500 |
commit | 58daf18cdcab550262a5f4681e1f1e073e21965a (patch) | |
tree | 2096324b947761a567dd451f33664f17ee1de2cd /arch/arm/mach-sa1100/generic.c | |
parent | aa312be1987d43216e72ffce42bccf6bf81f62ed (diff) | |
parent | 0af85dda39d9b673aca8c0ebae004ea70f3efc93 (diff) |
Merge branch 'clksrc' into devel
Conflicts:
arch/arm/mach-vexpress/v2m.c
arch/arm/plat-omap/counter_32k.c
arch/arm/plat-versatile/Makefile
Diffstat (limited to 'arch/arm/mach-sa1100/generic.c')
-rw-r--r-- | arch/arm/mach-sa1100/generic.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c index 3555d616774c..59d14f0fdcf8 100644 --- a/arch/arm/mach-sa1100/generic.c +++ b/arch/arm/mach-sa1100/generic.c | |||
@@ -16,9 +16,7 @@ | |||
16 | #include <linux/pm.h> | 16 | #include <linux/pm.h> |
17 | #include <linux/cpufreq.h> | 17 | #include <linux/cpufreq.h> |
18 | #include <linux/ioport.h> | 18 | #include <linux/ioport.h> |
19 | #include <linux/sched.h> /* just for sched_clock() - funny that */ | ||
20 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
21 | #include <linux/cnt32_to_63.h> | ||
22 | 20 | ||
23 | #include <asm/div64.h> | 21 | #include <asm/div64.h> |
24 | #include <mach/hardware.h> | 22 | #include <mach/hardware.h> |
@@ -110,27 +108,6 @@ unsigned int sa11x0_getspeed(unsigned int cpu) | |||
110 | } | 108 | } |
111 | 109 | ||
112 | /* | 110 | /* |
113 | * This is the SA11x0 sched_clock implementation. This has | ||
114 | * a resolution of 271ns, and a maximum value of 32025597s (370 days). | ||
115 | * | ||
116 | * The return value is guaranteed to be monotonic in that range as | ||
117 | * long as there is always less than 582 seconds between successive | ||
118 | * calls to this function. | ||
119 | * | ||
120 | * ( * 1E9 / 3686400 => * 78125 / 288) | ||
121 | */ | ||
122 | unsigned long long sched_clock(void) | ||
123 | { | ||
124 | unsigned long long v = cnt32_to_63(OSCR); | ||
125 | |||
126 | /* the <<1 gets rid of the cnt_32_to_63 top bit saving on a bic insn */ | ||
127 | v *= 78125<<1; | ||
128 | do_div(v, 288<<1); | ||
129 | |||
130 | return v; | ||
131 | } | ||
132 | |||
133 | /* | ||
134 | * Default power-off for SA1100 | 111 | * Default power-off for SA1100 |
135 | */ | 112 | */ |
136 | static void sa1100_power_off(void) | 113 | static void sa1100_power_off(void) |