make current AR7 code 2.6.24 aware, for future use
[librecmc/librecmc.git] / target / linux / ar7 / files / arch / mips / ar7 / time.c
index 6a32bf63ecadf564a5afc9e2ea4bf0f870459e8d..e6a98ed89a5a79cd137a7cad274514b7f4638b2c 100644 (file)
  * Setting up the clock on the MIPS boards.
  */
 
+#include <linux/version.h>
 #include <asm/time.h>
 #include <asm/ar7/ar7.h>
 
-void __init ar7_time_init(void)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24) /* TODO remove when 2.6.24 is stable */
+void __init plat_timer_setup(struct irqaction *irq)
 {
-       mips_hpt_frequency = ar7_cpu_freq() / 2;
+       setup_irq(7, irq);
 }
 
-void __init plat_timer_setup(struct irqaction *irq)
+void __init ar7_time_init(void)
+#else
+void __init plat_time_init(void)
+#endif
 {
-       setup_irq(7, irq);
+       mips_hpt_frequency = ar7_cpu_freq() / 2;
 }