.. | .. |
---|
50 | 50 | return IRQ_HANDLED; |
---|
51 | 51 | } |
---|
52 | 52 | |
---|
53 | | -static struct irqaction mcfslt_profile_irq = { |
---|
54 | | - .name = "profile timer", |
---|
55 | | - .flags = IRQF_TIMER, |
---|
56 | | - .handler = mcfslt_profile_tick, |
---|
57 | | -}; |
---|
58 | | - |
---|
59 | 53 | void mcfslt_profile_init(void) |
---|
60 | 54 | { |
---|
| 55 | + int ret; |
---|
| 56 | + |
---|
61 | 57 | printk(KERN_INFO "PROFILE: lodging TIMER 1 @ %dHz as profile timer\n", |
---|
62 | 58 | PROFILEHZ); |
---|
63 | 59 | |
---|
64 | | - setup_irq(MCF_IRQ_PROFILER, &mcfslt_profile_irq); |
---|
| 60 | + ret = request_irq(MCF_IRQ_PROFILER, mcfslt_profile_tick, IRQF_TIMER, |
---|
| 61 | + "profile timer", NULL); |
---|
| 62 | + if (ret) { |
---|
| 63 | + pr_err("Failed to request irq %d (profile timer): %pe\n", |
---|
| 64 | + MCF_IRQ_PROFILER, ERR_PTR(ret)); |
---|
| 65 | + } |
---|
65 | 66 | |
---|
66 | 67 | /* Set up TIMER 2 as high speed profile clock */ |
---|
67 | 68 | __raw_writel(MCF_BUSCLK / PROFILEHZ - 1, PA(MCFSLT_STCNT)); |
---|
.. | .. |
---|
92 | 93 | return timer_interrupt(irq, dummy); |
---|
93 | 94 | } |
---|
94 | 95 | |
---|
95 | | -static struct irqaction mcfslt_timer_irq = { |
---|
96 | | - .name = "timer", |
---|
97 | | - .flags = IRQF_TIMER, |
---|
98 | | - .handler = mcfslt_tick, |
---|
99 | | -}; |
---|
100 | | - |
---|
101 | 96 | static u64 mcfslt_read_clk(struct clocksource *cs) |
---|
102 | 97 | { |
---|
103 | 98 | unsigned long flags; |
---|
.. | .. |
---|
126 | 121 | |
---|
127 | 122 | void hw_timer_init(irq_handler_t handler) |
---|
128 | 123 | { |
---|
| 124 | + int r; |
---|
| 125 | + |
---|
129 | 126 | mcfslt_cycles_per_jiffy = MCF_BUSCLK / HZ; |
---|
130 | 127 | /* |
---|
131 | 128 | * The coldfire slice timer (SLT) runs from STCNT to 0 included, |
---|
.. | .. |
---|
140 | 137 | mcfslt_cnt = mcfslt_cycles_per_jiffy; |
---|
141 | 138 | |
---|
142 | 139 | timer_interrupt = handler; |
---|
143 | | - setup_irq(MCF_IRQ_TIMER, &mcfslt_timer_irq); |
---|
| 140 | + r = request_irq(MCF_IRQ_TIMER, mcfslt_tick, IRQF_TIMER, "timer", NULL); |
---|
| 141 | + if (r) { |
---|
| 142 | + pr_err("Failed to request irq %d (timer): %pe\n", MCF_IRQ_TIMER, |
---|
| 143 | + ERR_PTR(r)); |
---|
| 144 | + } |
---|
144 | 145 | |
---|
145 | 146 | clocksource_register_hz(&mcfslt_clk, MCF_BUSCLK); |
---|
146 | 147 | |
---|