add mac partition support
[openwrt.git] / package / linux / kernel-patches / 029-arch_mips_mm_c-r4k_c
1 --- linux-mips-cvs/arch/mips/mm/c-r4k.c 2004-11-03 17:43:07.000000000 +0100
2 +++ linux-cache/arch/mips/mm/c-r4k.c 2005-03-06 23:39:53.000000000 +0100
3 @@ -1031,9 +1031,34 @@
4 c->options |= MIPS_CPU_SUBSET_CACHES;
5 }
6
7 +#if defined(CONFIG_BCM4310)
8 +static void __init _change_cachability(u32 cm)
9 +{
10 + struct cpuinfo_mips *c = &current_cpu_data;
11 +
12 + change_c0_config(CONF_CM_CMASK, cm);
13 + if ((c->processor_id & (PRID_COMP_MASK | PRID_IMP_MASK)) ==
14 + (PRID_COMP_BROADCOM | PRID_IMP_BCM3302)) {
15 + cm = read_c0_diag();
16 + /* Enable icache */
17 + cm |= (1 << 31);
18 + /* Enable dcache */
19 + cm |= (1 << 30);
20 + write_c0_diag(cm);
21 + }
22 +}
23 +
24 +static void (*change_cachability)(u32);
25 +#endif
26 +
27 static inline void coherency_setup(void)
28 {
29 +#if defined(CONFIG_BCM4310)
30 + change_cachability = (void (*)(u32)) KSEG1ADDR((unsigned long)(_change_cachability));
31 + change_cachability(CONF_CM_DEFAULT);
32 +#else
33 change_c0_config(CONF_CM_CMASK, CONF_CM_DEFAULT);
34 +#endif
35
36 /*
37 * c0_status.cu=0 specifies that updates by the sc instruction use
This page took 0.039596 seconds and 5 git commands to generate.