diff options
| author | Andrew Bresticker <abrestic@chromium.org> | 2014-10-20 15:04:01 -0400 |
|---|---|---|
| committer | Ralf Baechle <ralf@linux-mips.org> | 2014-11-24 01:45:15 -0500 |
| commit | b0854514537e4e2f0a599ca05d18fe95dcd3ee42 (patch) | |
| tree | c13664df9b06e8cd14c1b441d92375c516541621 | |
| parent | 5fee56e0ddac14511a4dd33f1240a0f0b94a9d08 (diff) | |
clocksource: mips-gic: Move gic_frequency to clocksource driver
There's no reason for gic_frequency to be global any more and it
certainly doesn't belong in the GIC irqchip driver, so move it to
the GIC clocksource driver.
Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: Qais Yousef <qais.yousef@imgtec.com>
Cc: John Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/8137/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
| -rw-r--r-- | arch/mips/mti-malta/malta-time.c | 2 | ||||
| -rw-r--r-- | drivers/clocksource/mips-gic-timer.c | 3 | ||||
| -rw-r--r-- | drivers/irqchip/irq-mips-gic.c | 1 | ||||
| -rw-r--r-- | include/linux/irqchip/mips-gic.h | 1 |
4 files changed, 5 insertions, 2 deletions
diff --git a/arch/mips/mti-malta/malta-time.c b/arch/mips/mti-malta/malta-time.c index 028fae077001..ce02dbdedc62 100644 --- a/arch/mips/mti-malta/malta-time.c +++ b/arch/mips/mti-malta/malta-time.c | |||
| @@ -46,6 +46,8 @@ static int mips_cpu_timer_irq; | |||
| 46 | static int mips_cpu_perf_irq; | 46 | static int mips_cpu_perf_irq; |
| 47 | extern int cp0_perfcount_irq; | 47 | extern int cp0_perfcount_irq; |
| 48 | 48 | ||
| 49 | static unsigned int gic_frequency; | ||
| 50 | |||
| 49 | static void mips_timer_dispatch(void) | 51 | static void mips_timer_dispatch(void) |
| 50 | { | 52 | { |
| 51 | do_IRQ(mips_cpu_timer_irq); | 53 | do_IRQ(mips_cpu_timer_irq); |
diff --git a/drivers/clocksource/mips-gic-timer.c b/drivers/clocksource/mips-gic-timer.c index 2603f50e5706..bced17d2d2c1 100644 --- a/drivers/clocksource/mips-gic-timer.c +++ b/drivers/clocksource/mips-gic-timer.c | |||
| @@ -17,6 +17,7 @@ | |||
| 17 | 17 | ||
| 18 | static DEFINE_PER_CPU(struct clock_event_device, gic_clockevent_device); | 18 | static DEFINE_PER_CPU(struct clock_event_device, gic_clockevent_device); |
| 19 | static int gic_timer_irq_installed; | 19 | static int gic_timer_irq_installed; |
| 20 | static unsigned int gic_frequency; | ||
| 20 | 21 | ||
| 21 | static int gic_next_event(unsigned long delta, struct clock_event_device *evt) | 22 | static int gic_next_event(unsigned long delta, struct clock_event_device *evt) |
| 22 | { | 23 | { |
| @@ -112,6 +113,8 @@ static struct clocksource gic_clocksource = { | |||
| 112 | 113 | ||
| 113 | void __init gic_clocksource_init(unsigned int frequency) | 114 | void __init gic_clocksource_init(unsigned int frequency) |
| 114 | { | 115 | { |
| 116 | gic_frequency = frequency; | ||
| 117 | |||
| 115 | /* Set clocksource mask. */ | 118 | /* Set clocksource mask. */ |
| 116 | gic_clocksource.mask = CLOCKSOURCE_MASK(gic_get_count_width()); | 119 | gic_clocksource.mask = CLOCKSOURCE_MASK(gic_get_count_width()); |
| 117 | 120 | ||
diff --git a/drivers/irqchip/irq-mips-gic.c b/drivers/irqchip/irq-mips-gic.c index cb674696810d..7ec3c18f1330 100644 --- a/drivers/irqchip/irq-mips-gic.c +++ b/drivers/irqchip/irq-mips-gic.c | |||
| @@ -18,7 +18,6 @@ | |||
| 18 | #include <asm/setup.h> | 18 | #include <asm/setup.h> |
| 19 | #include <asm/traps.h> | 19 | #include <asm/traps.h> |
| 20 | 20 | ||
| 21 | unsigned int gic_frequency; | ||
| 22 | unsigned int gic_present; | 21 | unsigned int gic_present; |
| 23 | 22 | ||
| 24 | struct gic_pcpu_mask { | 23 | struct gic_pcpu_mask { |
diff --git a/include/linux/irqchip/mips-gic.h b/include/linux/irqchip/mips-gic.h index 0350effb7ccc..420f77b34d02 100644 --- a/include/linux/irqchip/mips-gic.h +++ b/include/linux/irqchip/mips-gic.h | |||
| @@ -230,7 +230,6 @@ | |||
| 230 | #define GIC_HWIRQ_TO_SHARED(x) ((x) - GIC_SHARED_HWIRQ_BASE) | 230 | #define GIC_HWIRQ_TO_SHARED(x) ((x) - GIC_SHARED_HWIRQ_BASE) |
| 231 | 231 | ||
| 232 | extern unsigned int gic_present; | 232 | extern unsigned int gic_present; |
| 233 | extern unsigned int gic_frequency; | ||
| 234 | 233 | ||
| 235 | extern void gic_init(unsigned long gic_base_addr, | 234 | extern void gic_init(unsigned long gic_base_addr, |
| 236 | unsigned long gic_addrspace_size, unsigned int cpu_vec, | 235 | unsigned long gic_addrspace_size, unsigned int cpu_vec, |
