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-realview | |
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-realview')
-rw-r--r-- | arch/arm/mach-realview/core.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c index 07c08151dfe6..3d653e05b75d 100644 --- a/arch/arm/mach-realview/core.c +++ b/arch/arm/mach-realview/core.c | |||
@@ -52,6 +52,8 @@ | |||
52 | #include <mach/irqs.h> | 52 | #include <mach/irqs.h> |
53 | #include <plat/timer-sp.h> | 53 | #include <plat/timer-sp.h> |
54 | 54 | ||
55 | #include <plat/sched_clock.h> | ||
56 | |||
55 | #include "core.h" | 57 | #include "core.h" |
56 | 58 | ||
57 | /* used by entry-macro.S and platsmp.c */ | 59 | /* used by entry-macro.S and platsmp.c */ |
@@ -658,6 +660,12 @@ void realview_leds_event(led_event_t ledevt) | |||
658 | #endif /* CONFIG_LEDS */ | 660 | #endif /* CONFIG_LEDS */ |
659 | 661 | ||
660 | /* | 662 | /* |
663 | * The sched_clock counter | ||
664 | */ | ||
665 | #define REFCOUNTER (__io_address(REALVIEW_SYS_BASE) + \ | ||
666 | REALVIEW_SYS_24MHz_OFFSET) | ||
667 | |||
668 | /* | ||
661 | * Where is the timer (VA)? | 669 | * Where is the timer (VA)? |
662 | */ | 670 | */ |
663 | void __iomem *timer0_va_base; | 671 | void __iomem *timer0_va_base; |
@@ -672,6 +680,8 @@ void __init realview_timer_init(unsigned int timer_irq) | |||
672 | { | 680 | { |
673 | u32 val; | 681 | u32 val; |
674 | 682 | ||
683 | versatile_sched_clock_init(REFCOUNTER, 24000000); | ||
684 | |||
675 | /* | 685 | /* |
676 | * set clock frequency: | 686 | * set clock frequency: |
677 | * REALVIEW_REFCLK is 32KHz | 687 | * REALVIEW_REFCLK is 32KHz |