aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68knommu/platform/coldfire/timers.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/m68knommu/platform/coldfire/timers.c')
-rw-r--r--arch/m68knommu/platform/coldfire/timers.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/arch/m68knommu/platform/coldfire/timers.c b/arch/m68knommu/platform/coldfire/timers.c
index a60213e877ef..ba5a9f32ebd4 100644
--- a/arch/m68knommu/platform/coldfire/timers.c
+++ b/arch/m68knommu/platform/coldfire/timers.c
@@ -148,25 +148,32 @@ irqreturn_t coldfire_profile_tick(int irq, void *dummy)
148 /* Reset ColdFire timer2 */ 148 /* Reset ColdFire timer2 */
149 __raw_writeb(MCFTIMER_TER_CAP | MCFTIMER_TER_REF, PA(MCFTIMER_TER)); 149 __raw_writeb(MCFTIMER_TER_CAP | MCFTIMER_TER_REF, PA(MCFTIMER_TER));
150 if (current->pid) 150 if (current->pid)
151 profile_tick(CPU_PROFILING, regs); 151 profile_tick(CPU_PROFILING);
152 return IRQ_HANDLED; 152 return IRQ_HANDLED;
153} 153}
154 154
155/***************************************************************************/ 155/***************************************************************************/
156 156
157static struct irqaction coldfire_profile_irq = {
158 .name = "profile timer",
159 .flags = IRQF_DISABLED | IRQF_TIMER,
160 .handler = coldfire_profile_tick,
161};
162
157void coldfire_profile_init(void) 163void coldfire_profile_init(void)
158{ 164{
159 printk(KERN_INFO "PROFILE: lodging TIMER2 @ %dHz as profile timer\n", PROFILEHZ); 165 printk(KERN_INFO "PROFILE: lodging TIMER2 @ %dHz as profile timer\n",
166 PROFILEHZ);
167
168 setup_irq(mcf_profilevector, &coldfire_profile_irq);
160 169
161 /* Set up TIMER 2 as high speed profile clock */ 170 /* Set up TIMER 2 as high speed profile clock */
162 __raw_writew(MCFTIMER_TMR_DISABLE, PA(MCFTIMER_TMR)); 171 __raw_writew(MCFTIMER_TMR_DISABLE, PA(MCFTIMER_TMR));
163 172
164 __raw_writetrr(((MCF_CLK / 16) / PROFILEHZ), PA(MCFTIMER_TRR)); 173 __raw_writetrr(((MCF_BUSCLK / 16) / PROFILEHZ), PA(MCFTIMER_TRR));
165 __raw_writew(MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 | 174 __raw_writew(MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 |
166 MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE, PA(MCFTIMER_TMR)); 175 MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE, PA(MCFTIMER_TMR));
167 176
168 request_irq(mcf_profilevector, coldfire_profile_tick,
169 (IRQF_DISABLED | IRQ_FLG_FAST), "profile timer", NULL);
170 mcf_settimericr(2, 7); 177 mcf_settimericr(2, 7);
171} 178}
172 179