mirror of
https://github.com/coolsnowwolf/lede
synced 2025-01-07 07:46:47 +08:00
parent
b522d5bdb9
commit
ccb92beeda
@ -73,11 +73,28 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
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 <blogic@openwrt.org>
|
||||
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);
|
||||
|
@ -73,11 +73,28 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
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 <blogic@openwrt.org>
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user