提交 100148d0 编写于 作者: J Jianyong Wu 提交者: Marc Zyngier

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: NAndre Przywara <andre.przywara@arm.com>
Signed-off-by: NJianyong Wu <jianyong.wu@arm.com>
Signed-off-by: NMarc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20201209060932.212364-6-jianyong.wu@arm.com
上级 b2c67cbe
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include <linux/cpu_pm.h> #include <linux/cpu_pm.h>
#include <linux/clockchips.h> #include <linux/clockchips.h>
#include <linux/clocksource.h> #include <linux/clocksource.h>
#include <linux/clocksource_ids.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/of_irq.h> #include <linux/of_irq.h>
#include <linux/of_address.h> #include <linux/of_address.h>
...@@ -191,6 +192,7 @@ static u64 arch_counter_read_cc(const struct cyclecounter *cc) ...@@ -191,6 +192,7 @@ static u64 arch_counter_read_cc(const struct cyclecounter *cc)
static struct clocksource clocksource_counter = { static struct clocksource clocksource_counter = {
.name = "arch_sys_counter", .name = "arch_sys_counter",
.id = CSID_ARM_ARCH_COUNTER,
.rating = 400, .rating = 400,
.read = arch_counter_read, .read = arch_counter_read,
.mask = CLOCKSOURCE_MASK(56), .mask = CLOCKSOURCE_MASK(56),
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
/* Enum to give clocksources a unique identifier */ /* Enum to give clocksources a unique identifier */
enum clocksource_ids { enum clocksource_ids {
CSID_GENERIC = 0, CSID_GENERIC = 0,
CSID_ARM_ARCH_COUNTER,
CSID_MAX, CSID_MAX,
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册