summaryrefslogtreecommitdiff
path: root/arch/mips
diff options
context:
space:
mode:
authorPaul Burton <paul.burton@imgtec.com>2016-09-26 19:28:57 +0100
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>2016-11-30 16:18:19 +0100
commit6fd596a1aa57bd431263f45b0c57ee8ae6b2403c (patch)
treee98e62c2e8a860fc0d28ac40b0d5368b7cd66425 /arch/mips
parent7a3e0f74a7c3ff83ba0607ebf8a14310ff08db60 (diff)
downloadu-boot-imx-6fd596a1aa57bd431263f45b0c57ee8ae6b2403c.zip
u-boot-imx-6fd596a1aa57bd431263f45b0c57ee8ae6b2403c.tar.gz
u-boot-imx-6fd596a1aa57bd431263f45b0c57ee8ae6b2403c.tar.bz2
MIPS: Fix map_physmem for cached mappings
map_physmem should return a pointer that can be used by the CPU to access the given memory - on MIPS simply returning the physical address as it does prior to this patch doesn't achieve that. Instead return a pointer to the memory within (c)kseg0, which matches up consistently with the (c)kseg1 pointer that uncached mappings return via ioremap. Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/include/asm/io.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h
index 5b86386..ee7a592 100644
--- a/arch/mips/include/asm/io.h
+++ b/arch/mips/include/asm/io.h
@@ -501,7 +501,7 @@ map_physmem(phys_addr_t paddr, unsigned long len, unsigned long flags)
if (flags == MAP_NOCACHE)
return ioremap(paddr, len);
- return (void *)paddr;
+ return (void *)CKSEG0ADDR(paddr);
}
/*