diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2008-01-30 15:25:48 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2008-01-30 15:25:48 +0000 |
commit | cb6ae8cb76641181d435bdb4220119343892e3f5 (patch) | |
tree | 483bb26f5be14c67ed308caaad451e75cd3a92e1 /target/linux/adm5120/files/arch/mips | |
parent | 0055d6efe2e51983fa506e6077710f43b20e011c (diff) | |
download | master-187ad058-cb6ae8cb76641181d435bdb4220119343892e3f5.tar.gz master-187ad058-cb6ae8cb76641181d435bdb4220119343892e3f5.tar.bz2 master-187ad058-cb6ae8cb76641181d435bdb4220119343892e3f5.zip |
[adm5120] add preliminary support for 2.6.24
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10329 3c298f89-4303-0410-b956-a3cf2f4a3e73
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 ca509859ba..9046057f9f 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 b36cea647a..66eb1ce7df 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 |