From 697e06b22580013c25f0f170925fa5f02879345b Mon Sep 17 00:00:00 2001 From: nbd Date: Thu, 31 Jan 2008 04:44:35 +0000 Subject: port atheros to 2.6.24 (untested), but do not use the new kernel by default yet git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10335 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- target/linux/atheros/files/arch/mips/atheros/ar531x.h | 4 ++++ target/linux/atheros/files/arch/mips/atheros/board.c | 9 +++++++++ target/linux/atheros/files/arch/mips/atheros/prom.c | 1 - 3 files changed, 13 insertions(+), 1 deletion(-) (limited to 'target/linux/atheros/files/arch') 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 #include #include #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();) -- cgit v1.2.3