Fix brcm63xx support. Now a kernel is booting, detecting the flash, and can probably...
[openwrt/svn-archive/archive.git] / openwrt / target / linux / brcm63xx-2.6 / patches / 010-include_asm_mips.patch
1 diff -Naurp -x mach-bcm963xx linux-2.6.16.7-generic-patched/include/asm-mips/bootinfo.h linux-2.6.16.7-patched/include/asm-mips/bootinfo.h
2 --- linux-2.6.16.7-generic-patched/include/asm-mips/bootinfo.h 2006-04-17 23:53:25.000000000 +0200
3 +++ linux-2.6.16.7-patched/include/asm-mips/bootinfo.h 2006-07-05 15:21:58.000000000 +0200
4 @@ -218,6 +218,15 @@
5 #define MACH_GROUP_TITAN 22 /* PMC-Sierra Titan */
6 #define MACH_TITAN_YOSEMITE 1 /* PMC-Sierra Yosemite */
7
8 +/*
9 + * Valid machtype for group BRCM
10 + */
11 +#define MACH_GROUP_BRCM 23 /* Broadcom boards */
12 +#define MACH_BCM96338 0
13 +#define MACH_BCM96345 1
14 +#define MACH_BCM96348 2
15 +
16 +
17 #define CL_SIZE COMMAND_LINE_SIZE
18
19 const char *get_system_type(void);
20 diff -Naurp -x mach-bcm963xx linux-2.6.16.7-generic-patched/include/asm-mips/cpu.h linux-2.6.16.7-patched/include/asm-mips/cpu.h
21 --- linux-2.6.16.7-generic-patched/include/asm-mips/cpu.h 2006-04-17 23:53:25.000000000 +0200
22 +++ linux-2.6.16.7-patched/include/asm-mips/cpu.h 2006-07-05 15:21:58.000000000 +0200
23 @@ -102,6 +102,15 @@
24 #define PRID_IMP_SR71000 0x0400
25
26 /*
27 + * These are the PRID's for when 23:16 == PRID_COMP_BROADCOM
28 + */
29 +
30 +#define PRID_IMP_BCM6338 0x9000
31 +#define PRID_IMP_BCM6345 0x8000
32 +#define PRID_IMP_BCM6348 0x9100
33 +
34 +
35 +/*
36 * Definitions for 7:0 on legacy processors
37 */
38
39 @@ -196,7 +205,10 @@
40 #define CPU_34K 60
41 #define CPU_PR4450 61
42 #define CPU_SB1A 62
43 -#define CPU_LAST 62
44 +#define CPU_BCM6338 63
45 +#define CPU_BCM6345 64
46 +#define CPU_BCM6348 65
47 +#define CPU_LAST 65
48
49 /*
50 * ISA Level encodings
51 diff -Naurp -x mach-bcm963xx linux-2.6.16.7-generic-patched/include/asm-mips/mach-generic/param.h linux-2.6.16.7-patched/include/asm-mips/mach-generic/param.h
52 --- linux-2.6.16.7-generic-patched/include/asm-mips/mach-generic/param.h 2006-04-17 23:53:25.000000000 +0200
53 +++ linux-2.6.16.7-patched/include/asm-mips/mach-generic/param.h 2006-07-05 15:21:58.000000000 +0200
54 @@ -8,6 +8,6 @@
55 #ifndef __ASM_MACH_GENERIC_PARAM_H
56 #define __ASM_MACH_GENERIC_PARAM_H
57
58 -#define HZ 1000 /* Internal kernel timer frequency */
59 +#define HZ 200 /* Internal kernel timer frequency */
60
61 #endif /* __ASM_MACH_GENERIC_PARAM_H */
62 diff -Naurp -x mach-bcm963xx linux-2.6.16.7-generic-patched/include/asm-mips/module.h linux-2.6.16.7-patched/include/asm-mips/module.h
63 --- linux-2.6.16.7-generic-patched/include/asm-mips/module.h 2006-04-17 23:53:25.000000000 +0200
64 +++ linux-2.6.16.7-patched/include/asm-mips/module.h 2006-07-05 15:21:58.000000000 +0200
65 @@ -113,6 +113,12 @@ search_module_dbetables(unsigned long ad
66 #define MODULE_PROC_FAMILY "RM9000 "
67 #elif defined CONFIG_CPU_SB1
68 #define MODULE_PROC_FAMILY "SB1 "
69 +#elif defined CONFIG_CPU_BCM6338
70 +#define MODULE_PROC_FAMILY "BCM6338 "
71 +#elif defined CONFIG_CPU_BCM6345
72 +#define MODULE_PROC_FAMILY "BCM6345 "
73 +#elif defined CONFIG_CPU_BCM6348
74 +#define MODULE_PROC_FAMILY "BCM6348 "
75 #else
76 #error MODULE_PROC_FAMILY undefined for your processor configuration
77 #endif