diff options
Diffstat (limited to 'target/linux/adm5120/files/arch/mips')
-rw-r--r-- | target/linux/adm5120/files/arch/mips/adm5120/setup.c | 6 | ||||
-rw-r--r-- | target/linux/adm5120/files/arch/mips/adm5120/time.c | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/target/linux/adm5120/files/arch/mips/adm5120/setup.c b/target/linux/adm5120/files/arch/mips/adm5120/setup.c index ca509859b..9046057f9 100644 --- a/target/linux/adm5120/files/arch/mips/adm5120/setup.c +++ b/target/linux/adm5120/files/arch/mips/adm5120/setup.c @@ -23,6 +23,7 @@ #include <linux/init.h> #include <linux/kernel.h> #include <linux/io.h> +#include <linux/version.h> #include <asm/reboot.h> #include <asm/time.h> @@ -59,7 +60,10 @@ void __init plat_mem_setup(void) adm5120_mem_init(); adm5120_report(); - board_time_init = adm5120_time_init; +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)) +extern void plat_time_init(void) __init; + board_time_init = plat_time_init; +#endif _machine_restart = adm5120_restart; _machine_halt = adm5120_halt; diff --git a/target/linux/adm5120/files/arch/mips/adm5120/time.c b/target/linux/adm5120/files/arch/mips/adm5120/time.c index b36cea647..66eb1ce7d 100644 --- a/target/linux/adm5120/files/arch/mips/adm5120/time.c +++ b/target/linux/adm5120/files/arch/mips/adm5120/time.c @@ -21,6 +21,7 @@ #include <linux/init.h> #include <linux/interrupt.h> #include <linux/timex.h> +#include <linux/version.h> #include <asm/irq.h> #include <asm/cpu.h> @@ -29,11 +30,12 @@ #include <adm5120_info.h> #include <adm5120_irq.h> -void __init adm5120_time_init(void) +void __init plat_time_init(void) { mips_hpt_frequency = adm5120_speed / 2; } +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)) void __init plat_timer_setup(struct irqaction *irq) { clear_c0_status(ST0_BEV); @@ -41,3 +43,4 @@ void __init plat_timer_setup(struct irqaction *irq) /* Install ISR for CPU Counter interrupt */ setup_irq(ADM5120_IRQ_COUNTER, irq); } +#endif |