aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJochen Friedrich <jochen@scram.de>2007-09-24 13:14:57 -0400
committerKumar Gala <galak@kernel.crashing.org>2007-09-28 11:25:32 -0400
commitbc63818931ea55c54d6e59b7d38bff8f295dc8c1 (patch)
tree78f3d22ad1d32cd4ac75718844446fcda7d07ec4
parent83af919e0f239e87bc644a2c932b9cebf5771380 (diff)
[PPC] Fix cpm_dpram_addr returning phys mem instead of virt mem
cpm_dpram_addr returns physical memory of the DP RAM instead of iomapped virtual memory. As there usually is a 1:1 MMU map of the IMMR area, this is often not noticed. However, cpm_dpram_phys assumes this iomapped virtual memory and returns garbage on the 1:1 mapped memory causing CPM1 uart console to fail. This patch fixes the problem (copied from the powerpc tree). Signed-off-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
-rw-r--r--arch/ppc/8xx_io/commproc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/ppc/8xx_io/commproc.c b/arch/ppc/8xx_io/commproc.c
index 7088428e1fe2..9da880be4dc0 100644
--- a/arch/ppc/8xx_io/commproc.c
+++ b/arch/ppc/8xx_io/commproc.c
@@ -459,7 +459,7 @@ EXPORT_SYMBOL(cpm_dpdump);
459 459
460void *cpm_dpram_addr(unsigned long offset) 460void *cpm_dpram_addr(unsigned long offset)
461{ 461{
462 return ((immap_t *)IMAP_ADDR)->im_cpm.cp_dpmem + offset; 462 return (void *)(dpram_vbase + offset);
463} 463}
464EXPORT_SYMBOL(cpm_dpram_addr); 464EXPORT_SYMBOL(cpm_dpram_addr);
465 465