From: Elizabeth Oldham Date: Tue, 6 Jun 2006 09:57:09 +0000 (+0100) Subject: [MIPS] Malta: Handle byteswapping hardare bug in big endian mode. X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=734996820fd02b52a3fa0fcc09bdb914934bea4c;p=mv-sheeva.git [MIPS] Malta: Handle byteswapping hardare bug in big endian mode. The SOC-it system controller running in big endian mode might forget byteswapping when DMAing to the last word of physical memory. Fixed by ignoring the last page of memory. Signed-off-by: Ralf Baechle --- diff --git a/arch/mips/mips-boards/generic/memory.c b/arch/mips/mips-boards/generic/memory.c index bc4d093685b..fd492562584 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;