diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-12-15 16:56:47 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-12-22 17:44:50 -0500 |
commit | 1da0c89c66753860ccfe81eb327c25db46c2a24a (patch) | |
tree | 565710dc2a57dca18a17d3e34465485f32191b81 /arch/arm/mach-versatile | |
parent | f06a1624621527ef597ae4b3b795553fc1b2eff2 (diff) |
ARM: versatile: convert sched_clock() to use new infrastructure
Convert versatile platforms to use the new sched_clock() infrastructure
for extending 32bit counters to full 64-bit nanoseconds.
Tested-by: Will Deacon <will.deacon@arm.com>
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.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index e38acb0f89c8..56cdc2257424 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c | |||
@@ -51,6 +51,8 @@ | |||
51 | #include <mach/platform.h> | 51 | #include <mach/platform.h> |
52 | #include <plat/timer-sp.h> | 52 | #include <plat/timer-sp.h> |
53 | 53 | ||
54 | #include <plat/sched_clock.h> | ||
55 | |||
54 | #include "core.h" | 56 | #include "core.h" |
55 | 57 | ||
56 | /* | 58 | /* |
@@ -886,6 +888,12 @@ void __init versatile_init(void) | |||
886 | } | 888 | } |
887 | 889 | ||
888 | /* | 890 | /* |
891 | * The sched_clock counter | ||
892 | */ | ||
893 | #define REFCOUNTER (__io_address(VERSATILE_SYS_BASE) + \ | ||
894 | VERSATILE_SYS_24MHz_OFFSET) | ||
895 | |||
896 | /* | ||
889 | * Where is the timer (VA)? | 897 | * Where is the timer (VA)? |
890 | */ | 898 | */ |
891 | #define TIMER0_VA_BASE __io_address(VERSATILE_TIMER0_1_BASE) | 899 | #define TIMER0_VA_BASE __io_address(VERSATILE_TIMER0_1_BASE) |
@@ -900,6 +908,8 @@ static void __init versatile_timer_init(void) | |||
900 | { | 908 | { |
901 | u32 val; | 909 | u32 val; |
902 | 910 | ||
911 | versatile_sched_clock_init(REFCOUNTER, 24000000); | ||
912 | |||
903 | /* | 913 | /* |
904 | * set clock frequency: | 914 | * set clock frequency: |
905 | * VERSATILE_REFCLK is 32KHz | 915 | * VERSATILE_REFCLK is 32KHz |