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 <[email protected]>
Cc: Daniel Lezcano <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Jason Cooper <[email protected]>
Cc: Paul Burton <[email protected]>
Cc: Qais Yousef <[email protected]>
Cc: John Crispin <[email protected]>
Cc: [email protected]
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/8137/
Signed-off-by: Ralf Baechle <[email protected]>
This commit is contained in:
Andrew Bresticker 2014-10-20 12:04:01 -07:00 • committed by Ralf Baechle
commit b085451453
4 changed files with 5 additions and 2 deletions

View 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);

View 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());

View 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 {

View file

@ -230,7 +230,6 @@
#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,