summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDinh Nguyen <dinguyen@altera.com>2013-08-21 15:38:34 -0500
committerDaniel Lezcano <daniel.lezcano@linaro.org>2013-10-22 22:49:01 +0200
commit7115272453ec972ba0b8ed928711e585219c195e (patch)
treed0357b0f3e805e775f0252ea2ee6c721ae576cc3
parent61e6cfa80de5760bbe406f4e815b7739205754d2 (diff)
clocksource: dw_apb_timer: Move timer defines to header file.
The timer defines currently reside in dw_apb_timer.c, and dw_apb_timer_of.c needs to make use of these defines as well. Signed-off-by: Dinh Nguyen <dinguyen@altera.com> CC: Rob Herring <rob.herring@calxeda.com> CC: Arnd Bergmann <arnd@arndb.de> Cc: Olof Johansson <olof@lixom.net> CC: Jamie Iles <jamie@jamieiles.com> Cc: John Stultz <john.stultz@linaro.org> Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Pavel Machek <pavel@denx.de> Cc: Heiko Stuebner <heiko@sntech.de> Cc: linux-arm-kernel@lists.infradead.org
-rw-r--r--drivers/clocksource/dw_apb_timer.c19
-rw-r--r--include/linux/dw_apb_timer.h19
2 files changed, 19 insertions, 19 deletions
diff --git a/drivers/clocksource/dw_apb_timer.c b/drivers/clocksource/dw_apb_timer.c
index e54ca1062d8e..c3a8f52a814f 100644
--- a/drivers/clocksource/dw_apb_timer.c
+++ b/drivers/clocksource/dw_apb_timer.c
@@ -18,25 +18,6 @@
#include <linux/io.h>
#include <linux/slab.h>
-#define APBT_MIN_PERIOD 4
-#define APBT_MIN_DELTA_USEC 200
-
-#define APBTMR_N_LOAD_COUNT 0x00
-#define APBTMR_N_CURRENT_VALUE 0x04
-#define APBTMR_N_CONTROL 0x08
-#define APBTMR_N_EOI 0x0c
-#define APBTMR_N_INT_STATUS 0x10
-
-#define APBTMRS_INT_STATUS 0xa0
-#define APBTMRS_EOI 0xa4
-#define APBTMRS_RAW_INT_STATUS 0xa8
-#define APBTMRS_COMP_VERSION 0xac
-
-#define APBTMR_CONTROL_ENABLE (1 << 0)
-/* 1: periodic, 0:free running. */
-#define APBTMR_CONTROL_MODE_PERIODIC (1 << 1)
-#define APBTMR_CONTROL_INT (1 << 2)
-
static inline struct dw_apb_clock_event_device *
ced_to_dw_apb_ced(struct clock_event_device *evt)
{
diff --git a/include/linux/dw_apb_timer.h b/include/linux/dw_apb_timer.h
index 1f79b20918b1..1d2b949d310b 100644
--- a/include/linux/dw_apb_timer.h
+++ b/include/linux/dw_apb_timer.h
@@ -19,6 +19,25 @@
#define APBTMRS_REG_SIZE 0x14
+#define APBT_MIN_PERIOD 4
+#define APBT_MIN_DELTA_USEC 200
+
+#define APBTMR_N_LOAD_COUNT 0x00
+#define APBTMR_N_CURRENT_VALUE 0x04
+#define APBTMR_N_CONTROL 0x08
+#define APBTMR_N_EOI 0x0c
+#define APBTMR_N_INT_STATUS 0x10
+
+#define APBTMRS_INT_STATUS 0xa0
+#define APBTMRS_EOI 0xa4
+#define APBTMRS_RAW_INT_STATUS 0xa8
+#define APBTMRS_COMP_VERSION 0xac
+
+#define APBTMR_CONTROL_ENABLE (1 << 0)
+/* 1: periodic, 0:free running. */
+#define APBTMR_CONTROL_MODE_PERIODIC (1 << 1)
+#define APBTMR_CONTROL_INT (1 << 2)
+
struct dw_apb_timer {
void __iomem *base;
unsigned long freq;