diff options
author | Jianyong Wu <jianyong.wu@arm.com> | 2020-12-09 07:09:28 +0100 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2021-04-07 17:33:20 +0200 |
commit | 100148d0fc7dcf8672fe0ac83f44dc5749b4da5c (patch) | |
tree | dfa99aa1ef651931f302437a84602c44ecfcbd3e /drivers/clocksource | |
parent | time: Add mechanism to recognize clocksource in time_get_snapshot (diff) | |
download | linux-100148d0fc7dcf8672fe0ac83f44dc5749b4da5c.tar.xz linux-100148d0fc7dcf8672fe0ac83f44dc5749b4da5c.zip |
clocksource: Add clocksource id for arm arch counter
Add clocksource id to the ARM generic counter so that it can be easily
identified from callers such as ptp_kvm.
Cc: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20201209060932.212364-6-jianyong.wu@arm.com
Diffstat (limited to 'drivers/clocksource')
-rw-r--r-- | drivers/clocksource/arm_arch_timer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c index d0177824c518..8f12e223703f 100644 --- a/drivers/clocksource/arm_arch_timer.c +++ b/drivers/clocksource/arm_arch_timer.c @@ -16,6 +16,7 @@ #include <linux/cpu_pm.h> #include <linux/clockchips.h> #include <linux/clocksource.h> +#include <linux/clocksource_ids.h> #include <linux/interrupt.h> #include <linux/of_irq.h> #include <linux/of_address.h> @@ -191,6 +192,7 @@ static u64 arch_counter_read_cc(const struct cyclecounter *cc) static struct clocksource clocksource_counter = { .name = "arch_sys_counter", + .id = CSID_ARM_ARCH_COUNTER, .rating = 400, .read = arch_counter_read, .mask = CLOCKSOURCE_MASK(56), |