forked from coolsnowwolf/lede
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ramips: adapted cevt-r4k irq patches
Fixes: coolsnowwolf#13251
- Loading branch information
1 parent
b522d5b
commit ccb92be
Showing
2 changed files
with
40 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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); | ||
|