These patches moved to generic-2.6
[openwrt.git] / target / linux / brcm-2.4 / patches / 001-bcm47xx.patch
1 diff -urN linux.old/arch/mips/config-shared.in linux.dev/arch/mips/config-shared.in
2 --- linux.old/arch/mips/config-shared.in 2006-10-02 21:23:10.000000000 +0200
3 +++ linux.dev/arch/mips/config-shared.in 2006-10-02 21:19:59.000000000 +0200
4 @@ -208,6 +208,14 @@
5 fi
6 define_bool CONFIG_MIPS_RTC y
7 fi
8 +dep_bool 'Support for Broadcom MIPS-based boards' CONFIG_MIPS_BRCM $CONFIG_EXPERIMENTAL
9 +dep_bool 'Support for Broadcom BCM947XX' CONFIG_BCM947XX $CONFIG_MIPS_BRCM
10 +if [ "$CONFIG_BCM947XX" = "y" ] ; then
11 + bool ' Support for Broadcom BCM4710' CONFIG_BCM4710
12 + bool ' Support for Broadcom BCM4310' CONFIG_BCM4310
13 + bool ' Support for Broadcom BCM4704' CONFIG_BCM4704
14 + bool ' Support for Broadcom BCM5365' CONFIG_BCM5365
15 +fi
16 bool 'Support for SNI RM200 PCI' CONFIG_SNI_RM200_PCI
17 bool 'Support for TANBAC TB0226 (Mbase)' CONFIG_TANBAC_TB0226
18 bool 'Support for TANBAC TB0229 (VR4131DIMM)' CONFIG_TANBAC_TB0229
19 @@ -229,6 +237,11 @@
20 define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM n
21
22 #
23 +# Provide an option for a default kernel command line
24 +#
25 +string 'Default kernel command string' CONFIG_CMDLINE ""
26 +
27 +#
28 # Select some configuration options automatically based on user selections.
29 #
30 if [ "$CONFIG_ACER_PICA_61" = "y" ]; then
31 @@ -554,6 +567,12 @@
32 define_bool CONFIG_SWAP_IO_SPACE_L y
33 define_bool CONFIG_BOOT_ELF32 y
34 fi
35 +if [ "$CONFIG_BCM947XX" = "y" ] ; then
36 + define_bool CONFIG_PCI y
37 + define_bool CONFIG_NONCOHERENT_IO y
38 + define_bool CONFIG_NEW_TIME_C y
39 + define_bool CONFIG_NEW_IRQ y
40 +fi
41 if [ "$CONFIG_SNI_RM200_PCI" = "y" ]; then
42 define_bool CONFIG_ARC32 y
43 define_bool CONFIG_ARC_MEMORY y
44 @@ -1042,7 +1061,11 @@
45
46 bool 'Are you using a crosscompiler' CONFIG_CROSSCOMPILE
47 bool 'Enable run-time debugging' CONFIG_RUNTIME_DEBUG
48 -bool 'Remote GDB kernel debugging' CONFIG_KGDB
49 +if [ "$CONFIG_BCM947XX" = "y" ] ; then
50 + bool 'Remote GDB kernel debugging' CONFIG_REMOTE_DEBUG
51 +else
52 + bool 'Remote GDB kernel debugging' CONFIG_KGDB
53 +fi
54 dep_bool ' Console output to GDB' CONFIG_GDB_CONSOLE $CONFIG_KGDB
55 if [ "$CONFIG_KGDB" = "y" ]; then
56 define_bool CONFIG_DEBUG_INFO y
57 diff -urN linux.old/arch/mips/kernel/cpu-probe.c linux.dev/arch/mips/kernel/cpu-probe.c
58 --- linux.old/arch/mips/kernel/cpu-probe.c 2006-10-02 21:23:10.000000000 +0200
59 +++ linux.dev/arch/mips/kernel/cpu-probe.c 2006-10-02 21:19:59.000000000 +0200
60 @@ -162,7 +162,7 @@
61
62 static inline void cpu_probe_legacy(struct cpuinfo_mips *c)
63 {
64 - switch (c->processor_id & 0xff00) {
65 + switch (c->processor_id & PRID_IMP_MASK) {
66 case PRID_IMP_R2000:
67 c->cputype = CPU_R2000;
68 c->isa_level = MIPS_CPU_ISA_I;
69 @@ -172,7 +172,7 @@
70 c->tlbsize = 64;
71 break;
72 case PRID_IMP_R3000:
73 - if ((c->processor_id & 0xff) == PRID_REV_R3000A)
74 + if ((c->processor_id & PRID_REV_MASK) == PRID_REV_R3000A)
75 if (cpu_has_confreg())
76 c->cputype = CPU_R3081E;
77 else
78 @@ -187,12 +187,12 @@
79 break;
80 case PRID_IMP_R4000:
81 if (read_c0_config() & CONF_SC) {
82 - if ((c->processor_id & 0xff) >= PRID_REV_R4400)
83 + if ((c->processor_id & PRID_REV_MASK) >= PRID_REV_R4400)
84 c->cputype = CPU_R4400PC;
85 else
86 c->cputype = CPU_R4000PC;
87 } else {
88 - if ((c->processor_id & 0xff) >= PRID_REV_R4400)
89 + if ((c->processor_id & PRID_REV_MASK) >= PRID_REV_R4400)
90 c->cputype = CPU_R4400SC;
91 else
92 c->cputype = CPU_R4000SC;
93 @@ -438,7 +438,7 @@
94 static inline void cpu_probe_mips(struct cpuinfo_mips *c)
95 {
96 decode_config1(c);
97 - switch (c->processor_id & 0xff00) {
98 + switch (c->processor_id & PRID_IMP_MASK) {
99 case PRID_IMP_4KC:
100 c->cputype = CPU_4KC;
101 c->isa_level = MIPS_CPU_ISA_M32;
102 @@ -479,10 +479,10 @@
103 {
104 decode_config1(c);
105 c->options |= MIPS_CPU_PREFETCH;
106 - switch (c->processor_id & 0xff00) {
107 + switch (c->processor_id & PRID_IMP_MASK) {
108 case PRID_IMP_AU1_REV1:
109 case PRID_IMP_AU1_REV2:
110 - switch ((c->processor_id >> 24) & 0xff) {
111 + switch ((c->processor_id >> 24) & PRID_REV_MASK) {
112 case 0:
113 c->cputype = CPU_AU1000;
114 break;
115 @@ -510,10 +510,34 @@
116 }
117 }
118
119 +static inline void cpu_probe_broadcom(struct cpuinfo_mips *c)
120 +{
121 + decode_config1(c);
122 + c->options |= MIPS_CPU_PREFETCH;
123 + switch (c->processor_id & PRID_IMP_MASK) {
124 + case PRID_IMP_BCM4710:
125 + c->cputype = CPU_BCM4710;
126 + c->options = MIPS_CPU_TLB | MIPS_CPU_4KEX |
127 + MIPS_CPU_4KTLB | MIPS_CPU_COUNTER;
128 + c->scache.flags = MIPS_CACHE_NOT_PRESENT;
129 + break;
130 + case PRID_IMP_4KC:
131 + case PRID_IMP_BCM3302:
132 + c->cputype = CPU_BCM3302;
133 + c->options = MIPS_CPU_TLB | MIPS_CPU_4KEX |
134 + MIPS_CPU_4KTLB | MIPS_CPU_COUNTER;
135 + c->scache.flags = MIPS_CACHE_NOT_PRESENT;
136 + break;
137 + default:
138 + c->cputype = CPU_UNKNOWN;
139 + break;
140 + }
141 +}
142 +
143 static inline void cpu_probe_sibyte(struct cpuinfo_mips *c)
144 {
145 decode_config1(c);
146 - switch (c->processor_id & 0xff00) {
147 + switch (c->processor_id & PRID_IMP_MASK) {
148 case PRID_IMP_SB1:
149 c->cputype = CPU_SB1;
150 c->isa_level = MIPS_CPU_ISA_M64;
151 @@ -535,7 +559,7 @@
152 static inline void cpu_probe_sandcraft(struct cpuinfo_mips *c)
153 {
154 decode_config1(c);
155 - switch (c->processor_id & 0xff00) {
156 + switch (c->processor_id & PRID_IMP_MASK) {
157 case PRID_IMP_SR71000:
158 c->cputype = CPU_SR71000;
159 c->isa_level = MIPS_CPU_ISA_M64;
160 @@ -560,7 +584,7 @@
161 c->cputype = CPU_UNKNOWN;
162
163 c->processor_id = read_c0_prid();
164 - switch (c->processor_id & 0xff0000) {
165 + switch (c->processor_id & PRID_COMP_MASK) {
166
167 case PRID_COMP_LEGACY:
168 cpu_probe_legacy(c);
169 @@ -571,6 +595,9 @@
170 case PRID_COMP_ALCHEMY:
171 cpu_probe_alchemy(c);
172 break;
173 + case PRID_COMP_BROADCOM:
174 + cpu_probe_broadcom(c);
175 + break;
176 case PRID_COMP_SIBYTE:
177 cpu_probe_sibyte(c);
178 break;
179 diff -urN linux.old/arch/mips/kernel/head.S linux.dev/arch/mips/kernel/head.S
180 --- linux.old/arch/mips/kernel/head.S 2006-10-02 21:23:10.000000000 +0200
181 +++ linux.dev/arch/mips/kernel/head.S 2006-10-02 21:19:59.000000000 +0200
182 @@ -28,12 +28,20 @@
183 #include <asm/mipsregs.h>
184 #include <asm/stackframe.h>
185
186 +#ifdef CONFIG_BCM4710
187 +#undef eret
188 +#define eret nop; nop; eret
189 +#endif
190 +
191 .text
192 + j kernel_entry
193 + nop
194 +
195 /*
196 * Reserved space for exception handlers.
197 * Necessary for machines which link their kernels at KSEG0.
198 */
199 - .fill 0x400
200 + .fill 0x3f4
201
202 /* The following two symbols are used for kernel profiling. */
203 EXPORT(stext)
204 diff -urN linux.old/arch/mips/kernel/proc.c linux.dev/arch/mips/kernel/proc.c
205 --- linux.old/arch/mips/kernel/proc.c 2006-10-02 21:23:10.000000000 +0200
206 +++ linux.dev/arch/mips/kernel/proc.c 2006-10-02 21:19:59.000000000 +0200
207 @@ -78,9 +78,10 @@
208 [CPU_AU1550] "Au1550",
209 [CPU_24K] "MIPS 24K",
210 [CPU_AU1200] "Au1200",
211 + [CPU_BCM4710] "BCM4710",
212 + [CPU_BCM3302] "BCM3302",
213 };
214
215 -
216 static int show_cpuinfo(struct seq_file *m, void *v)
217 {
218 unsigned int version = current_cpu_data.processor_id;
219 diff -urN linux.old/arch/mips/kernel/setup.c linux.dev/arch/mips/kernel/setup.c
220 --- linux.old/arch/mips/kernel/setup.c 2006-10-02 21:23:10.000000000 +0200
221 +++ linux.dev/arch/mips/kernel/setup.c 2006-10-02 21:19:59.000000000 +0200
222 @@ -493,6 +493,7 @@
223 void swarm_setup(void);
224 void hp_setup(void);
225 void au1x00_setup(void);
226 + void brcm_setup(void);
227 void frame_info_init(void);
228
229 frame_info_init();
230 @@ -691,6 +692,11 @@
231 pmc_yosemite_setup();
232 break;
233 #endif
234 +#if defined(CONFIG_BCM4710) || defined(CONFIG_BCM4310)
235 + case MACH_GROUP_BRCM:
236 + brcm_setup();
237 + break;
238 +#endif
239 default:
240 panic("Unsupported architecture");
241 }
242 diff -urN linux.old/arch/mips/kernel/traps.c linux.dev/arch/mips/kernel/traps.c
243 --- linux.old/arch/mips/kernel/traps.c 2006-10-02 21:23:10.000000000 +0200
244 +++ linux.dev/arch/mips/kernel/traps.c 2006-10-02 21:19:59.000000000 +0200
245 @@ -920,6 +920,7 @@
246 void __init trap_init(void)
247 {
248 extern char except_vec1_generic;
249 + extern char except_vec2_generic;
250 extern char except_vec3_generic, except_vec3_r4000;
251 extern char except_vec_ejtag_debug;
252 extern char except_vec4;
253 @@ -927,6 +928,7 @@
254
255 /* Copy the generic exception handler code to it's final destination. */
256 memcpy((void *)(KSEG0 + 0x80), &except_vec1_generic, 0x80);
257 + memcpy((void *)(KSEG0 + 0x100), &except_vec2_generic, 0x80);
258
259 /*
260 * Setup default vectors
261 @@ -985,6 +987,12 @@
262 set_except_vector(13, handle_tr);
263 set_except_vector(22, handle_mdmx);
264
265 + if (current_cpu_data.cputype == CPU_SB1) {
266 + /* Enable timer interrupt and scd mapped interrupt */
267 + clear_c0_status(0xf000);
268 + set_c0_status(0xc00);
269 + }
270 +
271 if (cpu_has_fpu && !cpu_has_nofpuex)
272 set_except_vector(15, handle_fpe);
273
274 diff -urN linux.old/arch/mips/Makefile linux.dev/arch/mips/Makefile
275 --- linux.old/arch/mips/Makefile 2006-10-02 21:23:10.000000000 +0200
276 +++ linux.dev/arch/mips/Makefile 2006-10-02 21:19:59.000000000 +0200
277 @@ -726,6 +726,19 @@
278 endif
279
280 #
281 +# Broadcom BCM947XX variants
282 +#
283 +ifdef CONFIG_BCM947XX
284 +LIBS += arch/mips/bcm947xx/generic/brcm.o arch/mips/bcm947xx/bcm947xx.o
285 +SUBDIRS += arch/mips/bcm947xx/generic arch/mips/bcm947xx
286 +LOADADDR := 0x80001000
287 +
288 +zImage: vmlinux
289 + $(MAKE) -C arch/$(ARCH)/bcm947xx/compressed
290 +export LOADADDR
291 +endif
292 +
293 +#
294 # Choosing incompatible machines durings configuration will result in
295 # error messages during linking. Select a default linkscript if
296 # none has been choosen above.
297 @@ -778,6 +791,7 @@
298 $(MAKE) -C arch/$(ARCH)/tools clean
299 $(MAKE) -C arch/mips/baget clean
300 $(MAKE) -C arch/mips/lasat clean
301 + $(MAKE) -C arch/mips/bcm947xx/compressed clean
302
303 archmrproper:
304 @$(MAKEBOOT) mrproper
305 diff -urN linux.old/arch/mips/mm/c-r4k.c linux.dev/arch/mips/mm/c-r4k.c
306 --- linux.old/arch/mips/mm/c-r4k.c 2006-10-02 21:23:10.000000000 +0200
307 +++ linux.dev/arch/mips/mm/c-r4k.c 2006-10-02 21:19:59.000000000 +0200
308 @@ -1166,3 +1166,47 @@
309 build_clear_page();
310 build_copy_page();
311 }
312 +
313 +#ifdef CONFIG_BCM4704
314 +static void __init mips32_icache_fill(unsigned long addr, uint nbytes)
315 +{
316 + unsigned long ic_lsize = current_cpu_data.icache.linesz;
317 + int i;
318 + for (i = 0; i < nbytes; i += ic_lsize)
319 + fill_icache_line((addr + i));
320 +}
321 +
322 +/*
323 + * This must be run from the cache on 4704A0
324 + * so there are no mips core BIU ops in progress
325 + * when the PFC is enabled.
326 + */
327 +#define PFC_CR0 0xff400000 /* control reg 0 */
328 +#define PFC_CR1 0xff400004 /* control reg 1 */
329 +static void __init enable_pfc(u32 mode)
330 +{
331 + /* write range */
332 + *(volatile u32 *)PFC_CR1 = 0xffff0000;
333 +
334 + /* enable */
335 + *(volatile u32 *)PFC_CR0 = mode;
336 +}
337 +#endif
338 +
339 +
340 +void check_enable_mips_pfc(int val)
341 +{
342 +
343 +#ifdef CONFIG_BCM4704
344 + struct cpuinfo_mips *c = &current_cpu_data;
345 +
346 + /* enable prefetch cache */
347 + if (((c->processor_id & (PRID_COMP_MASK | PRID_IMP_MASK)) == PRID_IMP_BCM3302)
348 + && (read_c0_diag() & (1 << 29))) {
349 + mips32_icache_fill((unsigned long) &enable_pfc, 64);
350 + enable_pfc(val);
351 + }
352 +#endif
353 +}
354 +
355 +
356 diff -urN linux.old/arch/mips/pci/Makefile linux.dev/arch/mips/pci/Makefile
357 --- linux.old/arch/mips/pci/Makefile 2006-10-02 21:23:10.000000000 +0200
358 +++ linux.dev/arch/mips/pci/Makefile 2006-10-02 21:19:59.000000000 +0200
359 @@ -13,7 +13,9 @@
360 obj-$(CONFIG_MIPS_MSC) += ops-msc.o
361 obj-$(CONFIG_MIPS_NILE4) += ops-nile4.o
362 obj-$(CONFIG_SNI_RM200_PCI) += ops-sni.o
363 +ifndef CONFIG_BCM947XX
364 obj-y += pci.o
365 +endif
366 obj-$(CONFIG_PCI_AUTO) += pci_auto.o
367
368 include $(TOPDIR)/Rules.make
369 diff -urN linux.old/drivers/char/serial.c linux.dev/drivers/char/serial.c
370 --- linux.old/drivers/char/serial.c 2006-10-02 21:23:10.000000000 +0200
371 +++ linux.dev/drivers/char/serial.c 2006-10-02 21:19:59.000000000 +0200
372 @@ -444,6 +444,10 @@
373 return inb(info->port+1);
374 #endif
375 case SERIAL_IO_MEM:
376 +#ifdef CONFIG_BCM4310
377 + readb((unsigned long) info->iomem_base +
378 + (UART_SCR<<info->iomem_reg_shift));
379 +#endif
380 return readb((unsigned long) info->iomem_base +
381 (offset<<info->iomem_reg_shift));
382 default:
383 @@ -464,6 +468,9 @@
384 case SERIAL_IO_MEM:
385 writeb(value, (unsigned long) info->iomem_base +
386 (offset<<info->iomem_reg_shift));
387 +#ifdef CONFIG_BCM4704
388 + *((volatile unsigned int *) KSEG1ADDR(0x18000000));
389 +#endif
390 break;
391 default:
392 outb(value, info->port+offset);
393 @@ -1728,7 +1735,7 @@
394 /* Special case since 134 is really 134.5 */
395 quot = (2*baud_base / 269);
396 else if (baud)
397 - quot = baud_base / baud;
398 + quot = (baud_base + (baud / 2)) / baud;
399 }
400 /* If the quotient is zero refuse the change */
401 if (!quot && old_termios) {
402 @@ -1745,12 +1752,12 @@
403 /* Special case since 134 is really 134.5 */
404 quot = (2*baud_base / 269);
405 else if (baud)
406 - quot = baud_base / baud;
407 + quot = (baud_base + (baud / 2)) / baud;
408 }
409 }
410 /* As a last resort, if the quotient is zero, default to 9600 bps */
411 if (!quot)
412 - quot = baud_base / 9600;
413 + quot = (baud_base + 4800) / 9600;
414 /*
415 * Work around a bug in the Oxford Semiconductor 952 rev B
416 * chip which causes it to seriously miscalculate baud rates
417 @@ -5994,6 +6001,13 @@
418 * Divisor, bytesize and parity
419 */
420 state = rs_table + co->index;
421 + /*
422 + * Safe guard: state structure must have been initialized
423 + */
424 + if (state->iomem_base == NULL) {
425 + printk("!unable to setup serial console!\n");
426 + return -1;
427 + }
428 if (doflow)
429 state->flags |= ASYNC_CONS_FLOW;
430 info = &async_sercons;
431 @@ -6007,7 +6021,7 @@
432 info->io_type = state->io_type;
433 info->iomem_base = state->iomem_base;
434 info->iomem_reg_shift = state->iomem_reg_shift;
435 - quot = state->baud_base / baud;
436 + quot = (state->baud_base + (baud / 2)) / baud;
437 cval = cflag & (CSIZE | CSTOPB);
438 #if defined(__powerpc__) || defined(__alpha__)
439 cval >>= 8;
440 diff -urN linux.old/drivers/net/Makefile linux.dev/drivers/net/Makefile
441 --- linux.old/drivers/net/Makefile 2006-10-02 21:23:10.000000000 +0200
442 +++ linux.dev/drivers/net/Makefile 2006-10-02 21:19:59.000000000 +0200
443 @@ -3,6 +3,8 @@
444 # Makefile for the Linux network (ethercard) device drivers.
445 #
446
447 +EXTRA_CFLAGS := -I$(TOPDIR)/arch/mips/bcm947xx/include
448 +
449 obj-y :=
450 obj-m :=
451 obj-n :=
452 diff -urN linux.old/drivers/parport/Config.in linux.dev/drivers/parport/Config.in
453 --- linux.old/drivers/parport/Config.in 2006-10-02 21:23:10.000000000 +0200
454 +++ linux.dev/drivers/parport/Config.in 2006-10-02 21:19:59.000000000 +0200
455 @@ -11,6 +11,7 @@
456 tristate 'Parallel port support' CONFIG_PARPORT
457 if [ "$CONFIG_PARPORT" != "n" ]; then
458 dep_tristate ' PC-style hardware' CONFIG_PARPORT_PC $CONFIG_PARPORT
459 + dep_tristate ' Asus WL500g parallel port' CONFIG_PARPORT_SPLINK $CONFIG_PARPORT
460 if [ "$CONFIG_PARPORT_PC" != "n" -a "$CONFIG_SERIAL" != "n" ]; then
461 if [ "$CONFIG_SERIAL" = "m" ]; then
462 define_tristate CONFIG_PARPORT_PC_CML1 m
463 diff -urN linux.old/drivers/parport/Makefile linux.dev/drivers/parport/Makefile
464 --- linux.old/drivers/parport/Makefile 2006-10-02 21:23:10.000000000 +0200
465 +++ linux.dev/drivers/parport/Makefile 2006-10-02 21:19:59.000000000 +0200
466 @@ -22,6 +22,7 @@
467
468 obj-$(CONFIG_PARPORT) += parport.o
469 obj-$(CONFIG_PARPORT_PC) += parport_pc.o
470 +obj-$(CONFIG_PARPORT_SPLINK) += parport_splink.o
471 obj-$(CONFIG_PARPORT_PC_PCMCIA) += parport_cs.o
472 obj-$(CONFIG_PARPORT_AMIGA) += parport_amiga.o
473 obj-$(CONFIG_PARPORT_MFC3) += parport_mfc3.o
474 diff -urN linux.old/include/asm-mips/bootinfo.h linux.dev/include/asm-mips/bootinfo.h
475 --- linux.old/include/asm-mips/bootinfo.h 2006-10-02 21:23:10.000000000 +0200
476 +++ linux.dev/include/asm-mips/bootinfo.h 2006-10-02 21:19:59.000000000 +0200
477 @@ -37,6 +37,7 @@
478 #define MACH_GROUP_HP_LJ 20 /* Hewlett Packard LaserJet */
479 #define MACH_GROUP_LASAT 21
480 #define MACH_GROUP_TITAN 22 /* PMC-Sierra Titan */
481 +#define MACH_GROUP_BRCM 23 /* Broadcom */
482
483 /*
484 * Valid machtype values for group unknown (low order halfword of mips_machtype)
485 @@ -197,6 +198,15 @@
486 #define MACH_TANBAC_TB0229 7 /* TANBAC TB0229 (VR4131DIMM) */
487
488 /*
489 + * Valid machtypes for group Broadcom
490 + */
491 +#define MACH_BCM93725 0
492 +#define MACH_BCM93725_VJ 1
493 +#define MACH_BCM93730 2
494 +#define MACH_BCM947XX 3
495 +#define MACH_BCM933XX 4
496 +
497 +/*
498 * Valid machtype for group TITAN
499 */
500 #define MACH_TITAN_YOSEMITE 1 /* PMC-Sierra Yosemite */
501 diff -urN linux.old/include/asm-mips/cpu.h linux.dev/include/asm-mips/cpu.h
502 --- linux.old/include/asm-mips/cpu.h 2006-10-02 21:23:10.000000000 +0200
503 +++ linux.dev/include/asm-mips/cpu.h 2006-10-02 21:19:59.000000000 +0200
504 @@ -22,6 +22,11 @@
505 spec.
506 */
507
508 +#define PRID_COPT_MASK 0xff000000
509 +#define PRID_COMP_MASK 0x00ff0000
510 +#define PRID_IMP_MASK 0x0000ff00
511 +#define PRID_REV_MASK 0x000000ff
512 +
513 #define PRID_COMP_LEGACY 0x000000
514 #define PRID_COMP_MIPS 0x010000
515 #define PRID_COMP_BROADCOM 0x020000
516 @@ -58,6 +63,7 @@
517 #define PRID_IMP_RM7000 0x2700
518 #define PRID_IMP_NEVADA 0x2800 /* RM5260 ??? */
519 #define PRID_IMP_RM9000 0x3400
520 +#define PRID_IMP_BCM4710 0x4000
521 #define PRID_IMP_R5432 0x5400
522 #define PRID_IMP_R5500 0x5500
523 #define PRID_IMP_4KC 0x8000
524 @@ -66,10 +72,16 @@
525 #define PRID_IMP_4KEC 0x8400
526 #define PRID_IMP_4KSC 0x8600
527 #define PRID_IMP_25KF 0x8800
528 +#define PRID_IMP_BCM3302 0x9000
529 +#define PRID_IMP_BCM3303 0x9100
530 #define PRID_IMP_24K 0x9300
531
532 #define PRID_IMP_UNKNOWN 0xff00
533
534 +#define BCM330X(id) \
535 + (((id & (PRID_COMP_MASK | PRID_IMP_MASK)) == (PRID_COMP_BROADCOM | PRID_IMP_BCM3302)) \
536 + || ((id & (PRID_COMP_MASK | PRID_IMP_MASK)) == (PRID_COMP_BROADCOM | PRID_IMP_BCM3303)))
537 +
538 /*
539 * These are the PRID's for when 23:16 == PRID_COMP_SIBYTE
540 */
541 @@ -174,7 +186,9 @@
542 #define CPU_AU1550 57
543 #define CPU_24K 58
544 #define CPU_AU1200 59
545 -#define CPU_LAST 59
546 +#define CPU_BCM4710 60
547 +#define CPU_BCM3302 61
548 +#define CPU_LAST 61
549
550 /*
551 * ISA Level encodings
552 diff -urN linux.old/include/asm-mips/r4kcache.h linux.dev/include/asm-mips/r4kcache.h
553 --- linux.old/include/asm-mips/r4kcache.h 2006-10-02 21:23:10.000000000 +0200
554 +++ linux.dev/include/asm-mips/r4kcache.h 2006-10-02 21:19:59.000000000 +0200
555 @@ -658,4 +658,17 @@
556 cache128_unroll32(addr|ws,Index_Writeback_Inv_SD);
557 }
558
559 +extern inline void fill_icache_line(unsigned long addr)
560 +{
561 + __asm__ __volatile__(
562 + ".set noreorder\n\t"
563 + ".set mips3\n\t"
564 + "cache %1, (%0)\n\t"
565 + ".set mips0\n\t"
566 + ".set reorder"
567 + :
568 + : "r" (addr),
569 + "i" (Fill));
570 +}
571 +
572 #endif /* __ASM_R4KCACHE_H */
573 diff -urN linux.old/include/asm-mips/serial.h linux.dev/include/asm-mips/serial.h
574 --- linux.old/include/asm-mips/serial.h 2006-10-02 21:23:10.000000000 +0200
575 +++ linux.dev/include/asm-mips/serial.h 2006-10-02 21:19:59.000000000 +0200
576 @@ -223,6 +223,13 @@
577 #define TXX927_SERIAL_PORT_DEFNS
578 #endif
579
580 +#ifdef CONFIG_BCM947XX
581 +/* reserve 4 ports to be configured at runtime */
582 +#define BCM947XX_SERIAL_PORT_DEFNS { 0, }, { 0, }, { 0, }, { 0, },
583 +#else
584 +#define BCM947XX_SERIAL_PORT_DEFNS
585 +#endif
586 +
587 #ifdef CONFIG_HAVE_STD_PC_SERIAL_PORT
588 #define STD_SERIAL_PORT_DEFNS \
589 /* UART CLK PORT IRQ FLAGS */ \
590 @@ -470,6 +477,7 @@
591 #define SERIAL_PORT_DFNS \
592 ATLAS_SERIAL_PORT_DEFNS \
593 AU1000_SERIAL_PORT_DEFNS \
594 + BCM947XX_SERIAL_PORT_DEFNS \
595 COBALT_SERIAL_PORT_DEFNS \
596 DDB5477_SERIAL_PORT_DEFNS \
597 EV96100_SERIAL_PORT_DEFNS \
598 diff -urN linux.old/init/do_mounts.c linux.dev/init/do_mounts.c
599 --- linux.old/init/do_mounts.c 2006-10-02 21:23:10.000000000 +0200
600 +++ linux.dev/init/do_mounts.c 2006-10-02 21:19:59.000000000 +0200
601 @@ -254,7 +254,13 @@
602 { "ftlb", 0x2c08 },
603 { "ftlc", 0x2c10 },
604 { "ftld", 0x2c18 },
605 +#if defined(CONFIG_MTD_BLOCK) || defined(CONFIG_MTD_BLOCK_RO)
606 { "mtdblock", 0x1f00 },
607 + { "mtdblock0",0x1f00 },
608 + { "mtdblock1",0x1f01 },
609 + { "mtdblock2",0x1f02 },
610 + { "mtdblock3",0x1f03 },
611 +#endif
612 { "nb", 0x2b00 },
613 { NULL, 0 }
614 };
This page took 0.073393 seconds and 5 git commands to generate.