[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>

authored by Jochen Friedrich and committed by Kumar Gala bc638189 83af919e

+1 -1
+1 -1
arch/ppc/8xx_io/commproc.c
··· 459 460 void *cpm_dpram_addr(unsigned long offset) 461 { 462 - return ((immap_t *)IMAP_ADDR)->im_cpm.cp_dpmem + offset; 463 } 464 EXPORT_SYMBOL(cpm_dpram_addr); 465
··· 459 460 void *cpm_dpram_addr(unsigned long offset) 461 { 462 + return (void *)(dpram_vbase + offset); 463 } 464 EXPORT_SYMBOL(cpm_dpram_addr); 465