summaryrefslogtreecommitdiff
path: root/include/asm-arm/arch-mx53/mmu.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-arm/arch-mx53/mmu.h')
-rw-r--r--include/asm-arm/arch-mx53/mmu.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/asm-arm/arch-mx53/mmu.h b/include/asm-arm/arch-mx53/mmu.h
index 5063528965..88712c1767 100644
--- a/include/asm-arm/arch-mx53/mmu.h
+++ b/include/asm-arm/arch-mx53/mmu.h
@@ -140,8 +140,15 @@ union ARM_MMU_FIRST_LEVEL_DESCRIPTOR {
*/
inline unsigned long iomem_to_phys(unsigned long virt)
{
+#if defined(CONFIG_MX53_SMD)
+ if (virt >= 0x90000000 && virt <= 0xafffffff)
+ return (unsigned long)((virt - 0x90000000) + PHYS_SDRAM_1);
+ if (virt >= 0xD0000000 && virt <= 0xEfffffff)
+ return (unsigned long)((virt - 0xD0000000) + PHYS_SDRAM_2);
+#else
if (virt >= 0xB0000000)
return (unsigned long)((virt - 0xB0000000) + PHYS_SDRAM_1);
+#endif
return (unsigned long)virt;
}
@@ -153,9 +160,18 @@ inline unsigned long iomem_to_phys(unsigned long virt)
void *__ioremap(unsigned long offset, size_t size, unsigned long flags)
{
if (1 == flags) {
+#if defined(CONFIG_MX53_SMD)
+ if (offset >= PHYS_SDRAM_1 &&
+ offset < (unsigned long)(PHYS_SDRAM_1 + PHYS_SDRAM_1_SIZE))
+ return (void *)((offset - PHYS_SDRAM_1) + 0x90000000);
+ else if (offset >= PHYS_SDRAM_1 &&
+ offset < (unsigned long)(PHYS_SDRAM_2 + PHYS_SDRAM_2_SIZE))
+ return (void *)((offset - PHYS_SDRAM_2) + 0xD0000000);
+#else
if (offset >= PHYS_SDRAM_1 &&
offset < (unsigned long)(PHYS_SDRAM_1 + PHYS_SDRAM_1_SIZE))
return (void *)((offset - PHYS_SDRAM_1) + 0xB0000000);
+#endif
else
return NULL;
} else