.. | .. |
---|
22 | 22 | #include <linux/clocksource.h> |
---|
23 | 23 | #include <linux/rtc.h> |
---|
24 | 24 | #include <asm/setup.h> |
---|
25 | | -#include <asm/pgtable.h> |
---|
26 | 25 | #include <asm/machdep.h> |
---|
27 | 26 | #include <asm/MC68VZ328.h> |
---|
28 | 27 | |
---|
.. | .. |
---|
68 | 67 | |
---|
69 | 68 | /***************************************************************************/ |
---|
70 | 69 | |
---|
71 | | -static struct irqaction m68328_timer_irq = { |
---|
72 | | - .name = "timer", |
---|
73 | | - .flags = IRQF_TIMER, |
---|
74 | | - .handler = hw_tick, |
---|
75 | | -}; |
---|
76 | | - |
---|
77 | | -/***************************************************************************/ |
---|
78 | | - |
---|
79 | 70 | static u64 m68328_read_clk(struct clocksource *cs) |
---|
80 | 71 | { |
---|
81 | 72 | unsigned long flags; |
---|
.. | .. |
---|
102 | 93 | |
---|
103 | 94 | void hw_timer_init(irq_handler_t handler) |
---|
104 | 95 | { |
---|
| 96 | + int ret; |
---|
| 97 | + |
---|
105 | 98 | /* disable timer 1 */ |
---|
106 | 99 | TCTL = 0; |
---|
107 | 100 | |
---|
108 | 101 | /* set ISR */ |
---|
109 | | - setup_irq(TMR_IRQ_NUM, &m68328_timer_irq); |
---|
| 102 | + ret = request_irq(TMR_IRQ_NUM, hw_tick, IRQF_TIMER, "timer", NULL); |
---|
| 103 | + if (ret) { |
---|
| 104 | + pr_err("Failed to request irq %d (timer): %pe\n", TMR_IRQ_NUM, |
---|
| 105 | + ERR_PTR(ret)); |
---|
| 106 | + } |
---|
110 | 107 | |
---|
111 | 108 | /* Restart mode, Enable int, Set clock source */ |
---|
112 | 109 | TCTL = TCTL_OM | TCTL_IRQEN | CLOCK_SOURCE; |
---|