Pull video into test branch
[linux-drm-fsl-dcu.git] / arch / arm / kernel / time.c
index 6ff5e3ff6cb57a781a672b631596f924c75f3ee4..3c8cdcfe8d4a9f72c9ffb3762a72b260be85d73c 100644 (file)
@@ -29,6 +29,8 @@
 #include <linux/timer.h>
 #include <linux/irq.h>
 
+#include <linux/mc146818rtc.h>
+
 #include <asm/leds.h>
 #include <asm/thread_info.h>
 #include <asm/mach/time.h>
@@ -85,6 +87,17 @@ unsigned long long __attribute__((weak)) sched_clock(void)
        return (unsigned long long)jiffies * (1000000000 / HZ);
 }
 
+/*
+ * An implementation of printk_clock() independent from
+ * sched_clock().  This avoids non-bootable kernels when
+ * printk_clock is enabled.
+ */
+unsigned long long printk_clock(void)
+{
+       return (unsigned long long)(jiffies - INITIAL_JIFFIES) *
+                       (1000000000 / HZ);
+}
+
 static unsigned long next_rtc_update;
 
 /*