forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/arch/arm/mach-ebsa110/core.c
....@@ -1,11 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * linux/arch/arm/mach-ebsa110/core.c
34 *
45 * Copyright (C) 1998-2001 Russell King
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License version 2 as
8
- * published by the Free Software Foundation.
96 *
107 * Extra MM routines for the EBSA-110 architecture
118 */
....@@ -20,7 +17,6 @@
2017 #include <asm/irq.h>
2118 #include <asm/setup.h>
2219 #include <asm/mach-types.h>
23
-#include <asm/pgtable.h>
2420 #include <asm/page.h>
2521 #include <asm/system_misc.h>
2622
....@@ -204,17 +200,13 @@
204200 return IRQ_HANDLED;
205201 }
206202
207
-static struct irqaction ebsa110_timer_irq = {
208
- .name = "EBSA110 Timer Tick",
209
- .flags = IRQF_TIMER | IRQF_IRQPOLL,
210
- .handler = ebsa110_timer_interrupt,
211
-};
212
-
213203 /*
214204 * Set up timer interrupt.
215205 */
216206 void __init ebsa110_timer_init(void)
217207 {
208
+ int irq = IRQ_EBSA110_TIMER0;
209
+
218210 arch_gettimeoffset = ebsa110_gettimeoffset;
219211
220212 /*
....@@ -224,7 +216,9 @@
224216 __raw_writeb(COUNT & 0xff, PIT_T1);
225217 __raw_writeb(COUNT >> 8, PIT_T1);
226218
227
- setup_irq(IRQ_EBSA110_TIMER0, &ebsa110_timer_irq);
219
+ if (request_irq(irq, ebsa110_timer_interrupt, IRQF_TIMER | IRQF_IRQPOLL,
220
+ "EBSA110 Timer Tick", NULL))
221
+ pr_err("Failed to request irq %d (EBSA110 Timer Tick)\n", irq);
228222 }
229223
230224 static struct plat_serial8250_port serial_platform_data[] = {