.. | .. |
---|
111 | 111 | |
---|
112 | 112 | /***************************************************************************/ |
---|
113 | 113 | |
---|
114 | | -static struct irqaction pit_irq = { |
---|
115 | | - .name = "timer", |
---|
116 | | - .flags = IRQF_TIMER, |
---|
117 | | - .handler = pit_tick, |
---|
118 | | -}; |
---|
119 | | - |
---|
120 | | -/***************************************************************************/ |
---|
121 | | - |
---|
122 | 114 | static u64 pit_read_clk(struct clocksource *cs) |
---|
123 | 115 | { |
---|
124 | 116 | unsigned long flags; |
---|
.. | .. |
---|
146 | 138 | |
---|
147 | 139 | void hw_timer_init(irq_handler_t handler) |
---|
148 | 140 | { |
---|
| 141 | + int ret; |
---|
| 142 | + |
---|
149 | 143 | cf_pit_clockevent.cpumask = cpumask_of(smp_processor_id()); |
---|
150 | 144 | cf_pit_clockevent.mult = div_sc(FREQ, NSEC_PER_SEC, 32); |
---|
151 | 145 | cf_pit_clockevent.max_delta_ns = |
---|
.. | .. |
---|
156 | 150 | cf_pit_clockevent.min_delta_ticks = 0x3f; |
---|
157 | 151 | clockevents_register_device(&cf_pit_clockevent); |
---|
158 | 152 | |
---|
159 | | - setup_irq(MCF_IRQ_PIT1, &pit_irq); |
---|
| 153 | + ret = request_irq(MCF_IRQ_PIT1, pit_tick, IRQF_TIMER, "timer", NULL); |
---|
| 154 | + if (ret) { |
---|
| 155 | + pr_err("Failed to request irq %d (timer): %pe\n", MCF_IRQ_PIT1, |
---|
| 156 | + ERR_PTR(ret)); |
---|
| 157 | + } |
---|
160 | 158 | |
---|
161 | 159 | clocksource_register_hz(&pit_clk, FREQ); |
---|
162 | 160 | } |
---|