Merge branch 'misc' into devel
[firefly-linux-kernel-4.4.55.git] / arch / arm / mach-realview / core.c
index 3d915b1ccdb51d5c24cacd437d586918c2be5bea..1c6602cf50e4dd53c8f5d8022118aca0d008968e 100644 (file)
 
 #include <mach/platform.h>
 #include <mach/irqs.h>
-#include <plat/timer-sp.h>
+#include <asm/hardware/timer-sp.h>
 
-#include "core.h"
+#include <plat/sched_clock.h>
 
-/* used by entry-macro.S and platsmp.c */
-void __iomem *gic_cpu_base_addr;
+#include "core.h"
 
 #ifdef CONFIG_ZONE_DMA
 /*
@@ -656,6 +655,12 @@ void realview_leds_event(led_event_t ledevt)
 }
 #endif /* CONFIG_LEDS */
 
+/*
+ * The sched_clock counter
+ */
+#define REFCOUNTER             (__io_address(REALVIEW_SYS_BASE) + \
+                                REALVIEW_SYS_24MHz_OFFSET)
+
 /*
  * Where is the timer (VA)?
  */
@@ -671,6 +676,8 @@ void __init realview_timer_init(unsigned int timer_irq)
 {
        u32 val;
 
+       versatile_sched_clock_init(REFCOUNTER, 24000000);
+
        /* 
         * set clock frequency: 
         *      REALVIEW_REFCLK is 32KHz