mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [M68KNOMMU]: fix profile timer
@ 2008-02-12  6:16 Greg Ungerer
  0 siblings, 0 replies; only message in thread
From: Greg Ungerer @ 2008-02-12  6:16 UTC (permalink / raw)
  To: torvalds; +Cc: gerg, linux-kernel

From: Matt Waddel <Matt.Waddel@freescale.com>

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.

This patch gets it compiling and running on a 2.6.23
uClinux kernel.  Please apply if you think it's OK.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
---

diff -Naurp linux-2.6.25-rc1/arch/m68knommu/platform/coldfire/timers.c linux-2.6.x/arch/m68knommu/platform/coldfire/timers.c
--- linux-2.6.25-rc1/arch/m68knommu/platform/coldfire/timers.c	2008-02-11 14:50:21.000000000 +1000
+++ linux-2.6.x/arch/m68knommu/platform/coldfire/timers.c	2008-02-12 14:05:13.000000000 +1000
@@ -148,25 +148,32 @@ irqreturn_t coldfire_profile_tick(int ir
 	/* Reset ColdFire timer2 */
 	__raw_writeb(MCFTIMER_TER_CAP | MCFTIMER_TER_REF, PA(MCFTIMER_TER));
 	if (current->pid)
-		profile_tick(CPU_PROFILING, regs);
+		profile_tick(CPU_PROFILING);
 	return IRQ_HANDLED;
 }
 
 /***************************************************************************/
 
+static struct irqaction coldfire_profile_irq = {
+	.name	 = "profile timer",
+	.flags	 = IRQF_DISABLED | IRQF_TIMER,
+	.handler = coldfire_profile_tick,
+};
+
 void coldfire_profile_init(void)
 {
-	printk(KERN_INFO "PROFILE: lodging TIMER2 @ %dHz as profile timer\n", PROFILEHZ);
+	printk(KERN_INFO "PROFILE: lodging TIMER2 @ %dHz as profile timer\n", 
+	       PROFILEHZ);
+
+	setup_irq(mcf_profilevector, &coldfire_profile_irq);
 
 	/* Set up TIMER 2 as high speed profile clock */
 	__raw_writew(MCFTIMER_TMR_DISABLE, PA(MCFTIMER_TMR));
 
-	__raw_writetrr(((MCF_CLK / 16) / PROFILEHZ), PA(MCFTIMER_TRR));
+	__raw_writetrr(((MCF_BUSCLK / 16) / PROFILEHZ), PA(MCFTIMER_TRR));
 	__raw_writew(MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 |
 		MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE, PA(MCFTIMER_TMR));
 
-	request_irq(mcf_profilevector, coldfire_profile_tick,
-		(IRQF_DISABLED | IRQ_FLG_FAST), "profile timer", NULL);
 	mcf_settimericr(2, 7);
 }
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-02-12  6:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-12  6:16 [M68KNOMMU]: fix profile timer Greg Ungerer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®