]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[MIPS] Fix build for PNX platforms.
authorRalf Baechle <ralf@linux-mips.org>
Thu, 12 Jun 2008 16:26:02 +0000 (17:26 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 16 Jun 2008 14:14:47 +0000 (15:14 +0100)
Build error was caused by commit 351336929ccf222ae38ff0cb7a8dd5fd5c6236a0.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/mm/c-r4k.c
arch/mips/nxp/pnx8550/jbs/board_setup.c
arch/mips/nxp/pnx8550/stb810/board_setup.c
include/asm-mips/pgtable-bits.h

index 643c8bcffff313d2f9d48a6a9daae396d2263bba..c41ea2284954cc536fd70ce7018fb1ee5733eb69 100644 (file)
@@ -1226,6 +1226,28 @@ void au1x00_fixup_config_od(void)
        }
 }
 
+/* CP0 hazard avoidance. */
+#define NXP_BARRIER()                                                  \
+        __asm__ __volatile__(                                          \
+       ".set noreorder\n\t"                                            \
+       "nop; nop; nop; nop; nop; nop;\n\t"                             \
+       ".set reorder\n\t")
+
+static void nxp_pr4450_fixup_config(void)
+{
+       unsigned long config0;
+
+       config0 = read_c0_config();
+
+       /* clear all three cache coherency fields */
+       config0 &= ~(0x7 | (7 << 25) | (7 << 28));
+       config0 |= (((_page_cachable_default >> _CACHE_SHIFT) <<  0) |
+                   ((_page_cachable_default >> _CACHE_SHIFT) << 25) |
+                   ((_page_cachable_default >> _CACHE_SHIFT) << 28));
+       write_c0_config(config0);
+       NXP_BARRIER();
+}
+
 static int __cpuinitdata cca = -1;
 
 static int __init cca_setup(char *str)
@@ -1271,6 +1293,10 @@ static void __cpuinit coherency_setup(void)
        case CPU_AU1500: /* rev. AB */
                au1x00_fixup_config_od();
                break;
+
+       case PRID_IMP_PR4450:
+               nxp_pr4450_fixup_config();
+               break;
        }
 }
 
index f92826e0096dd791608ca3c8a7e76a56c26cfdc7..57dd903ca408a939c3754ec93c49f754e98a36a4 100644 (file)
 
 void __init board_setup(void)
 {
-       unsigned long config0, configpr;
-
-       config0 = read_c0_config();
-
-       /* clear all three cache coherency fields */
-       config0 &= ~(0x7 | (7<<25) | (7<<28));
-       config0 |= (CONF_CM_DEFAULT | (CONF_CM_DEFAULT<<25) |
-                       (CONF_CM_DEFAULT<<28));
-       write_c0_config(config0);
-       BARRIER;
+       unsigned long configpr;
 
        configpr = read_c0_config7();
        configpr |= (1<<19); /* enable tlb */
index 1282c27cfcb7fe1e2255f675fb32e8aa518657f1..af2a55e0b4e93e9d0cd60ed9caee69319a45bd10 100644 (file)
 
 void __init board_setup(void)
 {
-       unsigned long config0, configpr;
-
-       config0 = read_c0_config();
-
-       /* clear all three cache coherency fields */
-       config0 &= ~(0x7 | (7<<25) | (7<<28));
-       config0 |= (CONF_CM_DEFAULT | (CONF_CM_DEFAULT<<25) |
-                       (CONF_CM_DEFAULT<<28));
-       write_c0_config(config0);
+       unsigned long configpr;
 
        configpr = read_c0_config7();
        configpr |= (1<<19); /* enable tlb */
index 60e2f9338fcd6a6bd96adc064dad82eb8a763e2f..51b34a48c84ad29a76c454a2f00b85d6ecc7461f 100644 (file)
 
 #define _PAGE_CHG_MASK  (PAGE_MASK | _PAGE_ACCESSED | _PAGE_MODIFIED | _CACHE_MASK)
 
-#define CONF_CM_DEFAULT                (PAGE_CACHABLE_DEFAULT>>_CACHE_SHIFT)
-
 #endif /* _ASM_PGTABLE_BITS_H */