]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
ARM: zynq: move arm-specific sys_timer out of ttc
authorMichal Simek <michal.simek@xilinx.com>
Fri, 16 Nov 2012 13:37:25 +0000 (14:37 +0100)
committerMichal Simek <michal.simek@xilinx.com>
Tue, 20 Nov 2012 09:09:28 +0000 (10:09 +0100)
Move the sys_timer definition out of ttc driver and make it part of the
common zynq code.  This is preparation for renaming and COMMON_CLK
support.

Signed-off-by: Josh Cartwright <josh.cartwright@ni.com>
Tested-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: John Linn <john.linn@xilinx.com>
arch/arm/mach-zynq/common.c
arch/arm/mach-zynq/common.h
arch/arm/mach-zynq/timer.c

index 0447f1ffe0e138ff325691b05e72f3f402c1744c..22a267debb33b609fdcdd2c819603e921829e6e8 100644 (file)
@@ -27,6 +27,7 @@
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
+#include <asm/mach/time.h>
 #include <asm/mach-types.h>
 #include <asm/page.h>
 #include <asm/hardware/gic.h>
@@ -76,6 +77,18 @@ static struct map_desc io_desc[] __initdata = {
        },
 };
 
+static void __init xilinx_zynq_timer_init(void)
+{
+       xttcpss_timer_init();
+}
+
+/*
+ * Instantiate and initialize the system timer structure
+ */
+static struct sys_timer xttcpss_sys_timer = {
+       .init           = xilinx_zynq_timer_init,
+};
+
 /**
  * xilinx_map_io() - Create memory mappings needed for early I/O.
  */
index 9d391f9f55ef82b0359395c17c8a67e46eae9bad..71fbd92f0986ce8b6d7bec5fcecd20c8b2dc2ab8 100644 (file)
 #ifndef __MACH_ZYNQ_COMMON_H__
 #define __MACH_ZYNQ_COMMON_H__
 
-#include <asm/mach/time.h>
 #include <mach/slcr.h>
 
-extern struct sys_timer xttcpss_sys_timer;
+void __init xttcpss_timer_init(void);
 
 void platform_device_init(void);
 
index 2167e4cb7a30a1c7490d709177dd52fb4f5c06b6..c595d184de1863c334c54a73d6c1a5d0dcac6975 100644 (file)
@@ -30,7 +30,6 @@
 #include <linux/clk.h>
 #include <linux/err.h>
 
-#include <asm/mach/time.h>
 #include <asm/smp_twd.h>
 
 #include <mach/zynq_soc.h>
@@ -326,7 +325,7 @@ static int xttcpss_timer_rate_change_cb(struct notifier_block *nb,
  * Initializes the timer hardware and register the clock source and clock event
  * timers with Linux kernal timer framework
  */
-static void __init xttcpss_timer_init(void)
+void __init xttcpss_timer_init(void)
 {
        u32 irq;
        struct device_node *timer = NULL;
@@ -437,10 +436,3 @@ static void __init xttcpss_timer_init(void)
        twd_local_timer_of_register();
 #endif
 }
-
-/*
- * Instantiate and initialize the system timer structure
- */
-struct sys_timer xttcpss_sys_timer = {
-       .init           = xttcpss_timer_init,
-};