From 53a55320b64c755f0699de466d450645d3b67c01 Mon Sep 17 00:00:00 2001 From: Manuel Lauss Date: Sat, 18 Mar 2017 10:58:55 +0100 Subject: [PATCH 2/3] MIPS: Alchemy: add 32.768kHz sched clock When the TOY/RTC timer is in a usable state, register a sched_clock for it. Signed-off-by: Manuel Lauss --- arch/mips/alchemy/common/time.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/mips/alchemy/common/time.c b/arch/mips/alchemy/common/time.c index 32d1333bb243..ff4dbe3dee34 100644 --- a/arch/mips/alchemy/common/time.c +++ b/arch/mips/alchemy/common/time.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -144,6 +145,8 @@ static int __init alchemy_time_init(unsigned int m2int) clockevents_register_device(cd); setup_irq(m2int, &au1x_rtcmatch2_irqaction); + sched_clock_register((u64(*)(void))(au1x_counter1_read), 32, 32768); + printk(KERN_INFO "Alchemy clocksource installed\n"); return 0; -- 2.15.1