summaryrefslogtreecommitdiffstats
path: root/package/linux/kernel-patches/029-arch_mips_mm_c-r4k_c
diff options
context:
space:
mode:
authorwbx <wbx@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-03-26 10:33:32 +0000
committerwbx <wbx@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-03-26 10:33:32 +0000
commite69d8c0d8fbac180aaba30c8a3cdda0770cd8427 (patch)
treef08d225e1f8931634c82cfeb18fa3ad5fa7e664e /package/linux/kernel-patches/029-arch_mips_mm_c-r4k_c
parent609fbd1a579f41a8cb6d1029aa5eb86477851d89 (diff)
uncompress patches, requested by Kaloz
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@460 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/linux/kernel-patches/029-arch_mips_mm_c-r4k_c')
-rw-r--r--package/linux/kernel-patches/029-arch_mips_mm_c-r4k_c37
1 files changed, 37 insertions, 0 deletions
diff --git a/package/linux/kernel-patches/029-arch_mips_mm_c-r4k_c b/package/linux/kernel-patches/029-arch_mips_mm_c-r4k_c
new file mode 100644
index 000000000..9ec2862c4
--- /dev/null
+++ b/package/linux/kernel-patches/029-arch_mips_mm_c-r4k_c
@@ -0,0 +1,37 @@
+--- linux-mips-cvs/arch/mips/mm/c-r4k.c 2004-11-03 17:43:07.000000000 +0100
++++ linux-cache/arch/mips/mm/c-r4k.c 2005-03-06 23:39:53.000000000 +0100
+@@ -1031,9 +1031,34 @@
+ c->options |= MIPS_CPU_SUBSET_CACHES;
+ }
+
++#if defined(CONFIG_BCM4310)
++static void __init _change_cachability(u32 cm)
++{
++ struct cpuinfo_mips *c = &current_cpu_data;
++
++ change_c0_config(CONF_CM_CMASK, cm);
++ if ((c->processor_id & (PRID_COMP_MASK | PRID_IMP_MASK)) ==
++ (PRID_COMP_BROADCOM | PRID_IMP_BCM3302)) {
++ cm = read_c0_diag();
++ /* Enable icache */
++ cm |= (1 << 31);
++ /* Enable dcache */
++ cm |= (1 << 30);
++ write_c0_diag(cm);
++ }
++}
++
++static void (*change_cachability)(u32);
++#endif
++
+ static inline void coherency_setup(void)
+ {
++#if defined(CONFIG_BCM4310)
++ change_cachability = (void (*)(u32)) KSEG1ADDR((unsigned long)(_change_cachability));
++ change_cachability(CONF_CM_DEFAULT);
++#else
+ change_c0_config(CONF_CM_CMASK, CONF_CM_DEFAULT);
++#endif
+
+ /*
+ * c0_status.cu=0 specifies that updates by the sc instruction use