add gpio support to atheros, fixes #1861, thanks Othello
[10.03/openwrt.git] / target / linux / atheros / patches-2.6.24 / 100-board.patch
1 diff -urN linux.old/arch/mips/Kconfig linux.dev/arch/mips/Kconfig
2 --- linux.old/arch/mips/Kconfig 2007-02-02 23:55:52.912446784 +0100
3 +++ linux.dev/arch/mips/Kconfig 2007-02-03 21:50:25.262027104 +0100
4 @@ -45,6 +45,18 @@
5           note that a kernel built with this option selected will not be
6           able to run on normal units.
7  
8 +config ATHEROS
9 +       bool "Atheros SoC support (EXPERIMENTAL)"
10 +       depends on EXPERIMENTAL
11 +       select DMA_NONCOHERENT
12 +       select CEVT_R4K
13 +       select CSRC_R4K
14 +       select IRQ_CPU
15 +       select SYS_HAS_CPU_MIPS32_R1
16 +       select SYS_SUPPORTS_BIG_ENDIAN
17 +       select SYS_SUPPORTS_32BIT_KERNEL
18 +       select GENERIC_GPIO
19 +
20  config MIPS_COBALT
21         bool "Cobalt Server"
22         select DMA_NONCOHERENT
23 @@ -658,6 +668,7 @@
24  
25  endchoice
26  
27 +source "arch/mips/atheros/Kconfig"
28  source "arch/mips/au1000/Kconfig"
29  source "arch/mips/ddb5xxx/Kconfig"
30  source "arch/mips/gt64120/ev64120/Kconfig"
31 diff -urN linux.old/arch/mips/Makefile linux.dev/arch/mips/Makefile
32 --- linux.old/arch/mips/Makefile        2007-02-02 23:55:52.913446632 +0100
33 +++ linux.dev/arch/mips/Makefile        2007-02-03 17:40:29.193776000 +0100
34 @@ -267,6 +267,13 @@
35  load-$(CONFIG_MIPS_XXS1500)    += 0xffffffff80100000
36  
37  #
38 +# Atheros AR5312/AR2312 WiSoC
39 +#
40 +core-$(CONFIG_ATHEROS)         += arch/mips/atheros/
41 +cflags-$(CONFIG_ATHEROS)       += -Iinclude/asm-mips/mach-atheros
42 +load-$(CONFIG_ATHEROS)         += 0xffffffff80041000
43 +
44 +#
45  # Cobalt Server
46  #
47  core-$(CONFIG_MIPS_COBALT)     += arch/mips/cobalt/
48 diff -urN linux.old/include/asm-mips/bootinfo.h linux.dev/include/asm-mips/bootinfo.h
49 --- linux.old/include/asm-mips/bootinfo.h       2007-02-02 23:55:52.913446632 +0100
50 +++ linux.dev/include/asm-mips/bootinfo.h       2007-02-03 17:51:02.531494032 +0100
51 @@ -213,6 +213,18 @@
52  #define MACH_GROUP_NEC_EMMA2RH 25      /* NEC EMMA2RH (was 23)         */
53  #define  MACH_NEC_MARKEINS     0       /* NEC EMMA2RH Mark-eins        */
54  
55 +/*
56 + * Valid machtype for group ATHEROS
57 + */
58 +#define MACH_GROUP_ATHEROS     26
59 +#define MACH_ATHEROS_AR5312    0
60 +#define MACH_ATHEROS_AR2312    1
61 +#define MACH_ATHEROS_AR2313    2
62 +#define MACH_ATHEROS_AR2315    3
63 +#define MACH_ATHEROS_AR2316    4
64 +#define MACH_ATHEROS_AR2317    5
65 +#define MACH_ATHEROS_AR2318    6
66 +
67  #define CL_SIZE                        COMMAND_LINE_SIZE
68  
69  const char *get_system_type(void);
70