Skip to content

Commit ccb92be

Browse files
committed
ramips: adapted cevt-r4k irq patches
Fixes: #13251
1 parent b522d5b commit ccb92be

File tree

2 files changed

+40
-6
lines changed

2 files changed

+40
-6
lines changed

target/linux/ramips/patches-5.10/311-MIPS-use-set_mode-to-enable-disable-the-cevt-r4k-irq.patch

+20-3
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,28 @@ Signed-off-by: John Crispin <[email protected]>
7373
unsigned int cpu = smp_processor_id();
7474
struct clock_event_device *cd;
7575
unsigned int irq, min_delta;
76-
@@ -326,11 +353,16 @@ int r4k_clockevent_init(void)
76+
@@ -303,6 +330,15 @@ int r4k_clockevent_init(void)
77+
if (!c0_compare_int_usable())
78+
return -ENXIO;
79+
80+
+#ifdef CONFIG_CEVT_SYSTICK_QUIRK
81+
+ /*
82+
+ * With vectored interrupts things are getting platform specific.
83+
+ * get_c0_compare_int is a hook to allow a platform to return the
84+
+ * interrupt number of its liking.
85+
+ */
86+
+ irq = get_c0_compare_int();
87+
+#endif
88+
+
89+
cd = &per_cpu(mips_clockevent_device, cpu);
90+
91+
cd->name = "MIPS";
92+
@@ -314,11 +350,17 @@ int r4k_clockevent_init(void)
93+
7794
cd->rating = 300;
78-
cd->irq = irq;
7995
cd->cpumask = cpumask_of(cpu);
8096
+#ifdef CONFIG_CEVT_SYSTICK_QUIRK
97+
+ cd->irq = irq;
8198
+ cd->set_state_shutdown = mips_state_shutdown;
8299
+ cd->set_state_oneshot = mips_state_oneshot;
83100
+#endif
@@ -90,7 +107,7 @@ Signed-off-by: John Crispin <[email protected]>
90107
if (cp0_timer_irq_installed)
91108
return 0;
92109

93-
@@ -339,6 +371,7 @@ int r4k_clockevent_init(void)
110+
@@ -334,6 +376,7 @@ int r4k_clockevent_init(void)
94111
if (request_irq(irq, c0_compare_interrupt, flags, "timer",
95112
c0_compare_interrupt))
96113
pr_err("Failed to request irq %d (timer)\n", irq);

target/linux/ramips/patches-5.15/311-MIPS-use-set_mode-to-enable-disable-the-cevt-r4k-irq.patch

+20-3
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,28 @@ Signed-off-by: John Crispin <[email protected]>
7373
unsigned int cpu = smp_processor_id();
7474
struct clock_event_device *cd;
7575
unsigned int irq, min_delta;
76-
@@ -322,11 +349,16 @@ int r4k_clockevent_init(void)
76+
@@ -303,6 +330,15 @@ int r4k_clockevent_init(void)
77+
if (!c0_compare_int_usable())
78+
return -ENXIO;
79+
80+
+#ifdef CONFIG_CEVT_SYSTICK_QUIRK
81+
+ /*
82+
+ * With vectored interrupts things are getting platform specific.
83+
+ * get_c0_compare_int is a hook to allow a platform to return the
84+
+ * interrupt number of its liking.
85+
+ */
86+
+ irq = get_c0_compare_int();
87+
+#endif
88+
+
89+
cd = &per_cpu(mips_clockevent_device, cpu);
90+
91+
cd->name = "MIPS";
92+
@@ -314,11 +350,17 @@ int r4k_clockevent_init(void)
93+
7794
cd->rating = 300;
78-
cd->irq = irq;
7995
cd->cpumask = cpumask_of(cpu);
8096
+#ifdef CONFIG_CEVT_SYSTICK_QUIRK
97+
+ cd->irq = irq;
8198
+ cd->set_state_shutdown = mips_state_shutdown;
8299
+ cd->set_state_oneshot = mips_state_oneshot;
83100
+#endif
@@ -90,7 +107,7 @@ Signed-off-by: John Crispin <[email protected]>
90107
if (cp0_timer_irq_installed)
91108
return 0;
92109

93-
@@ -335,6 +367,7 @@ int r4k_clockevent_init(void)
110+
@@ -334,6 +376,7 @@ int r4k_clockevent_init(void)
94111
if (request_irq(irq, c0_compare_interrupt, flags, "timer",
95112
c0_compare_interrupt))
96113
pr_err("Failed to request irq %d (timer)\n", irq);

0 commit comments

Comments
 (0)