hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/arch/m68k/coldfire/sltimers.c
....@@ -50,18 +50,19 @@
5050 return IRQ_HANDLED;
5151 }
5252
53
-static struct irqaction mcfslt_profile_irq = {
54
- .name = "profile timer",
55
- .flags = IRQF_TIMER,
56
- .handler = mcfslt_profile_tick,
57
-};
58
-
5953 void mcfslt_profile_init(void)
6054 {
55
+ int ret;
56
+
6157 printk(KERN_INFO "PROFILE: lodging TIMER 1 @ %dHz as profile timer\n",
6258 PROFILEHZ);
6359
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
+ }
6566
6667 /* Set up TIMER 2 as high speed profile clock */
6768 __raw_writel(MCF_BUSCLK / PROFILEHZ - 1, PA(MCFSLT_STCNT));
....@@ -92,12 +93,6 @@
9293 return timer_interrupt(irq, dummy);
9394 }
9495
95
-static struct irqaction mcfslt_timer_irq = {
96
- .name = "timer",
97
- .flags = IRQF_TIMER,
98
- .handler = mcfslt_tick,
99
-};
100
-
10196 static u64 mcfslt_read_clk(struct clocksource *cs)
10297 {
10398 unsigned long flags;
....@@ -126,6 +121,8 @@
126121
127122 void hw_timer_init(irq_handler_t handler)
128123 {
124
+ int r;
125
+
129126 mcfslt_cycles_per_jiffy = MCF_BUSCLK / HZ;
130127 /*
131128 * The coldfire slice timer (SLT) runs from STCNT to 0 included,
....@@ -140,7 +137,11 @@
140137 mcfslt_cnt = mcfslt_cycles_per_jiffy;
141138
142139 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
+ }
144145
145146 clocksource_register_hz(&mcfslt_clk, MCF_BUSCLK);
146147