diff options
author | Hanjun Guo <hanjun.guo@linaro.org> | 2015-03-24 10:02:50 -0400 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2015-03-26 11:13:07 -0400 |
commit | b09ca1ecf6d499d5a33f978c905d2fbcc79b55d9 (patch) | |
tree | a9b807414433367bcf647a38d7d3e5623e236ace /arch/arm64 | |
parent | d60fc3892c4de4a25658786f941690462c5a5bab (diff) |
clocksource / arch_timer: Parse GTDT to initialize arch timer
Using the information presented by GTDT (Generic Timer Description Table)
to initialize the arch timer (not memory-mapped).
CC: Daniel Lezcano <daniel.lezcano@linaro.org>
CC: Thomas Gleixner <tglx@linutronix.de>
Originally-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
Tested-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
Tested-by: Yijing Wang <wangyijing@huawei.com>
Tested-by: Mark Langsdorf <mlangsdo@redhat.com>
Tested-by: Jon Masters <jcm@redhat.com>
Tested-by: Timur Tabi <timur@codeaurora.org>
Tested-by: Robert Richter <rrichter@cavium.com>
Acked-by: Robert Richter <rrichter@cavium.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Grant Likely <grant.likely@linaro.org>
Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64')
-rw-r--r-- | arch/arm64/kernel/time.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm64/kernel/time.c b/arch/arm64/kernel/time.c index 1a7125c3099b..42f9195cf2f8 100644 --- a/arch/arm64/kernel/time.c +++ b/arch/arm64/kernel/time.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/delay.h> | 35 | #include <linux/delay.h> |
36 | #include <linux/clocksource.h> | 36 | #include <linux/clocksource.h> |
37 | #include <linux/clk-provider.h> | 37 | #include <linux/clk-provider.h> |
38 | #include <linux/acpi.h> | ||
38 | 39 | ||
39 | #include <clocksource/arm_arch_timer.h> | 40 | #include <clocksource/arm_arch_timer.h> |
40 | 41 | ||
@@ -72,6 +73,12 @@ void __init time_init(void) | |||
72 | 73 | ||
73 | tick_setup_hrtimer_broadcast(); | 74 | tick_setup_hrtimer_broadcast(); |
74 | 75 | ||
76 | /* | ||
77 | * Since ACPI or FDT will only one be available in the system, | ||
78 | * we can use acpi_generic_timer_init() here safely | ||
79 | */ | ||
80 | acpi_generic_timer_init(); | ||
81 | |||
75 | arch_timer_rate = arch_timer_get_rate(); | 82 | arch_timer_rate = arch_timer_get_rate(); |
76 | if (!arch_timer_rate) | 83 | if (!arch_timer_rate) |
77 | panic("Unable to initialise architected timer.\n"); | 84 | panic("Unable to initialise architected timer.\n"); |