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