|
@@ -30,15 +30,6 @@
|
|
#define FREQ (MCF_BUSCLK / 16)
|
|
#define FREQ (MCF_BUSCLK / 16)
|
|
#define TA(a) (MCF_MBAR + MCFTIMER_BASE1 + (a))
|
|
#define TA(a) (MCF_MBAR + MCFTIMER_BASE1 + (a))
|
|
|
|
|
|
-/*
|
|
|
|
- * Default the timer and vector to use for ColdFire. Some ColdFire
|
|
|
|
- * CPU's and some boards may want different. Their sub-architecture
|
|
|
|
- * startup code (in config.c) can change these if they want.
|
|
|
|
- */
|
|
|
|
-unsigned int mcf_timervector = 29;
|
|
|
|
-unsigned int mcf_profilevector = 31;
|
|
|
|
-unsigned int mcf_timerlevel = 5;
|
|
|
|
-
|
|
|
|
/*
|
|
/*
|
|
* These provide the underlying interrupt vector support.
|
|
* These provide the underlying interrupt vector support.
|
|
* Unfortunately it is a little different on each ColdFire.
|
|
* Unfortunately it is a little different on each ColdFire.
|
|
@@ -107,7 +98,7 @@ static struct clocksource mcftmr_clk = {
|
|
|
|
|
|
void hw_timer_init(void)
|
|
void hw_timer_init(void)
|
|
{
|
|
{
|
|
- setup_irq(mcf_timervector, &mcftmr_timer_irq);
|
|
|
|
|
|
+ setup_irq(MCF_IRQ_TIMER, &mcftmr_timer_irq);
|
|
|
|
|
|
__raw_writew(MCFTIMER_TMR_DISABLE, TA(MCFTIMER_TMR));
|
|
__raw_writew(MCFTIMER_TMR_DISABLE, TA(MCFTIMER_TMR));
|
|
mcftmr_cycles_per_jiffy = FREQ / HZ;
|
|
mcftmr_cycles_per_jiffy = FREQ / HZ;
|
|
@@ -124,7 +115,7 @@ void hw_timer_init(void)
|
|
mcftmr_clk.mult = clocksource_hz2mult(FREQ, mcftmr_clk.shift);
|
|
mcftmr_clk.mult = clocksource_hz2mult(FREQ, mcftmr_clk.shift);
|
|
clocksource_register(&mcftmr_clk);
|
|
clocksource_register(&mcftmr_clk);
|
|
|
|
|
|
- mcf_settimericr(1, mcf_timerlevel);
|
|
|
|
|
|
+ mcf_clrimr(MCFINTC_TIMER1);
|
|
|
|
|
|
#ifdef CONFIG_HIGHPROFILE
|
|
#ifdef CONFIG_HIGHPROFILE
|
|
coldfire_profile_init();
|
|
coldfire_profile_init();
|
|
@@ -171,7 +162,7 @@ void coldfire_profile_init(void)
|
|
printk(KERN_INFO "PROFILE: lodging TIMER2 @ %dHz as profile timer\n",
|
|
printk(KERN_INFO "PROFILE: lodging TIMER2 @ %dHz as profile timer\n",
|
|
PROFILEHZ);
|
|
PROFILEHZ);
|
|
|
|
|
|
- setup_irq(mcf_profilevector, &coldfire_profile_irq);
|
|
|
|
|
|
+ setup_irq(MCF_IRQ_PROFILER, &coldfire_profile_irq);
|
|
|
|
|
|
/* Set up TIMER 2 as high speed profile clock */
|
|
/* Set up TIMER 2 as high speed profile clock */
|
|
__raw_writew(MCFTIMER_TMR_DISABLE, PA(MCFTIMER_TMR));
|
|
__raw_writew(MCFTIMER_TMR_DISABLE, PA(MCFTIMER_TMR));
|
|
@@ -180,7 +171,7 @@ void coldfire_profile_init(void)
|
|
__raw_writew(MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 |
|
|
__raw_writew(MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 |
|
|
MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE, PA(MCFTIMER_TMR));
|
|
MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE, PA(MCFTIMER_TMR));
|
|
|
|
|
|
- mcf_settimericr(2, 7);
|
|
|
|
|
|
+ mcf_clrimr(MCFINTC_TIMER2);
|
|
}
|
|
}
|
|
|
|
|
|
/***************************************************************************/
|
|
/***************************************************************************/
|