treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156
[linux-block.git] / arch / arm / plat-versatile / sched-clock.c
CommitLineData
1a59d1b8 1// SPDX-License-Identifier: GPL-2.0-or-later
f5fc0082
RK
2/*
3 * linux/arch/arm/plat-versatile/sched-clock.c
4 *
5 * Copyright (C) 1999 - 2003 ARM Limited
6 * Copyright (C) 2000 Deep Blue Solutions Ltd
f5fc0082 7 */
2f0778af 8#include <linux/kernel.h>
f5fc0082 9#include <linux/io.h>
38ff87f7 10#include <linux/sched_clock.h>
f5fc0082 11
1da0c89c 12#include <plat/sched_clock.h>
f5fc0082 13
1da0c89c 14static void __iomem *ctr;
f5fc0082 15
d25f1d5a 16static u64 notrace versatile_read_sched_clock(void)
f5fc0082 17{
2f0778af
MZ
18 if (ctr)
19 return readl(ctr);
f5fc0082 20
2f0778af 21 return 0;
1da0c89c 22}
f5fc0082 23
1da0c89c
RK
24void __init versatile_sched_clock_init(void __iomem *reg, unsigned long rate)
25{
26 ctr = reg;
d25f1d5a 27 sched_clock_register(versatile_read_sched_clock, 32, rate);
f5fc0082 28}