plat-orion: share time handling code

Split off Orion time handling code into plat-orion/.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Reviewed-by: Tzachi Perelstein <tzachi@marvell.com>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Nicolas Pitre <nico@marvell.com>
diff --git a/include/asm-arm/arch-orion/orion.h b/include/asm-arm/arch-orion/orion.h
index 673a418..884f3e2 100644
--- a/include/asm-arm/arch-orion/orion.h
+++ b/include/asm-arm/arch-orion/orion.h
@@ -137,11 +137,12 @@
 #define POWER_MNG_CTRL_REG	ORION_BRIDGE_REG(0x11C)
 #define BRIDGE_CAUSE		ORION_BRIDGE_REG(0x110)
 #define BRIDGE_MASK		ORION_BRIDGE_REG(0x114)
+#define  BRIDGE_INT_TIMER0	0x0002
+#define  BRIDGE_INT_TIMER1	0x0004
 #define MAIN_IRQ_CAUSE		ORION_BRIDGE_REG(0x200)
 #define MAIN_IRQ_MASK		ORION_BRIDGE_REG(0x204)
-#define TIMER_CTRL		ORION_BRIDGE_REG(0x300)
-#define TIMER_VAL(x)		ORION_BRIDGE_REG(0x314 + ((x) * 8))
-#define TIMER_VAL_RELOAD(x)	ORION_BRIDGE_REG(0x310 + ((x) * 8))
+
+#define TIMER_VIRT_BASE		(ORION_BRIDGE_VIRT_BASE | 0x300)
 
 #ifndef __ASSEMBLY__
 
diff --git a/include/asm-arm/arch-orion/timex.h b/include/asm-arm/arch-orion/timex.h
index 26c2c91..cc0fc70 100644
--- a/include/asm-arm/arch-orion/timex.h
+++ b/include/asm-arm/arch-orion/timex.h
@@ -8,5 +8,6 @@
  * warranty of any kind, whether express or implied.
  */
 
+#define CLOCK_TICK_RATE		(100 * HZ)
+
 #define ORION_TCLK		166666667
-#define CLOCK_TICK_RATE		ORION_TCLK
diff --git a/include/asm-arm/plat-orion/time.h b/include/asm-arm/plat-orion/time.h
new file mode 100644
index 0000000..0e85cc8
--- /dev/null
+++ b/include/asm-arm/plat-orion/time.h
@@ -0,0 +1,17 @@
+/*
+ * include/asm-arm/plat-orion/time.h
+ *
+ * Marvell Orion SoC time handling.
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2.  This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+#ifndef __ASM_PLAT_ORION_TIME_H
+#define __ASM_PLAT_ORION_TIME_H
+
+void orion_time_init(unsigned int irq, unsigned int tclk);
+
+
+#endif