clocksource: mips-gic: Move gic_frequency to clocksource driver
authorAndrew Bresticker <abrestic@chromium.org>
Mon, 20 Oct 2014 19:04:01 +0000 (12:04 -0700)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 24 Nov 2014 06:45:15 +0000 (07:45 +0100)
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>
arch/mips/mti-malta/malta-time.c
drivers/clocksource/mips-gic-timer.c
drivers/irqchip/irq-mips-gic.c
include/linux/irqchip/mips-gic.h

index 028fae07700138997680025ad9e92fc648591227..ce02dbdedc62c4d081bf8536563b50d896488529 100644 (file)
@@ -46,6 +46,8 @@ static int mips_cpu_timer_irq;
 static int mips_cpu_perf_irq;
 extern int cp0_perfcount_irq;
 
+static unsigned int gic_frequency;
+
 static void mips_timer_dispatch(void)
 {
        do_IRQ(mips_cpu_timer_irq);
index 2603f50e57063e0b687c26d5d88491f9c988864d..bced17d2d2c10ccc70b0d0974bb9f3786fe1c40d 100644 (file)
@@ -17,6 +17,7 @@
 
 static DEFINE_PER_CPU(struct clock_event_device, gic_clockevent_device);
 static int gic_timer_irq_installed;
+static unsigned int gic_frequency;
 
 static int gic_next_event(unsigned long delta, struct clock_event_device *evt)
 {
@@ -112,6 +113,8 @@ static struct clocksource gic_clocksource = {
 
 void __init gic_clocksource_init(unsigned int frequency)
 {
+       gic_frequency = frequency;
+
        /* Set clocksource mask. */
        gic_clocksource.mask = CLOCKSOURCE_MASK(gic_get_count_width());
 
index cb674696810d8400e0238b3f05a3b618df50a137..7ec3c18f13309be38b8e71675ee4d22cebddb116 100644 (file)
@@ -18,7 +18,6 @@
 #include <asm/setup.h>
 #include <asm/traps.h>
 
-unsigned int gic_frequency;
 unsigned int gic_present;
 
 struct gic_pcpu_mask {
index 0350effb7ccc49038785673b3b895a5fc6edb71a..420f77b34d02639192bae47ae2fcc95462eaf8e6 100644 (file)
 #define GIC_HWIRQ_TO_SHARED(x) ((x) - GIC_SHARED_HWIRQ_BASE)
 
 extern unsigned int gic_present;
-extern unsigned int gic_frequency;
 
 extern void gic_init(unsigned long gic_base_addr,
        unsigned long gic_addrspace_size, unsigned int cpu_vec,