]> git.sur5r.net Git - u-boot/commitdiff
Data types defined for 64 bit physical address
authorAneesh Bansal <aneesh.bansal@freescale.com>
Thu, 17 Sep 2015 10:46:35 +0000 (16:16 +0530)
committerYork Sun <yorksun@freescale.com>
Thu, 29 Oct 2015 17:33:57 +0000 (10:33 -0700)
Data types and I/O functions have been defined for
64 bit physical addresses in arm.

Signed-off-by: Aneesh Bansal <aneesh.bansal@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
arch/arm/include/asm/io.h
arch/arm/include/asm/types.h

index bfbe0a0988b47b2eafc636ca238f35087d7a5e5f..75773bdbe079701026986037f3bc019c5fc45b12 100644 (file)
@@ -46,7 +46,7 @@ static inline void sync(void)
 static inline void *
 map_physmem(phys_addr_t paddr, unsigned long len, unsigned long flags)
 {
-       return (void *)paddr;
+       return (void *)((unsigned long)paddr);
 }
 
 /*
@@ -59,7 +59,7 @@ static inline void unmap_physmem(void *vaddr, unsigned long flags)
 
 static inline phys_addr_t virt_to_phys(void * vaddr)
 {
-       return (phys_addr_t)(vaddr);
+       return (phys_addr_t)((unsigned long)vaddr);
 }
 
 /*
index ee77c4179f1aa04c24d37944b870c69ddebb13c3..388058e04c5b88a3aa62a22dc54dc3634a4cc65f 100644 (file)
@@ -45,12 +45,16 @@ typedef unsigned long long u64;
 #define BITS_PER_LONG 32
 #endif /* CONFIG_ARM64 */
 
-/* Dma addresses are 32-bits wide.  */
-
+#ifdef CONFIG_PHYS_64BIT
+typedef unsigned long long dma_addr_t;
+typedef unsigned long long phys_addr_t;
+typedef unsigned long long phys_size_t;
+#else
+/* DMA addresses are 32-bits wide */
 typedef u32 dma_addr_t;
-
 typedef unsigned long phys_addr_t;
 typedef unsigned long phys_size_t;
+#endif
 
 #endif /* __KERNEL__ */