summaryrefslogtreecommitdiff
path: root/arch/mips/mips-boards/generic/memory.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/mips-boards/generic/memory.c')
-rw-r--r--arch/mips/mips-boards/generic/memory.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/mips/mips-boards/generic/memory.c b/arch/mips/mips-boards/generic/memory.c
index bc4d093685bb..fd492562584a 100644
--- a/arch/mips/mips-boards/generic/memory.c
+++ b/arch/mips/mips-boards/generic/memory.c
@@ -76,6 +76,15 @@ struct prom_pmemblock * __init prom_getmdesc(void)
memsize = simple_strtol(memsize_str, NULL, 0);
}
}
+
+#ifdef CONFIG_CPU_BIG_ENDIAN
+ /*
+ * SOC-it swaps, or perhaps doesn't swap, when DMA'ing the last
+ * word of physical memory
+ */
+ memsize -= PAGE_SIZE;
+#endif
+
memset(mdesc, 0, sizeof(mdesc));
mdesc[0].type = yamon_dontuse;