hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/arch/arm/mach-ep93xx/timer-ep93xx.c
....@@ -9,6 +9,7 @@
99 #include <linux/io.h>
1010 #include <asm/mach/time.h>
1111 #include "soc.h"
12
+#include "platform.h"
1213
1314 /*************************************************************************
1415 * Timer handling for EP93xx
....@@ -60,7 +61,7 @@
6061 return ret;
6162 }
6263
63
-u64 ep93xx_clocksource_read(struct clocksource *c)
64
+static u64 ep93xx_clocksource_read(struct clocksource *c)
6465 {
6566 u64 ret;
6667
....@@ -117,15 +118,11 @@
117118 return IRQ_HANDLED;
118119 }
119120
120
-static struct irqaction ep93xx_timer_irq = {
121
- .name = "ep93xx timer",
122
- .flags = IRQF_TIMER | IRQF_IRQPOLL,
123
- .handler = ep93xx_timer_interrupt,
124
- .dev_id = &ep93xx_clockevent,
125
-};
126
-
127121 void __init ep93xx_timer_init(void)
128122 {
123
+ int irq = IRQ_EP93XX_TIMER3;
124
+ unsigned long flags = IRQF_TIMER | IRQF_IRQPOLL;
125
+
129126 /* Enable and register clocksource and sched_clock on timer 4 */
130127 writel(EP93XX_TIMER4_VALUE_HIGH_ENABLE,
131128 EP93XX_TIMER4_VALUE_HIGH);
....@@ -136,7 +133,9 @@
136133 EP93XX_TIMER4_RATE);
137134
138135 /* Set up clockevent on timer 3 */
139
- setup_irq(IRQ_EP93XX_TIMER3, &ep93xx_timer_irq);
136
+ if (request_irq(irq, ep93xx_timer_interrupt, flags, "ep93xx timer",
137
+ &ep93xx_clockevent))
138
+ pr_err("Failed to request irq %d (ep93xx timer)\n", irq);
140139 clockevents_config_and_register(&ep93xx_clockevent,
141140 EP93XX_TIMER123_RATE,
142141 1,