diff options
author | Magnus Damm <damm+renesas@opensource.se> | 2014-08-20 09:03:12 -0400 |
---|---|---|
committer | Simon Horman <horms+renesas@verge.net.au> | 2014-08-21 22:31:56 -0400 |
commit | 7dd4cfd7f8c2976a8d65022146386480474501ca (patch) | |
tree | 10c3fe16b002ec08e68ad69d2afa1c4c7578c253 | |
parent | f5720080b51d61c33dc559fedab9a601930e95c1 (diff) |
ARM: shmobile: Remove shmobile_setup_delay()
All ARM mach-shmobile SoCs and boards now rely on DTS for
CPU Frequency information, so remove the unused function
shmobile_setup_delay(). While at it, make the function
shmobile_setup_delay_hz() static.
Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-rw-r--r-- | arch/arm/mach-shmobile/common.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/timer.c | 21 |
2 files changed, 2 insertions, 21 deletions
diff --git a/arch/arm/mach-shmobile/common.h b/arch/arm/mach-shmobile/common.h index 98056081f0da..72087c79ad7b 100644 --- a/arch/arm/mach-shmobile/common.h +++ b/arch/arm/mach-shmobile/common.h | |||
@@ -2,8 +2,6 @@ | |||
2 | #define __ARCH_MACH_COMMON_H | 2 | #define __ARCH_MACH_COMMON_H |
3 | 3 | ||
4 | extern void shmobile_earlytimer_init(void); | 4 | extern void shmobile_earlytimer_init(void); |
5 | extern void shmobile_setup_delay(unsigned int max_cpu_core_mhz, | ||
6 | unsigned int mult, unsigned int div); | ||
7 | extern void shmobile_init_delay(void); | 5 | extern void shmobile_init_delay(void); |
8 | struct twd_local_timer; | 6 | struct twd_local_timer; |
9 | extern void shmobile_setup_console(void); | 7 | extern void shmobile_setup_console(void); |
diff --git a/arch/arm/mach-shmobile/timer.c b/arch/arm/mach-shmobile/timer.c index 942efdc82a62..adce98b44f8a 100644 --- a/arch/arm/mach-shmobile/timer.c +++ b/arch/arm/mach-shmobile/timer.c | |||
@@ -23,8 +23,8 @@ | |||
23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
24 | #include <linux/of_address.h> | 24 | #include <linux/of_address.h> |
25 | 25 | ||
26 | void __init shmobile_setup_delay_hz(unsigned int max_cpu_core_hz, | 26 | static void __init shmobile_setup_delay_hz(unsigned int max_cpu_core_hz, |
27 | unsigned int mult, unsigned int div) | 27 | unsigned int mult, unsigned int div) |
28 | { | 28 | { |
29 | /* calculate a worst-case loops-per-jiffy value | 29 | /* calculate a worst-case loops-per-jiffy value |
30 | * based on maximum cpu core hz setting and the | 30 | * based on maximum cpu core hz setting and the |
@@ -40,23 +40,6 @@ void __init shmobile_setup_delay_hz(unsigned int max_cpu_core_hz, | |||
40 | preset_lpj = max_cpu_core_hz / value; | 40 | preset_lpj = max_cpu_core_hz / value; |
41 | } | 41 | } |
42 | 42 | ||
43 | void __init shmobile_setup_delay(unsigned int max_cpu_core_mhz, | ||
44 | unsigned int mult, unsigned int div) | ||
45 | { | ||
46 | /* calculate a worst-case loops-per-jiffy value | ||
47 | * based on maximum cpu core mhz setting and the | ||
48 | * __delay() implementation in arch/arm/lib/delay.S | ||
49 | * | ||
50 | * this will result in a longer delay than expected | ||
51 | * when the cpu core runs on lower frequencies. | ||
52 | */ | ||
53 | |||
54 | unsigned int value = (1000000 * mult) / (HZ * div); | ||
55 | |||
56 | if (!preset_lpj) | ||
57 | preset_lpj = max_cpu_core_mhz * value; | ||
58 | } | ||
59 | |||
60 | void __init shmobile_init_delay(void) | 43 | void __init shmobile_init_delay(void) |
61 | { | 44 | { |
62 | struct device_node *np, *cpus; | 45 | struct device_node *np, *cpus; |