Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

m68knommu: fix profile timer

I was looking at timers in the Coldfire system and I noticed that the
CONFIG_HIGHPROFILE option seems to be a little out of date.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Matt Waddel and committed by
Linus Torvalds
6ef1e567 c25f0a0f

+12 -5
+12 -5
arch/m68knommu/platform/coldfire/timers.c
··· 148 148 /* Reset ColdFire timer2 */ 149 149 __raw_writeb(MCFTIMER_TER_CAP | MCFTIMER_TER_REF, PA(MCFTIMER_TER)); 150 150 if (current->pid) 151 - profile_tick(CPU_PROFILING, regs); 151 + profile_tick(CPU_PROFILING); 152 152 return IRQ_HANDLED; 153 153 } 154 154 155 155 /***************************************************************************/ 156 156 157 + static struct irqaction coldfire_profile_irq = { 158 + .name = "profile timer", 159 + .flags = IRQF_DISABLED | IRQF_TIMER, 160 + .handler = coldfire_profile_tick, 161 + }; 162 + 157 163 void 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 170 /* Set up TIMER 2 as high speed profile clock */ 162 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 174 __raw_writew(MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 | 166 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 177 mcf_settimericr(2, 7); 171 178 } 172 179