we don't need bluetooth on avr32 for now
[openwrt.git] / target / linux / brcm63xx-2.6 / patches / 001-bcm963xx.patch
1 diff -urN linux-2.6.19/arch/mips/Kconfig linux-2.6.19.new/arch/mips/Kconfig
2 --- linux-2.6.19/arch/mips/Kconfig 2006-11-29 22:57:37.000000000 +0100
3 +++ linux-2.6.19.new/arch/mips/Kconfig 2006-12-16 18:46:31.000000000 +0100
4 @@ -4,6 +4,10 @@
5 # Horrible source of confusion. Die, die, die ...
6 select EMBEDDED
7
8 +config CFE
9 + bool
10 + # Common Firmware Environment
11 +
12 mainmenu "Linux/MIPS Kernel Configuration"
13
14 menu "Machine selection"
15 @@ -12,6 +12,18 @@
16 prompt "System type"
17 default SGI_IP22
18
19 +config BCM963XX
20 + bool "Support for Broadcom BCM963xx SoC"
21 + select SYS_SUPPORTS_32BIT_KERNEL
22 + select SYS_SUPPORTS_BIG_ENDIAN
23 + select SYS_HAS_CPU_MIPS32_R1
24 + select HW_HAS_PCI
25 + select DMA_NONCOHERENT
26 + select IRQ_CPU
27 + select CFE
28 + help
29 + This is a fmaily of boards based on the Broadcom MIPS32
30 +
31 config MIPS_MTX1
32 bool "4G Systems MTX-1 board"
33 select DMA_NONCOHERENT
34 diff -urN linux-2.6.19/arch/mips/Makefile linux-2.6.19.new/arch/mips/Makefile
35 --- linux-2.6.19/arch/mips/Makefile 2006-12-16 17:36:29.000000000 +0100
36 +++ linux-2.6.19.new/arch/mips/Makefile 2006-12-16 18:46:31.000000000 +0100
37 @@ -158,6 +158,19 @@
38 #
39
40 #
41 +# Broadcom BCM963xx SoC
42 +#
43 +core-$(CONFIG_BCM963XX) += arch/mips/bcm963xx/
44 +cflags-$(CONFIG_BCM963XX) += -Iinclude/asm-mips/mach-bcm963xx
45 +load-$(CONFIG_BCM963XX) += 0xffffffff80010000
46 +
47 +
48 +#
49 +# Common Firmware Environment
50 +#
51 +core-$(CONFIG_CFE) += arch/mips/cfe/
52 +
53 +#
54 # Acer PICA 61, Mips Magnum 4000 and Olivetti M700.
55 #
56 core-$(CONFIG_MACH_JAZZ) += arch/mips/jazz/
57 diff -urN linux-2.6.19/arch/mips/kernel/cpu-probe.c linux-2.6.19.new/arch/mips/kernel/cpu-probe.c
58 --- linux-2.6.19/arch/mips/kernel/cpu-probe.c 2006-11-29 22:57:37.000000000 +0100
59 +++ linux-2.6.19.new/arch/mips/kernel/cpu-probe.c 2006-12-16 18:46:31.000000000 +0100
60 @@ -602,6 +602,25 @@
61 return;
62 }
63
64 +static inline void cpu_probe_broadcom(struct cpuinfo_mips *c)
65 +{
66 + decode_configs(c);
67 + switch (c->processor_id & 0xff00) {
68 + case PRID_IMP_BCM6338:
69 + c->cputype = CPU_BCM6338;
70 + break;
71 + case PRID_IMP_BCM6345:
72 + c->cputype = CPU_BCM6345;
73 + break;
74 + case PRID_IMP_BCM6348:
75 + c->cputype = CPU_BCM6348;
76 + break;
77 + default:
78 + c->cputype = CPU_UNKNOWN;
79 + break;
80 + }
81 +}
82 +
83 static inline void cpu_probe_mips(struct cpuinfo_mips *c)
84 {
85 decode_configs(c);
86 @@ -736,6 +755,9 @@
87 case PRID_COMP_LEGACY:
88 cpu_probe_legacy(c);
89 break;
90 + case PRID_COMP_BROADCOM:
91 + cpu_probe_broadcom(c);
92 + break;
93 case PRID_COMP_MIPS:
94 cpu_probe_mips(c);
95 break;
96 diff -urN linux-2.6.19/arch/mips/kernel/proc.c linux-2.6.19.new/arch/mips/kernel/proc.c
97 --- linux-2.6.19/arch/mips/kernel/proc.c 2006-11-29 22:57:37.000000000 +0100
98 +++ linux-2.6.19.new/arch/mips/kernel/proc.c 2006-12-16 18:46:31.000000000 +0100
99 @@ -84,6 +84,9 @@
100 [CPU_VR4181A] = "NEC VR4181A",
101 [CPU_SR71000] = "Sandcraft SR71000",
102 [CPU_PR4450] = "Philips PR4450",
103 + [CPU_BCM6338] = "BCM6338",
104 + [CPU_BCM6345] = "BCM6345",
105 + [CPU_BCM6348] = "BCM6348",
106 };
107
108
109 diff -urN linux-2.6.19/arch/mips/mm/c-r4k.c linux-2.6.19.new/arch/mips/mm/c-r4k.c
110 --- linux-2.6.19/arch/mips/mm/c-r4k.c 2006-11-29 22:57:37.000000000 +0100
111 +++ linux-2.6.19.new/arch/mips/mm/c-r4k.c 2006-12-16 18:46:31.000000000 +0100
112 @@ -852,6 +852,13 @@
113 if (!(config & MIPS_CONF_M))
114 panic("Don't know how to probe P-caches on this cpu.");
115
116 + if (c->cputype == CPU_BCM6338 || c->cputype == CPU_BCM6345 || c->cputype == CPU_BCM6348)
117 + {
118 + printk("bcm963xx: enabling icache and dcache...\n");
119 + /* Enable caches */
120 + write_c0_diag(read_c0_diag() | 0xC0000000);
121 + }
122 +
123 /*
124 * So we seem to be a MIPS32 or MIPS64 CPU
125 * So let's probe the I-cache ...
126 diff -urN linux-2.6.19/arch/mips/mm/tlbex.c linux-2.6.19.new/arch/mips/mm/tlbex.c
127 --- linux-2.6.19/arch/mips/mm/tlbex.c 2006-11-29 22:57:37.000000000 +0100
128 +++ linux-2.6.19.new/arch/mips/mm/tlbex.c 2006-12-16 18:46:31.000000000 +0100
129 @@ -880,6 +880,9 @@
130 case CPU_4KSC:
131 case CPU_20KC:
132 case CPU_25KF:
133 + case CPU_BCM6338:
134 + case CPU_BCM6345:
135 + case CPU_BCM6348:
136 tlbw(p);
137 break;
138
139 diff -urN linux-2.6.19/arch/mips/pci/Makefile linux-2.6.19.new/arch/mips/pci/Makefile
140 --- linux-2.6.19/arch/mips/pci/Makefile 2006-11-29 22:57:37.000000000 +0100
141 +++ linux-2.6.19.new/arch/mips/pci/Makefile 2006-12-16 18:48:18.000000000 +0100
142 @@ -17,6 +17,7 @@
143 obj-$(CONFIG_PCI_VR41XX) += ops-vr41xx.o pci-vr41xx.o
144 obj-$(CONFIG_NEC_CMBVR4133) += fixup-vr4133.o
145 obj-$(CONFIG_MARKEINS) += ops-emma2rh.o pci-emma2rh.o fixup-emma2rh.o
146 +obj-$(CONFIG_BCM963XX) += fixup-bcm96348.o pci-bcm96348.o ops-bcm96348.o
147
148 #
149 # These are still pretty much in the old state, watch, go blind.
150 diff -urN linux-2.6.19/include/asm-mips/bootinfo.h linux-2.6.19.new/include/asm-mips/bootinfo.h
151 --- linux-2.6.19/include/asm-mips/bootinfo.h 2006-11-29 22:57:37.000000000 +0100
152 +++ linux-2.6.19.new/include/asm-mips/bootinfo.h 2006-12-16 18:46:31.000000000 +0100
153 @@ -212,6 +212,14 @@
154 #define MACH_GROUP_NEC_EMMA2RH 25 /* NEC EMMA2RH (was 23) */
155 #define MACH_NEC_MARKEINS 0 /* NEC EMMA2RH Mark-eins */
156
157 +/*
158 + * Valid machtype for group BRCM
159 + */
160 +#define MACH_GROUP_BRCM 23 /* Broadcom boards */
161 +#define MACH_BCM96338 0
162 +#define MACH_BCM96345 1
163 +#define MACH_BCM96348 2
164 +
165 #define CL_SIZE COMMAND_LINE_SIZE
166
167 const char *get_system_type(void);
168 diff -urN linux-2.6.19/include/asm-mips/cpu.h linux-2.6.19.new/include/asm-mips/cpu.h
169 --- linux-2.6.19/include/asm-mips/cpu.h 2006-11-29 22:57:37.000000000 +0100
170 +++ linux-2.6.19.new/include/asm-mips/cpu.h 2006-12-16 18:46:31.000000000 +0100
171 @@ -103,6 +103,13 @@
172
173 #define PRID_IMP_SR71000 0x0400
174
175 +/* These are the PRID's for when 23:16 == PRID_COMP_BROADCOM
176 + */
177 +
178 +#define PRID_IMP_BCM6338 0x9000
179 +#define PRID_IMP_BCM6345 0x8000
180 +#define PRID_IMP_BCM6348 0x9100
181 +
182 /*
183 * Definitions for 7:0 on legacy processors
184 */
185 @@ -200,7 +207,10 @@
186 #define CPU_SB1A 62
187 #define CPU_74K 63
188 #define CPU_R14000 64
189 -#define CPU_LAST 64
190 +#define CPU_BCM6338 65
191 +#define CPU_BCM6345 66
192 +#define CPU_BCM6348 67
193 +#define CPU_LAST 67
194
195 /*
196 * ISA Level encodings
197 diff -urN linux-2.6.19/include/asm-mips/module.h linux-2.6.19.new/include/asm-mips/module.h
198 --- linux-2.6.19/include/asm-mips/module.h 2006-11-29 22:57:37.000000000 +0100
199 +++ linux-2.6.19.new/include/asm-mips/module.h 2006-12-16 19:03:22.000000000 +0100
200 @@ -112,6 +112,12 @@
201 #define MODULE_PROC_FAMILY "RM9000 "
202 #elif defined CONFIG_CPU_SB1
203 #define MODULE_PROC_FAMILY "SB1 "
204 +#elif defined CONFIG_CPU_BCM6338
205 +#define MODULE_PROC_FAMILY "BCM6338 "
206 +#elif defined CONFIG_CPU_BCM6345
207 +#define MODULE_PROC_FAMILY "BCM6345 "
208 +#elif defined CONFIG_CPU_BCM6348
209 +#define MODULE_PROC_FAMILY "BCM6348 "
210 #else
211 #error MODULE_PROC_FAMILY undefined for your processor configuration
212 #endif
This page took 0.050658 seconds and 5 git commands to generate.