summaryrefslogtreecommitdiff
path: root/target/linux/atheros/files/arch/mips
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/atheros/files/arch/mips')
-rw-r--r--target/linux/atheros/files/arch/mips/atheros/ar531x.h4
-rw-r--r--target/linux/atheros/files/arch/mips/atheros/board.c9
-rw-r--r--target/linux/atheros/files/arch/mips/atheros/prom.c1
3 files changed, 13 insertions, 1 deletions
diff --git a/target/linux/atheros/files/arch/mips/atheros/ar531x.h b/target/linux/atheros/files/arch/mips/atheros/ar531x.h
index 5256a548ce..d790a88073 100644
--- a/target/linux/atheros/files/arch/mips/atheros/ar531x.h
+++ b/target/linux/atheros/files/arch/mips/atheros/ar531x.h
@@ -1,11 +1,15 @@
#ifndef __AR531X_H
#define __AR531X_H
+#include <linux/version.h>
#include <asm/cpu-info.h>
#include <ar531x_platform.h>
#include "ar5312/ar5312.h"
#include "ar5315/ar5315.h"
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24))
+extern void (*board_time_init)(void);
+#endif
/*
* C access to CLZ instruction
diff --git a/target/linux/atheros/files/arch/mips/atheros/board.c b/target/linux/atheros/files/arch/mips/atheros/board.c
index ebb4a5afef..ccbda48546 100644
--- a/target/linux/atheros/files/arch/mips/atheros/board.c
+++ b/target/linux/atheros/files/arch/mips/atheros/board.c
@@ -180,6 +180,7 @@ const char *get_system_type(void)
return "Atheros (unknown)";
}
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))
void __init plat_timer_setup(struct irqaction *irq)
{
unsigned int count;
@@ -191,6 +192,7 @@ void __init plat_timer_setup(struct irqaction *irq)
count = read_c0_count();
write_c0_compare(count + 1000);
}
+#endif
asmlinkage void plat_irq_dispatch(void)
{
@@ -198,6 +200,13 @@ asmlinkage void plat_irq_dispatch(void)
DO_AR5315(ar5315_irq_dispatch();)
}
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24))
+void (*board_time_init)(void);
+void __init plat_time_init(void) {
+ board_time_init();
+}
+#endif
+
void __init arch_init_irq(void)
{
clear_c0_status(ST0_IM);
diff --git a/target/linux/atheros/files/arch/mips/atheros/prom.c b/target/linux/atheros/files/arch/mips/atheros/prom.c
index 403c931acf..250507046c 100644
--- a/target/linux/atheros/files/arch/mips/atheros/prom.c
+++ b/target/linux/atheros/files/arch/mips/atheros/prom.c
@@ -29,7 +29,6 @@ void __init prom_init(void)
{
char **argv;
- mips_machgroup = MACH_GROUP_ATHEROS;
mips_machtype = -1;
DO_AR5312(ar5312_prom_init();)