summaryrefslogtreecommitdiff
path: root/arch/arm/plat-mxc
diff options
context:
space:
mode:
authorAnthony Felice <tony.felice@timesys.com>2013-11-07 11:55:15 -0500
committerAnthony Felice <tony.felice@timesys.com>2014-01-23 11:33:23 -0500
commitd59b15505edccfc8df2aa6d418d85f2a6f8b572f (patch)
tree04c75a727256602823aac08016247742a7336aed /arch/arm/plat-mxc
parentc57fd423354bcdd1f4b3e994bc5ab7113ad35924 (diff)
Add Global Timer support to fix High Resolution Timer functionality.
This patch was submitted by Yoshihisa Ozawa <ozawa@lineo.co.jp> in ticket #52306.
Diffstat (limited to 'arch/arm/plat-mxc')
-rwxr-xr-xarch/arm/plat-mxc/Kconfig2
-rwxr-xr-xarch/arm/plat-mxc/Makefile6
-rwxr-xr-xarch/arm/plat-mxc/include/mach/common.h1
-rw-r--r--arch/arm/plat-mxc/include/mach/irqs.h5
4 files changed, 12 insertions, 2 deletions
diff --git a/arch/arm/plat-mxc/Kconfig b/arch/arm/plat-mxc/Kconfig
index 9f40120e63e1..d3cf435d6d28 100755
--- a/arch/arm/plat-mxc/Kconfig
+++ b/arch/arm/plat-mxc/Kconfig
@@ -138,7 +138,7 @@ config HAVE_PIT
config MXC_USE_PIT
bool "Use PIT"
- depends on HAVE_PIT
+ depends on HAVE_PIT && !HIGH_RES_TIMERS
help
Use PIT as the system timer on systems that have it.
Anyway, on some systems the GPT may be in use such as mvf platform.
diff --git a/arch/arm/plat-mxc/Makefile b/arch/arm/plat-mxc/Makefile
index 238788df23da..6bb77052bbf4 100755
--- a/arch/arm/plat-mxc/Makefile
+++ b/arch/arm/plat-mxc/Makefile
@@ -8,6 +8,11 @@ obj-y := clock.o devices.o cpu.o system.o irq-common.o usb_common.o usb_wakeup.o
ifdef CONFIG_ARCH_MVF
obj-y += gpio-mvf.o
+ ifdef CONFIG_MXC_USE_PIT
+ obj-y += pit.o
+ else
+ obj-y += global_timer.o
+ endif
else
obj-y += gpio.o
obj-y += time.o
@@ -23,7 +28,6 @@ obj-$(CONFIG_IRAM_ALLOC) += iram_alloc.o
obj-$(CONFIG_MXC_PWM) += pwm.o
obj-$(CONFIG_MXC_ULPI) += ulpi.o
obj-$(CONFIG_MXC_USE_EPIT) += epit.o
-obj-$(CONFIG_MXC_USE_PIT) += pit.o
obj-$(CONFIG_ARCH_MXC_AUDMUX_V1) += audmux-v1.o
obj-$(CONFIG_ARCH_MXC_AUDMUX_V2) += audmux-v2.o
obj-$(CONFIG_MXC_DEBUG_BOARD) += 3ds_debugboard.o
diff --git a/arch/arm/plat-mxc/include/mach/common.h b/arch/arm/plat-mxc/include/mach/common.h
index fa16fcd74c06..5d71255bc3b2 100755
--- a/arch/arm/plat-mxc/include/mach/common.h
+++ b/arch/arm/plat-mxc/include/mach/common.h
@@ -63,6 +63,7 @@ extern void mxc91231_init_irq(void);
extern void pit_timer_init(struct clk *timer_clk, void __iomem *base, int irq);
extern void epit_timer_init(struct clk *timer_clk, void __iomem *base, int irq);
extern void mxc_timer_init(struct clk *timer_clk, void __iomem *, int);
+extern void global_timer_init(struct clk *timer_clk, void __iomem *, int);
extern int mx1_clocks_init(unsigned long fref);
extern int mx21_clocks_init(unsigned long lref, unsigned long fref);
extern int mx25_clocks_init(void);
diff --git a/arch/arm/plat-mxc/include/mach/irqs.h b/arch/arm/plat-mxc/include/mach/irqs.h
index add1b0250483..28bce683d1b9 100644
--- a/arch/arm/plat-mxc/include/mach/irqs.h
+++ b/arch/arm/plat-mxc/include/mach/irqs.h
@@ -90,4 +90,9 @@ extern int imx_irq_set_priority(unsigned char irq, unsigned char prio);
/* switch between IRQ and FIQ */
extern int mxc_set_irq_fiq(unsigned int irq, unsigned int type);
+#if defined(CONFIG_ARCH_MVF) && !defined(CONFIG_MXC_USE_PIT)
+struct seq_file;
+extern void show_global_timer_irqs(struct seq_file *, int);
+#endif
+
#endif /* __ASM_ARCH_MXC_IRQS_H__ */