summaryrefslogtreecommitdiff
path: root/target/linux/ar71xx/patches-2.6.27/001-ar71xx_core.patch
blob: 548c06b12da2f6d3dd0262c624f9fe6a50ec9937 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -577,6 +577,13 @@ core-$(CONFIG_TOSHIBA_RBTX4927)	+= arch/
 #
 core-$(CONFIG_TOSHIBA_RBTX4938) += arch/mips/txx9/rbtx4938/
 
+#
+# Atheros AR71xx
+#
+core-$(CONFIG_ATHEROS_AR71XX)	+= arch/mips/ar71xx/
+cflags-$(CONFIG_ATHEROS_AR71XX)	+= -Iinclude/asm-mips/mach-ar71xx
+load-$(CONFIG_ATHEROS_AR71XX)	+= 0xffffffff80060000
+
 # temporary until string.h is fixed
 cflags-y += -ffreestanding
 
--- a/include/asm-mips/bootinfo.h
+++ b/include/asm-mips/bootinfo.h
@@ -57,6 +57,17 @@
 #define	MACH_MIKROTIK_RB532	0	/* Mikrotik RouterBoard 532 	*/
 #define MACH_MIKROTIK_RB532A	1	/* Mikrotik RouterBoard 532A 	*/
 
+/*
+ * Valid machtype for Atheros AR71xx based boards
+ */
+#define MACH_AR71XX_GENERIC	0
+#define MACH_AR71XX_WP543	1	/* Compex WP543 */
+#define MACH_AR71XX_RB_411	2	/* MikroTik RouterBOARD 411/411A/411AH */
+#define MACH_AR71XX_RB_433	3	/* MikroTik RouterBOARD 433/433AH */
+#define MACH_AR71XX_RB_450	4	/* MikroTik RouterBOARD 450 */
+#define MACH_AR71XX_RB_493	5	/* MikroTik RouterBOARD 493 */
+#define MACH_AR71XX_AW_NR580	6	/* AzureWave AW-NR580 */
+
 #define CL_SIZE			COMMAND_LINE_SIZE
 
 extern char *system_type;
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -22,6 +22,23 @@ choice
 config MACH_ALCHEMY
 	bool "Alchemy processor based machines"
 
+config ATHEROS_AR71XX
+	bool "Atheros AR71xx based boards"
+	select CEVT_R4K
+	select CSRC_R4K
+	select DMA_NONCOHERENT
+	select HW_HAS_PCI
+	select IRQ_CPU
+	select ARCH_REQUIRE_GPIOLIB
+	select SYS_HAS_CPU_MIPS32_R1
+	select SYS_HAS_CPU_MIPS32_R2
+	select SYS_SUPPORTS_32BIT_KERNEL
+	select SYS_SUPPORTS_BIG_ENDIAN
+	select SYS_HAS_EARLY_PRINTK
+	select MIPS_MACHINE
+	help
+	  Support for Atheros AR71xx based boards.
+
 config BASLER_EXCITE
 	bool "Basler eXcite smart camera"
 	select CEVT_R4K
@@ -598,6 +615,7 @@ config WR_PPMC
 
 endchoice
 
+source "arch/mips/ar71xx/Kconfig"
 source "arch/mips/au1000/Kconfig"
 source "arch/mips/basler/excite/Kconfig"
 source "arch/mips/jazz/Kconfig"