Zynq7:platform_patova: return the correct va
authorWendy Liang <jliang@xilinx.com>
Tue, 19 Jul 2016 22:24:59 +0000 (15:24 -0700)
committerWendy Liang <jliang@xilinx.com>
Thu, 13 Oct 2016 05:01:44 +0000 (22:01 -0700)
This patch is to correct the pa to va conversion
in zynq7 generic.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
lib/system/generic/machine/zynq7/machine_system.c

index 74795128dd1ab5ad26c9c3c76c3ac2d8e29dc8df..be34ea04b0a8d6bffaae0c6828eca276fdb880a5 100755 (executable)
@@ -205,7 +205,9 @@ unsigned long platform_vatopa(void *addr)
 
 void *platform_patova(unsigned long addr)
 {
-       return ((void *)addr);
+       unsigned long laddr =
+               ((unsigned long)addr & (~(0x0fff << 20))) | (0x08 << 24);
+       return ((void *)laddr);
 
 }