Skip to content

Commit

Permalink
[bot] AutoMerging: merge all upstream's changes:
Browse files Browse the repository at this point in the history
* https://github.com/coolsnowwolf/lede:
  ramips: adapted cevt-r4k irq patches
  • Loading branch information
zesming committed Jan 4, 2025
2 parents cec0aec + ccb92be commit f0b8cd2
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,28 @@ Signed-off-by: John Crispin <[email protected]>
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
Expand All @@ -90,7 +107,7 @@ Signed-off-by: John Crispin <[email protected]>
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,28 @@ Signed-off-by: John Crispin <[email protected]>
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
Expand All @@ -90,7 +107,7 @@ Signed-off-by: John Crispin <[email protected]>
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);
Expand Down

0 comments on commit f0b8cd2

Please sign in to comment.