hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/arch/mips/loongson32/common/time.c
....@@ -1,10 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Copyright (c) 2014 Zhang, Keguang <keguang.zhang@gmail.com>
3
- *
4
- * This program is free software; you can redistribute it and/or modify it
5
- * under the terms of the GNU General Public License as published by the
6
- * Free Software Foundation; either version 2 of the License, or (at your
7
- * option) any later version.
84 */
95
106 #include <linux/clk.h>
....@@ -53,7 +49,7 @@
5349
5450 void __init ls1x_pwmtimer_init(void)
5551 {
56
- timer_reg_base = ioremap_nocache(LS1X_TIMER_BASE, SZ_16);
52
+ timer_reg_base = ioremap(LS1X_TIMER_BASE, SZ_16);
5753 if (!timer_reg_base)
5854 panic("Failed to remap timer registers");
5955
....@@ -180,13 +176,6 @@
180176 .tick_resume = ls1x_clockevent_tick_resume,
181177 };
182178
183
-static struct irqaction ls1x_pwmtimer_irqaction = {
184
- .name = "ls1x-pwmtimer",
185
- .handler = ls1x_clockevent_isr,
186
- .dev_id = &ls1x_clockevent,
187
- .flags = IRQF_PERCPU | IRQF_TIMER,
188
-};
189
-
190179 static void __init ls1x_time_init(void)
191180 {
192181 struct clock_event_device *cd = &ls1x_clockevent;
....@@ -210,7 +199,10 @@
210199 if (ret)
211200 panic(KERN_ERR "Failed to register clocksource: %d\n", ret);
212201
213
- setup_irq(LS1X_TIMER_IRQ, &ls1x_pwmtimer_irqaction);
202
+ if (request_irq(LS1X_TIMER_IRQ, ls1x_clockevent_isr,
203
+ IRQF_PERCPU | IRQF_TIMER, "ls1x-pwmtimer",
204
+ &ls1x_clockevent))
205
+ pr_err("Failed to register ls1x-pwmtimer interrupt\n");
214206 }
215207 #endif /* CONFIG_CEVT_CSRC_LS1X */
216208