Skip to content

Commit

Permalink
[PPC] Fix cpm_dpram_addr returning phys mem instead of virt mem
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jochen Friedrich authored and Kumar Gala committed Sep 28, 2007
1 parent 83af919 commit bc63818
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/ppc/8xx_io/commproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ EXPORT_SYMBOL(cpm_dpdump);

void *cpm_dpram_addr(unsigned long offset)
{
return ((immap_t *)IMAP_ADDR)->im_cpm.cp_dpmem + offset;
return (void *)(dpram_vbase + offset);
}
EXPORT_SYMBOL(cpm_dpram_addr);

Expand Down

0 comments on commit bc63818

Please sign in to comment.