Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 292452
b: refs/heads/master
c: 440f6ff
h: refs/heads/master
v: v3
  • Loading branch information
Greg Ungerer committed Mar 4, 2012
1 parent 16699a1 commit 42ff8d3
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 73 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: c05793c7332d0f4179068bc6a6120e67b73a09ef
refs/heads/master: 440f6ffc061a84e81386a093c07af8a429c18702
18 changes: 0 additions & 18 deletions trunk/arch/m68k/platform/5206/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,6 @@

/***************************************************************************/

static void __init m5206_timers_init(void)
{
/* Timer1 is always used as system timer */
writeb(MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI3,
MCF_MBAR + MCFSIM_TIMER1ICR);
mcf_mapirq2imr(MCF_IRQ_TIMER, MCFINTC_TIMER1);

#ifdef CONFIG_HIGHPROFILE
/* Timer2 is to be used as a high speed profile timer */
writeb(MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL7 | MCFSIM_ICR_PRI3,
MCF_MBAR + MCFSIM_TIMER2ICR);
mcf_mapirq2imr(MCF_IRQ_PROFILER, MCFINTC_TIMER2);
#endif
}

/***************************************************************************/

void m5206_cpu_reset(void)
{
local_irq_disable();
Expand All @@ -57,7 +40,6 @@ void __init config_BSP(char *commandp, int size)

mach_reset = m5206_cpu_reset;
mach_sched_init = hw_timer_init;
m5206_timers_init();

/* Only support the external interrupts on their primary level */
mcf_mapirq2imr(25, MCFINTC_EINT1);
Expand Down
18 changes: 0 additions & 18 deletions trunk/arch/m68k/platform/5249/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,23 +83,6 @@ static void __init m5249_smc91x_init(void)

/***************************************************************************/

static void __init m5249_timers_init(void)
{
/* Timer1 is always used as system timer */
writeb(MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI3,
MCF_MBAR + MCFSIM_TIMER1ICR);
mcf_mapirq2imr(MCF_IRQ_TIMER, MCFINTC_TIMER1);

#ifdef CONFIG_HIGHPROFILE
/* Timer2 is to be used as a high speed profile timer */
writeb(MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL7 | MCFSIM_ICR_PRI3,
MCF_MBAR + MCFSIM_TIMER2ICR);
mcf_mapirq2imr(MCF_IRQ_PROFILER, MCFINTC_TIMER2);
#endif
}

/***************************************************************************/

void m5249_cpu_reset(void)
{
local_irq_disable();
Expand All @@ -115,7 +98,6 @@ void __init config_BSP(char *commandp, int size)
{
mach_reset = m5249_cpu_reset;
mach_sched_init = hw_timer_init;
m5249_timers_init();
#ifdef CONFIG_M5249C3
m5249_smc91x_init();
#endif
Expand Down
18 changes: 0 additions & 18 deletions trunk/arch/m68k/platform/5307/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,6 @@ unsigned char ledbank = 0xff;

/***************************************************************************/

static void __init m5307_timers_init(void)
{
/* Timer1 is always used as system timer */
writeb(MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI3,
MCF_MBAR + MCFSIM_TIMER1ICR);
mcf_mapirq2imr(MCF_IRQ_TIMER, MCFINTC_TIMER1);

#ifdef CONFIG_HIGHPROFILE
/* Timer2 is to be used as a high speed profile timer */
writeb(MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL7 | MCFSIM_ICR_PRI3,
MCF_MBAR + MCFSIM_TIMER2ICR);
mcf_mapirq2imr(MCF_IRQ_PROFILER, MCFINTC_TIMER2);
#endif
}

/***************************************************************************/

void m5307_cpu_reset(void)
{
local_irq_disable();
Expand All @@ -67,7 +50,6 @@ void __init config_BSP(char *commandp, int size)

mach_reset = m5307_cpu_reset;
mach_sched_init = hw_timer_init;
m5307_timers_init();

/* Only support the external interrupts on their primary level */
mcf_mapirq2imr(25, MCFINTC_EINT1);
Expand Down
18 changes: 0 additions & 18 deletions trunk/arch/m68k/platform/5407/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,6 @@

/***************************************************************************/

static void __init m5407_timers_init(void)
{
/* Timer1 is always used as system timer */
writeb(MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI3,
MCF_MBAR + MCFSIM_TIMER1ICR);
mcf_mapirq2imr(MCF_IRQ_TIMER, MCFINTC_TIMER1);

#ifdef CONFIG_HIGHPROFILE
/* Timer2 is to be used as a high speed profile timer */
writeb(MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL7 | MCFSIM_ICR_PRI3,
MCF_MBAR + MCFSIM_TIMER2ICR);
mcf_mapirq2imr(MCF_IRQ_PROFILER, MCFINTC_TIMER2);
#endif
}

/***************************************************************************/

void m5407_cpu_reset(void)
{
local_irq_disable();
Expand All @@ -51,7 +34,6 @@ void __init config_BSP(char *commandp, int size)
{
mach_reset = m5407_cpu_reset;
mach_sched_init = hw_timer_init;
m5407_timers_init();

/* Only support the external interrupts on their primary level */
mcf_mapirq2imr(25, MCFINTC_EINT1);
Expand Down
20 changes: 20 additions & 0 deletions trunk/arch/m68k/platform/coldfire/timers.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,25 @@ static irq_handler_t timer_interrupt;

/***************************************************************************/

static void init_timer_irq(void)
{
#ifdef MCFSIM_ICR_AUTOVEC
/* Timer1 is always used as system timer */
writeb(MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI3,
MCF_MBAR + MCFSIM_TIMER1ICR);
mcf_mapirq2imr(MCF_IRQ_TIMER, MCFINTC_TIMER1);

#ifdef CONFIG_HIGHPROFILE
/* Timer2 is to be used as a high speed profile timer */
writeb(MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL7 | MCFSIM_ICR_PRI3,
MCF_MBAR + MCFSIM_TIMER2ICR);
mcf_mapirq2imr(MCF_IRQ_PROFILER, MCFINTC_TIMER2);
#endif
#endif /* MCFSIM_ICR_AUTOVEC */
}

/***************************************************************************/

static irqreturn_t mcftmr_tick(int irq, void *dummy)
{
/* Reset the ColdFire timer */
Expand Down Expand Up @@ -113,6 +132,7 @@ void hw_timer_init(irq_handler_t handler)
clocksource_register_hz(&mcftmr_clk, FREQ);

timer_interrupt = handler;
init_timer_irq();
setup_irq(MCF_IRQ_TIMER, &mcftmr_timer_irq);

#ifdef CONFIG_HIGHPROFILE
Expand Down

0 comments on commit 42ff8d3

Please sign in to comment.