summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorom prakash <omprakash.pal@stericsson.com>2011-12-19 17:57:10 +0530
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 10:59:25 +0200
commitab14159c93b339522b10f5b6f366f2e6cc589362 (patch)
tree13f2279b0f3a868347e7f4c77af856dd1a12a8b7
parentd55f87c711aaffb4a9589c694d38d95f4e844cc9 (diff)
Clocksource: mtimer: enable boot time
Enabled the boottime summary information in kernel for U5500. ST-Ericsson ID: ER401917 ST-Ericsson FOSS-OUT ID: Trivial Change-Id: I3c7ea24535d304436d373b2de5e50626bcf66746 Signed-off-by: om prakash <omprakash.pal@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/43069 Reviewed-by: QABUILD Reviewed-by: QATEST Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
-rw-r--r--drivers/clocksource/db5500-mtimer.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/clocksource/db5500-mtimer.c b/drivers/clocksource/db5500-mtimer.c
index 641279707a8..5e64da19e66 100644
--- a/drivers/clocksource/db5500-mtimer.c
+++ b/drivers/clocksource/db5500-mtimer.c
@@ -9,6 +9,7 @@
#include <linux/sched.h>
#include <linux/clockchips.h>
#include <linux/clksrc-db5500-mtimer.h>
+#include <linux/boottime.h>
#include <asm/sched_clock.h>
@@ -38,6 +39,19 @@ static void notrace db5500_mtimer_update_sched_clock(void)
}
#endif
+#ifdef CONFIG_BOOTTIME
+static unsigned long __init boottime_get_time(void)
+{
+ return sched_clock();
+}
+
+static struct boottime_timer __initdata boottime_timer = {
+ .init = NULL,
+ .get_time = boottime_get_time,
+ .finalize = NULL,
+};
+#endif
+
void __init db5500_mtimer_init(void __iomem *base)
{
db5500_mtimer_base = base;
@@ -49,4 +63,5 @@ void __init db5500_mtimer_init(void __iomem *base)
init_sched_clock(&cd, db5500_mtimer_update_sched_clock,
32, 32768);
#endif
+ boottime_activate(&boottime_timer);
}