add patches for 2.6.23 on brcm47xx (not enabled yet)
[openwrt.git] / target / linux / brcm47xx / patches-2.6.23 / 100-board_support.patch
1 Index: linux-2.6.23/arch/mips/Kconfig
2 ===================================================================
3 --- linux-2.6.23.orig/arch/mips/Kconfig 2007-10-13 02:23:06.662507926 +0200
4 +++ linux-2.6.23/arch/mips/Kconfig 2007-10-13 02:23:41.484492317 +0200
5 @@ -4,6 +4,10 @@
6 # Horrible source of confusion. Die, die, die ...
7 select EMBEDDED
8
9 +config CFE
10 + bool
11 + # Common Firmware Environment
12 +
13 mainmenu "Linux/MIPS Kernel Configuration"
14
15 menu "Machine selection"
16 @@ -44,6 +48,23 @@
17 note that a kernel built with this option selected will not be
18 able to run on normal units.
19
20 +config BCM947XX
21 + bool "Support for BCM947xx based boards"
22 + select DMA_NONCOHERENT
23 + select HW_HAS_PCI
24 + select IRQ_CPU
25 + select SYS_HAS_CPU_MIPS32_R1
26 + select SYS_SUPPORTS_32BIT_KERNEL
27 + select SYS_SUPPORTS_LITTLE_ENDIAN
28 + select SSB
29 + select SSB_SERIAL
30 + select SSB_DRIVER_PCICORE
31 + select SSB_PCICORE_HOSTMODE
32 + select CFE
33 + select GENERIC_GPIO
34 + help
35 + Support for BCM947xx based boards
36 +
37 config MIPS_COBALT
38 bool "Cobalt Server"
39 select DMA_NONCOHERENT
40 Index: linux-2.6.23/arch/mips/kernel/cpu-probe.c
41 ===================================================================
42 --- linux-2.6.23.orig/arch/mips/kernel/cpu-probe.c 2007-10-13 02:23:06.666508151 +0200
43 +++ linux-2.6.23/arch/mips/kernel/cpu-probe.c 2007-10-13 02:23:11.210767122 +0200
44 @@ -793,6 +793,28 @@
45 }
46
47
48 +static inline void cpu_probe_broadcom(struct cpuinfo_mips *c)
49 +{
50 + decode_config1(c);
51 + switch (c->processor_id & 0xff00) {
52 + case PRID_IMP_BCM3302:
53 + c->cputype = CPU_BCM3302;
54 + c->isa_level = MIPS_CPU_ISA_M32R1;
55 + c->options = MIPS_CPU_TLB | MIPS_CPU_4KEX |
56 + MIPS_CPU_4K_CACHE | MIPS_CPU_COUNTER;
57 + break;
58 + case PRID_IMP_BCM4710:
59 + c->cputype = CPU_BCM4710;
60 + c->isa_level = MIPS_CPU_ISA_M32R1;
61 + c->options = MIPS_CPU_TLB | MIPS_CPU_4KEX |
62 + MIPS_CPU_4K_CACHE | MIPS_CPU_COUNTER;
63 + break;
64 + default:
65 + c->cputype = CPU_UNKNOWN;
66 + break;
67 + }
68 +}
69 +
70 __init void cpu_probe(void)
71 {
72 struct cpuinfo_mips *c = &current_cpu_data;
73 @@ -815,6 +837,9 @@
74 case PRID_COMP_SIBYTE:
75 cpu_probe_sibyte(c);
76 break;
77 + case PRID_COMP_BROADCOM:
78 + cpu_probe_broadcom(c);
79 + break;
80 case PRID_COMP_SANDCRAFT:
81 cpu_probe_sandcraft(c);
82 break;
83 Index: linux-2.6.23/arch/mips/kernel/proc.c
84 ===================================================================
85 --- linux-2.6.23.orig/arch/mips/kernel/proc.c 2007-10-13 02:23:06.678508839 +0200
86 +++ linux-2.6.23/arch/mips/kernel/proc.c 2007-10-13 02:23:11.210767122 +0200
87 @@ -82,6 +82,8 @@
88 [CPU_VR4181] = "NEC VR4181",
89 [CPU_VR4181A] = "NEC VR4181A",
90 [CPU_SR71000] = "Sandcraft SR71000",
91 + [CPU_BCM3302] = "Broadcom BCM3302",
92 + [CPU_BCM4710] = "Broadcom BCM4710",
93 [CPU_PR4450] = "Philips PR4450",
94 [CPU_LOONGSON2] = "ICT Loongson-2",
95 };
96 Index: linux-2.6.23/arch/mips/Makefile
97 ===================================================================
98 --- linux-2.6.23.orig/arch/mips/Makefile 2007-10-13 02:23:06.682509066 +0200
99 +++ linux-2.6.23/arch/mips/Makefile 2007-10-13 02:23:11.210767122 +0200
100 @@ -533,6 +533,18 @@
101 load-$(CONFIG_SIBYTE_BIGSUR) := 0xffffffff80100000
102
103 #
104 +# Broadcom BCM47XX boards
105 +#
106 +core-$(CONFIG_BCM947XX) += arch/mips/bcm947xx/
107 +cflags-$(CONFIG_BCM947XX) += -Iarch/mips/bcm947xx/include -Iinclude/asm-mips/mach-bcm947xx
108 +load-$(CONFIG_BCM947XX) := 0xffffffff80001000
109 +
110 +#
111 +# Common Firmware Environment
112 +#
113 +core-$(CONFIG_CFE) += arch/mips/cfe/
114 +
115 +#
116 # SNI RM
117 #
118 core-$(CONFIG_SNI_RM) += arch/mips/sni/
119 Index: linux-2.6.23/arch/mips/mm/tlbex.c
120 ===================================================================
121 --- linux-2.6.23.orig/arch/mips/mm/tlbex.c 2007-10-13 02:23:06.694509748 +0200
122 +++ linux-2.6.23/arch/mips/mm/tlbex.c 2007-10-13 02:26:00.272401391 +0200
123 @@ -895,6 +895,8 @@
124 case CPU_AU1550:
125 case CPU_AU1200:
126 case CPU_PR4450:
127 + case CPU_BCM3302:
128 + case CPU_BCM4710:
129 i_nop(p);
130 tlbw(p);
131 break;
132 Index: linux-2.6.23/drivers/Kconfig
133 ===================================================================
134 --- linux-2.6.23.orig/drivers/Kconfig 2007-10-13 02:23:06.702510206 +0200
135 +++ linux-2.6.23/drivers/Kconfig 2007-10-13 02:23:11.214767346 +0200
136 @@ -58,6 +58,8 @@
137
138 source "drivers/hwmon/Kconfig"
139
140 +source "drivers/ssb/Kconfig"
141 +
142 source "drivers/mfd/Kconfig"
143
144 source "drivers/media/Kconfig"
145 Index: linux-2.6.23/drivers/Makefile
146 ===================================================================
147 --- linux-2.6.23.orig/drivers/Makefile 2007-10-13 02:23:06.710510659 +0200
148 +++ linux-2.6.23/drivers/Makefile 2007-10-13 02:27:08.120267817 +0200
149 @@ -88,3 +88,4 @@
150 obj-$(CONFIG_HID) += hid/
151 obj-$(CONFIG_PPC_PS3) += ps3/
152 obj-$(CONFIG_OF) += of/
153 +obj-$(CONFIG_SSB) += ssb/
154 Index: linux-2.6.23/include/asm-mips/bootinfo.h
155 ===================================================================
156 --- linux-2.6.23.orig/include/asm-mips/bootinfo.h 2007-10-13 02:23:06.718511119 +0200
157 +++ linux-2.6.23/include/asm-mips/bootinfo.h 2007-10-13 02:23:11.214767346 +0200
158 @@ -208,6 +208,12 @@
159 #define MACH_GROUP_WINDRIVER 28 /* Windriver boards */
160 #define MACH_WRPPMC 1
161
162 +/*
163 + * Valid machtype for group Broadcom
164 + */
165 +#define MACH_GROUP_BRCM 23 /* Broadcom */
166 +#define MACH_BCM47XX 1 /* Broadcom BCM47xx */
167 +
168 #define CL_SIZE COMMAND_LINE_SIZE
169
170 const char *get_system_type(void);
171 Index: linux-2.6.23/include/asm-mips/cpu.h
172 ===================================================================
173 --- linux-2.6.23.orig/include/asm-mips/cpu.h 2007-10-13 02:23:06.726511570 +0200
174 +++ linux-2.6.23/include/asm-mips/cpu.h 2007-10-13 02:27:43.994312161 +0200
175 @@ -106,6 +106,13 @@
176 #define PRID_IMP_SR71000 0x0400
177
178 /*
179 + * These are the PRID's for when 23:16 == PRID_COMP_BROADCOM
180 + */
181 +
182 +#define PRID_IMP_BCM4710 0x4000
183 +#define PRID_IMP_BCM3302 0x9000
184 +
185 +/*
186 * Definitions for 7:0 on legacy processors
187 */
188
189 @@ -217,8 +224,10 @@
190 #define CPU_R14000 64
191 #define CPU_LOONGSON1 65
192 #define CPU_LOONGSON2 66
193 +#define CPU_BCM3302 67
194 +#define CPU_BCM4710 68
195
196 -#define CPU_LAST 66
197 +#define CPU_LAST 68
198
199 /*
200 * ISA Level encodings
201 Index: linux-2.6.23/include/linux/pci_ids.h
202 ===================================================================
203 --- linux-2.6.23.orig/include/linux/pci_ids.h 2007-10-13 02:23:06.734512028 +0200
204 +++ linux-2.6.23/include/linux/pci_ids.h 2007-10-13 02:23:11.218767569 +0200
205 @@ -1972,6 +1972,7 @@
206 #define PCI_DEVICE_ID_TIGON3_5906M 0x1713
207 #define PCI_DEVICE_ID_BCM4401 0x4401
208 #define PCI_DEVICE_ID_BCM4401B0 0x4402
209 +#define PCI_DEVICE_ID_BCM4713 0x4713
210
211 #define PCI_VENDOR_ID_TOPIC 0x151f
212 #define PCI_DEVICE_ID_TOPIC_TP560 0x0000
This page took 0.051256 seconds and 5 git commands to generate.