| .. | .. |
|---|
| 82 | 82 | |
|---|
| 83 | 83 | /***************************************************************************/ |
|---|
| 84 | 84 | |
|---|
| 85 | | -static struct irqaction mcftmr_timer_irq = { |
|---|
| 86 | | - .name = "timer", |
|---|
| 87 | | - .flags = IRQF_TIMER, |
|---|
| 88 | | - .handler = mcftmr_tick, |
|---|
| 89 | | -}; |
|---|
| 90 | | - |
|---|
| 91 | | -/***************************************************************************/ |
|---|
| 92 | | - |
|---|
| 93 | 85 | static u64 mcftmr_read_clk(struct clocksource *cs) |
|---|
| 94 | 86 | { |
|---|
| 95 | 87 | unsigned long flags; |
|---|
| .. | .. |
|---|
| 118 | 110 | |
|---|
| 119 | 111 | void hw_timer_init(irq_handler_t handler) |
|---|
| 120 | 112 | { |
|---|
| 113 | + int r; |
|---|
| 114 | + |
|---|
| 121 | 115 | __raw_writew(MCFTIMER_TMR_DISABLE, TA(MCFTIMER_TMR)); |
|---|
| 122 | 116 | mcftmr_cycles_per_jiffy = FREQ / HZ; |
|---|
| 123 | 117 | /* |
|---|
| .. | .. |
|---|
| 134 | 128 | |
|---|
| 135 | 129 | timer_interrupt = handler; |
|---|
| 136 | 130 | init_timer_irq(); |
|---|
| 137 | | - setup_irq(MCF_IRQ_TIMER, &mcftmr_timer_irq); |
|---|
| 131 | + r = request_irq(MCF_IRQ_TIMER, mcftmr_tick, IRQF_TIMER, "timer", NULL); |
|---|
| 132 | + if (r) { |
|---|
| 133 | + pr_err("Failed to request irq %d (timer): %pe\n", MCF_IRQ_TIMER, |
|---|
| 134 | + ERR_PTR(r)); |
|---|
| 135 | + } |
|---|
| 138 | 136 | |
|---|
| 139 | 137 | #ifdef CONFIG_HIGHPROFILE |
|---|
| 140 | 138 | coldfire_profile_init(); |
|---|
| .. | .. |
|---|
| 170 | 168 | |
|---|
| 171 | 169 | /***************************************************************************/ |
|---|
| 172 | 170 | |
|---|
| 173 | | -static struct irqaction coldfire_profile_irq = { |
|---|
| 174 | | - .name = "profile timer", |
|---|
| 175 | | - .flags = IRQF_TIMER, |
|---|
| 176 | | - .handler = coldfire_profile_tick, |
|---|
| 177 | | -}; |
|---|
| 178 | | - |
|---|
| 179 | 171 | void coldfire_profile_init(void) |
|---|
| 180 | 172 | { |
|---|
| 173 | + int ret; |
|---|
| 174 | + |
|---|
| 181 | 175 | printk(KERN_INFO "PROFILE: lodging TIMER2 @ %dHz as profile timer\n", |
|---|
| 182 | 176 | PROFILEHZ); |
|---|
| 183 | 177 | |
|---|
| .. | .. |
|---|
| 188 | 182 | __raw_writew(MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 | |
|---|
| 189 | 183 | MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE, PA(MCFTIMER_TMR)); |
|---|
| 190 | 184 | |
|---|
| 191 | | - setup_irq(MCF_IRQ_PROFILER, &coldfire_profile_irq); |
|---|
| 185 | + ret = request_irq(MCF_IRQ_PROFILER, coldfire_profile_tick, IRQF_TIMER, |
|---|
| 186 | + "profile timer", NULL); |
|---|
| 187 | + if (ret) { |
|---|
| 188 | + pr_err("Failed to request irq %d (profile timer): %pe\n", |
|---|
| 189 | + MCF_IRQ_PROFILER, ERR_PTR(ret)); |
|---|
| 190 | + } |
|---|
| 192 | 191 | } |
|---|
| 193 | 192 | |
|---|
| 194 | 193 | /***************************************************************************/ |
|---|