diff options
author | Steven J. Hill <Steven.Hill@imgtec.com> | 2013-04-10 17:28:36 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2013-05-09 11:55:20 -0400 |
commit | dfa762e1c31c30607e4e5259f287dd3e174cbcc3 (patch) | |
tree | b23b7335ac92646a29df85c897b5f4783944dc5b /arch/mips/include | |
parent | 28ea215186d365408756577e9e612ee334e26f8e (diff) |
MIPS: Refactor GIC clocksource code.
Reorganize some of the GIC clocksource driver code. Below is a list of
the various changes.
* No longer select CSRC_GIC by default for Malta platform.
* Limit choice for either the GIC or R4K clocksource, not both.
* Change location in Makefile.
* Created new 'gic_read_count' function in common 'irq-gic.c' file.
* Change 'git_hpt_read' function in 'csrc-gic.c' to use new function.
* Surround GIC specific code in Malta platform code with #ifdef's.
* Only initialize the GIC clocksource if it was selected. Original
code called it unconditionally if a GIC was found.
Signed-off-by: Steven J. Hill <Steven.Hill@imgtec.com>
Diffstat (limited to 'arch/mips/include')
-rw-r--r-- | arch/mips/include/asm/gic.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/mips/include/asm/gic.h b/arch/mips/include/asm/gic.h index f1a1e986d86b..6aa68ffad33c 100644 --- a/arch/mips/include/asm/gic.h +++ b/arch/mips/include/asm/gic.h | |||
@@ -359,6 +359,9 @@ struct gic_shared_intr_map { | |||
359 | /* Mapped interrupt to pin X, then GIC will generate the vector (X+1). */ | 359 | /* Mapped interrupt to pin X, then GIC will generate the vector (X+1). */ |
360 | #define GIC_PIN_TO_VEC_OFFSET (1) | 360 | #define GIC_PIN_TO_VEC_OFFSET (1) |
361 | 361 | ||
362 | #include <linux/clocksource.h> | ||
363 | #include <linux/irq.h> | ||
364 | |||
362 | extern unsigned int gic_present; | 365 | extern unsigned int gic_present; |
363 | extern unsigned int gic_frequency; | 366 | extern unsigned int gic_frequency; |
364 | extern unsigned long _gic_base; | 367 | extern unsigned long _gic_base; |
@@ -372,6 +375,7 @@ extern void gic_init(unsigned long gic_base_addr, | |||
372 | 375 | ||
373 | extern void gic_clocksource_init(unsigned int); | 376 | extern void gic_clocksource_init(unsigned int); |
374 | extern unsigned int gic_get_int(void); | 377 | extern unsigned int gic_get_int(void); |
378 | extern cycle_t gic_read_count(void); | ||
375 | extern void gic_send_ipi(unsigned int intr); | 379 | extern void gic_send_ipi(unsigned int intr); |
376 | extern unsigned int plat_ipi_call_int_xlate(unsigned int); | 380 | extern unsigned int plat_ipi_call_int_xlate(unsigned int); |
377 | extern unsigned int plat_ipi_resched_int_xlate(unsigned int); | 381 | extern unsigned int plat_ipi_resched_int_xlate(unsigned int); |