summaryrefslogtreecommitdiffstats
path: root/target/linux/adm5120/files/arch/mips
diff options
context:
space:
mode:
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2008-01-30 15:25:48 +0000
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2008-01-30 15:25:48 +0000
commit13ac16c77f791167b60e4b5d8e36033ec0c7ead3 (patch)
tree483bb26f5be14c67ed308caaad451e75cd3a92e1 /target/linux/adm5120/files/arch/mips
parent59dc59994cc0f7837e5cb8a6982d7cef06e5ce87 (diff)
[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.c6
-rw-r--r--target/linux/adm5120/files/arch/mips/adm5120/time.c5
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