Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 295760
b: refs/heads/master
c: a8cb604
h: refs/heads/master
v: v3
  • Loading branch information
Marc Zyngier committed Mar 13, 2012
1 parent bb60dd6 commit 095ba10
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9248510469b46bc17b90cf62cb8d9e7c9a5f9965
refs/heads/master: a8cb6041d0ade808e0173f1e1ca1c92c67979806
18 changes: 10 additions & 8 deletions trunk/arch/arm/mach-exynos/mct.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <linux/percpu.h>

#include <asm/hardware/gic.h>
#include <asm/localtimer.h>

#include <plat/cpu.h>

Expand Down Expand Up @@ -375,7 +376,7 @@ static struct irqaction mct_tick1_event_irq = {
.handler = exynos4_mct_tick_isr,
};

static void exynos4_mct_tick_init(struct clock_event_device *evt)
static int __cpuinit exynos4_local_timer_setup(struct clock_event_device *evt)
{
struct mct_clock_event_device *mevt;
unsigned int cpu = smp_processor_id();
Expand Down Expand Up @@ -417,17 +418,11 @@ static void exynos4_mct_tick_init(struct clock_event_device *evt)
} else {
enable_percpu_irq(IRQ_MCT_LOCALTIMER, 0);
}
}

/* Setup the local clock events for a CPU */
int __cpuinit local_timer_setup(struct clock_event_device *evt)
{
exynos4_mct_tick_init(evt);

return 0;
}

void local_timer_stop(struct clock_event_device *evt)
static void exynos4_local_timer_stop(struct clock_event_device *evt)
{
unsigned int cpu = smp_processor_id();
evt->set_mode(CLOCK_EVT_MODE_UNUSED, evt);
Expand All @@ -439,6 +434,11 @@ void local_timer_stop(struct clock_event_device *evt)
else
disable_percpu_irq(IRQ_MCT_LOCALTIMER);
}

static struct local_timer_ops exynos4_mct_tick_ops __cpuinitdata = {
.setup = exynos4_local_timer_setup,
.stop = exynos4_local_timer_stop,
};
#endif /* CONFIG_LOCAL_TIMERS */

static void __init exynos4_timer_resources(void)
Expand All @@ -458,6 +458,8 @@ static void __init exynos4_timer_resources(void)
WARN(err, "MCT: can't request IRQ %d (%d)\n",
IRQ_MCT_LOCALTIMER, err);
}

local_timer_register(&exynos4_mct_tick_ops);
#endif /* CONFIG_LOCAL_TIMERS */
}

Expand Down

0 comments on commit 095ba10

Please sign in to comment.