diff --git a/target/linux/ramips/patches-5.10/311-MIPS-use-set_mode-to-enable-disable-the-cevt-r4k-irq.patch b/target/linux/ramips/patches-5.10/311-MIPS-use-set_mode-to-enable-disable-the-cevt-r4k-irq.patch index a0b81bc6c..6fb582bfb 100644 --- a/target/linux/ramips/patches-5.10/311-MIPS-use-set_mode-to-enable-disable-the-cevt-r4k-irq.patch +++ b/target/linux/ramips/patches-5.10/311-MIPS-use-set_mode-to-enable-disable-the-cevt-r4k-irq.patch @@ -73,11 +73,28 @@ Signed-off-by: John Crispin unsigned int cpu = smp_processor_id(); struct clock_event_device *cd; unsigned int irq, min_delta; -@@ -326,11 +353,16 @@ int r4k_clockevent_init(void) +@@ -303,6 +330,15 @@ int r4k_clockevent_init(void) + if (!c0_compare_int_usable()) + return -ENXIO; + ++#ifdef CONFIG_CEVT_SYSTICK_QUIRK ++ /* ++ * With vectored interrupts things are getting platform specific. ++ * get_c0_compare_int is a hook to allow a platform to return the ++ * interrupt number of its liking. ++ */ ++ irq = get_c0_compare_int(); ++#endif ++ + cd = &per_cpu(mips_clockevent_device, cpu); + + cd->name = "MIPS"; +@@ -314,11 +350,17 @@ int r4k_clockevent_init(void) + cd->rating = 300; - cd->irq = irq; cd->cpumask = cpumask_of(cpu); +#ifdef CONFIG_CEVT_SYSTICK_QUIRK ++ cd->irq = irq; + cd->set_state_shutdown = mips_state_shutdown; + cd->set_state_oneshot = mips_state_oneshot; +#endif @@ -90,7 +107,7 @@ Signed-off-by: John Crispin if (cp0_timer_irq_installed) return 0; -@@ -339,6 +371,7 @@ int r4k_clockevent_init(void) +@@ -334,6 +376,7 @@ int r4k_clockevent_init(void) if (request_irq(irq, c0_compare_interrupt, flags, "timer", c0_compare_interrupt)) pr_err("Failed to request irq %d (timer)\n", irq); diff --git a/target/linux/ramips/patches-5.15/311-MIPS-use-set_mode-to-enable-disable-the-cevt-r4k-irq.patch b/target/linux/ramips/patches-5.15/311-MIPS-use-set_mode-to-enable-disable-the-cevt-r4k-irq.patch index 172cf98ad..da6b5bc05 100644 --- a/target/linux/ramips/patches-5.15/311-MIPS-use-set_mode-to-enable-disable-the-cevt-r4k-irq.patch +++ b/target/linux/ramips/patches-5.15/311-MIPS-use-set_mode-to-enable-disable-the-cevt-r4k-irq.patch @@ -73,11 +73,28 @@ Signed-off-by: John Crispin unsigned int cpu = smp_processor_id(); struct clock_event_device *cd; unsigned int irq, min_delta; -@@ -322,11 +349,16 @@ int r4k_clockevent_init(void) +@@ -303,6 +330,15 @@ int r4k_clockevent_init(void) + if (!c0_compare_int_usable()) + return -ENXIO; + ++#ifdef CONFIG_CEVT_SYSTICK_QUIRK ++ /* ++ * With vectored interrupts things are getting platform specific. ++ * get_c0_compare_int is a hook to allow a platform to return the ++ * interrupt number of its liking. ++ */ ++ irq = get_c0_compare_int(); ++#endif ++ + cd = &per_cpu(mips_clockevent_device, cpu); + + cd->name = "MIPS"; +@@ -314,11 +350,17 @@ int r4k_clockevent_init(void) + cd->rating = 300; - cd->irq = irq; cd->cpumask = cpumask_of(cpu); +#ifdef CONFIG_CEVT_SYSTICK_QUIRK ++ cd->irq = irq; + cd->set_state_shutdown = mips_state_shutdown; + cd->set_state_oneshot = mips_state_oneshot; +#endif @@ -90,7 +107,7 @@ Signed-off-by: John Crispin if (cp0_timer_irq_installed) return 0; -@@ -335,6 +367,7 @@ int r4k_clockevent_init(void) +@@ -334,6 +376,7 @@ int r4k_clockevent_init(void) if (request_irq(irq, c0_compare_interrupt, flags, "timer", c0_compare_interrupt)) pr_err("Failed to request irq %d (timer)\n", irq);