Skip to content

Commit

Permalink
[MIPS] Malta: Handle byteswapping hardare bug in big endian mode.
Browse files Browse the repository at this point in the history
    
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 <ralf@linux-mips.org>
  • Loading branch information
Elizabeth Oldham authored and Ralf Baechle committed Jun 19, 2006
1 parent 427abfa commit 7349968
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions arch/mips/mips-boards/generic/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7349968

Please sign in to comment.