11 #include <linux/kernel.h>
13 #include <linux/sched.h>
19 #include <asm/traps.h>
20 #include <asm/machdep.h>
30 #define FREQ (MCF_BUSCLK / 16)
31 #define TA(a) (MCFTIMER_BASE1 + (a))
39 #if defined(CONFIG_M532x) || defined(CONFIG_M5441x)
40 #define __raw_readtrr __raw_readl
41 #define __raw_writetrr __raw_writel
43 #define __raw_readtrr __raw_readw
44 #define __raw_writetrr __raw_writew
47 static u32 mcftmr_cycles_per_jiffy;
48 static u32 mcftmr_cnt;
54 static void init_timer_irq(
void)
56 #ifdef MCFSIM_ICR_AUTOVEC
62 #ifdef CONFIG_HIGHPROFILE
78 mcftmr_cnt += mcftmr_cycles_per_jiffy;
79 return timer_interrupt(irq, dummy);
84 static struct irqaction mcftmr_timer_irq = {
87 .handler = mcftmr_tick,
111 .read = mcftmr_read_clk,
121 mcftmr_cycles_per_jiffy =
FREQ /
HZ;
132 clocksource_register_hz(&mcftmr_clk,
FREQ);
134 timer_interrupt = handler;
138 #ifdef CONFIG_HIGHPROFILE
144 #ifdef CONFIG_HIGHPROFILE
150 #define PA(a) (MCFTIMER_BASE2 + (a))
156 #define PROFILEHZ 1013
161 irqreturn_t coldfire_profile_tick(
int irq,
void *dummy)
172 static struct irqaction coldfire_profile_irq = {
173 .
name =
"profile timer",
175 .handler = coldfire_profile_tick,