diff options
author | Felix Fietkau <nbd@openwrt.org> | 2007-02-16 09:23:15 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2007-02-16 09:23:15 +0000 |
commit | b7e5e78ae6fd8a08cb01a7a7c8f23f297459db91 (patch) | |
tree | a876d1a91d12fc5c15d05d7ec65dbf21430bcacc /target/linux/atheros-2.6/files/arch/mips/atheros/ar531x.h | |
parent | c55df2a7ed31000b9e3b52b32cf7079f1f5f8cec (diff) | |
download | upstream-b7e5e78ae6fd8a08cb01a7a7c8f23f297459db91.tar.gz upstream-b7e5e78ae6fd8a08cb01a7a7c8f23f297459db91.tar.bz2 upstream-b7e5e78ae6fd8a08cb01a7a7c8f23f297459db91.zip |
major cleanup of the ar531x code, improved hardware detection and support for multiple ethernet interfaces
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6307 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/atheros-2.6/files/arch/mips/atheros/ar531x.h')
-rw-r--r-- | target/linux/atheros-2.6/files/arch/mips/atheros/ar531x.h | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/target/linux/atheros-2.6/files/arch/mips/atheros/ar531x.h b/target/linux/atheros-2.6/files/arch/mips/atheros/ar531x.h index 208b0101a2..471cc7e7dc 100644 --- a/target/linux/atheros-2.6/files/arch/mips/atheros/ar531x.h +++ b/target/linux/atheros-2.6/files/arch/mips/atheros/ar531x.h @@ -1,10 +1,34 @@ #ifndef __AR531X_H #define __AR531X_H +#include <asm/cpu-info.h> #include <ar531x_platform.h> #include "ar5312.h" #include "ar5315.h" +/* + * Atheros CPUs before the AR2315 are using MIPS 4Kc core, later designs are + * using MIPS 4KEc R2 core. This makes it easy to determine the board at runtime. + */ +#ifdef CONFIG_ATHEROS_AR5312 +#define DO_AR5312(...) \ + if (current_cpu_data.cputype != CPU_4KEC) { \ + __VA_ARGS__ \ + } +#else +#define DO_AR5312(...) +#endif +#ifdef CONFIG_ATHEROS_AR5315 +#define DO_AR5315(...) \ + if (current_cpu_data.cputype == CPU_4KEC) { \ + __VA_ARGS__ \ + } +#else +#define DO_AR5315(...) +#endif + + + #define MIPS_CPU_IRQ_BASE 0x00 #define AR531X_HIGH_PRIO 0x10 #define AR531X_MISC_IRQ_BASE 0x20 @@ -89,18 +113,20 @@ struct ar531x_boarddata { u8 wlan1Mac[6]; /* (ar5212) */ }; +#define BOARD_CONFIG_BUFSZ 0x1000 -extern char *board_config; -extern char *radio_config; +extern char *board_config, *radio_config; extern void serial_setup(unsigned long mapbase, unsigned int uartclk); extern int ar531x_find_config(char *flash_limit); +extern void ar5312_prom_init(void); extern void ar5312_misc_intr_init(int irq_base); -extern void ar5312_irq_dispatch(void); extern void ar5312_plat_setup(void); +extern asmlinkage void ar5312_irq_dispatch(void); +extern void ar5315_prom_init(void); extern void ar5315_misc_intr_init(int irq_base); -extern asmlinkage void ar5315_irq_dispatch(void); extern void ar5315_plat_setup(void); +extern asmlinkage void ar5315_irq_dispatch(void); #endif |