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>
This commit is contained in:
committed by
Ralf Baechle
parent
28ea215186
commit
dfa762e1c3
@@ -359,6 +359,9 @@ struct gic_shared_intr_map {
|
||||
/* Mapped interrupt to pin X, then GIC will generate the vector (X+1). */
|
||||
#define GIC_PIN_TO_VEC_OFFSET (1)
|
||||
|
||||
#include <linux/clocksource.h>
|
||||
#include <linux/irq.h>
|
||||
|
||||
extern unsigned int gic_present;
|
||||
extern unsigned int gic_frequency;
|
||||
extern unsigned long _gic_base;
|
||||
@@ -372,6 +375,7 @@ extern void gic_init(unsigned long gic_base_addr,
|
||||
|
||||
extern void gic_clocksource_init(unsigned int);
|
||||
extern unsigned int gic_get_int(void);
|
||||
extern cycle_t gic_read_count(void);
|
||||
extern void gic_send_ipi(unsigned int intr);
|
||||
extern unsigned int plat_ipi_call_int_xlate(unsigned int);
|
||||
extern unsigned int plat_ipi_resched_int_xlate(unsigned int);
|
||||
|
||||
Reference in New Issue
Block a user