]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/mips/include/asm/mach-generic/spaces.h
MIPS: Adjust MIPS64 CAC_BASE to reflect Config.K0
[karo-tx-linux.git] / arch / mips / include / asm / mach-generic / spaces.h
index afc96ecb90042358685be12d3b2e0f8ab21964ce..952b0fdfda0e637849315f534043137f10972414 100644 (file)
@@ -12,6 +12,8 @@
 
 #include <linux/const.h>
 
+#include <asm/mipsregs.h>
+
 /*
  * This gives the physical RAM offset.
  */
 #ifdef CONFIG_64BIT
 
 #ifndef CAC_BASE
-#ifdef CONFIG_DMA_NONCOHERENT
-#define CAC_BASE               _AC(0x9800000000000000, UL)
-#else
-#define CAC_BASE               _AC(0xa800000000000000, UL)
-#endif
+#define CAC_BASE       PHYS_TO_XKPHYS(read_c0_config() & CONF_CM_CMASK, 0)
 #endif
 
 #ifndef IO_BASE