diff options
author | Anthony Felice <tony.felice@timesys.com> | 2013-11-07 11:55:15 -0500 |
---|---|---|
committer | roshni.shah <roshni.shah@timesys.com> | 2014-01-04 19:33:24 -0500 |
commit | faa70aaf151d80cd438ce497eadf8d1ce3a3894b (patch) | |
tree | 7cf8054eb498f5b7dcb3118a9e2bebe311134125 /arch/arm/include | |
parent | 8d88edef82ff38df243e6638293910e504b5bc44 (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/include')
-rw-r--r-- | arch/arm/include/asm/entry-macro-multi.S | 7 | ||||
-rw-r--r-- | arch/arm/include/asm/hardirq.h | 3 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/entry-macro-gic.S | 12 |
3 files changed, 22 insertions, 0 deletions
diff --git a/arch/arm/include/asm/entry-macro-multi.S b/arch/arm/include/asm/entry-macro-multi.S index 2da8547de6d6..1b32239a6665 100644 --- a/arch/arm/include/asm/entry-macro-multi.S +++ b/arch/arm/include/asm/entry-macro-multi.S @@ -33,6 +33,13 @@ bne do_local_timer #endif #endif + +#if defined(CONFIG_ARCH_MVF) && !defined(CONFIG_MXC_USE_PIT) /* MVF Global Timer Support*/ + test_for_gtirq r0, r6, r5, lr + movne r0, sp + adrne lr, BSYM(1b) + bne do_global_timer +#endif 9997: .endm diff --git a/arch/arm/include/asm/hardirq.h b/arch/arm/include/asm/hardirq.h index 89ad1805e579..b9f0c62e82c3 100644 --- a/arch/arm/include/asm/hardirq.h +++ b/arch/arm/include/asm/hardirq.h @@ -15,6 +15,9 @@ typedef struct { #ifdef CONFIG_SMP unsigned int ipi_irqs[NR_IPI]; #endif +#if defined(CONFIG_ARCH_MVF) && !defined(CONFIG_MXC_USE_PIT) + unsigned int global_timer_irqs; +#endif } ____cacheline_aligned irq_cpustat_t; #include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */ diff --git a/arch/arm/include/asm/hardware/entry-macro-gic.S b/arch/arm/include/asm/hardware/entry-macro-gic.S index c115b82fe80a..14ea31cda750 100644 --- a/arch/arm/include/asm/hardware/entry-macro-gic.S +++ b/arch/arm/include/asm/hardware/entry-macro-gic.S @@ -73,3 +73,15 @@ streq \irqstat, [\base, #GIC_CPU_EOI] cmp \tmp, #0 .endm + +#if defined(CONFIG_ARCH_MVF) && !defined(CONFIG_MXC_USE_PIT) + /* MVF Global Timer Support*/ + .macro test_for_gtirq, irqnr, irqstat, base, tmp + bic \irqnr, \irqstat, #0x1c00 + mov \tmp, #0 + cmp \irqnr, #27 + moveq \tmp, #1 + streq \irqstat, [\base, #GIC_CPU_EOI] + cmp \tmp, #0 + .endm +#endif |