aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68knommu
diff options
context:
space:
mode:
authorMatt Waddel <Matt.Waddel@freescale.com>2008-02-14 22:31:27 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-14 23:58:05 -0500
commit6ef1e56776aad1fe7381b5bc64e39ff80aa33899 (patch)
treed2cb54557c362f7670cc6f7ee5d0a0d0bbdd76b4 /arch/m68knommu
parentc25f0a0f7fc37f39341a120a945ff7fe06b8ab4e (diff)
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>
Diffstat (limited to 'arch/m68knommu')
-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