oxnas: drop compatibility with old kernels from irq-rps
[lede-git/.git] / target / linux / oxnas / files / arch / arm / mach-oxnas / mach-ox820.c
index 718bad7194aa3822ee147523557bdf232eee5f63..1e3b12d1a2a621d63d68a040b555836bccd53ce7 100644 (file)
@@ -8,6 +8,7 @@
 #include <linux/slab.h>
 #include <linux/gfp.h>
 #include <linux/reset.h>
+#include <linux/version.h>
 #include <asm/mach-types.h>
 #include <asm/mach/map.h>
 #include <asm/mach/arch.h>
@@ -73,7 +74,11 @@ static void __init ox820_dt_init(void)
 static void __init ox820_timer_init(void)
 {
        of_clk_init(NULL);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,3,0)
        clocksource_of_init();
+#else
+       clocksource_probe();
+#endif
 }
 
 void ox820_init_early(void)
@@ -147,12 +152,12 @@ void ox820_assert_system_reset(enum reboot_mode mode, const char *cmd)
        writel(0, SYS_CTRL_ALTERNATIVE_SEL);
        writel(0, SYS_CTRL_PULLUP_SEL);
 
-       writel(0, SYS_CTRL_SECONDARY_SEL);
-       writel(0, SYS_CTRL_TERTIARY_SEL);
-       writel(0, SYS_CTRL_QUATERNARY_SEL);
-       writel(0, SYS_CTRL_DEBUG_SEL);
-       writel(0, SYS_CTRL_ALTERNATIVE_SEL);
-       writel(0, SYS_CTRL_PULLUP_SEL);
+       writel(0, SEC_CTRL_SECONDARY_SEL);
+       writel(0, SEC_CTRL_TERTIARY_SEL);
+       writel(0, SEC_CTRL_QUATERNARY_SEL);
+       writel(0, SEC_CTRL_DEBUG_SEL);
+       writel(0, SEC_CTRL_ALTERNATIVE_SEL);
+       writel(0, SEC_CTRL_PULLUP_SEL);
 
        /* No need to save any state, as the ROM loader can determine whether
         * reset is due to power cycling or programatic action, just hit the