summaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorAneesh Bansal <aneesh.bansal@freescale.com>2015-09-17 16:16:35 +0530
committerYork Sun <yorksun@freescale.com>2015-10-29 10:33:57 -0700
commitf4f0b7403a06d2642ca40e6a0b18ee7336f276a8 (patch)
tree7a9549558f61fe8fa0725c9bdf4a6799748b6cf1 /arch/arm
parent7bcb0eb28592c8336584a4a0d123b87837f91fd9 (diff)
downloadtalos-obmc-uboot-f4f0b7403a06d2642ca40e6a0b18ee7336f276a8.tar.gz
talos-obmc-uboot-f4f0b7403a06d2642ca40e6a0b18ee7336f276a8.zip
Data types defined for 64 bit physical address
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>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/include/asm/io.h4
-rw-r--r--arch/arm/include/asm/types.h10
2 files changed, 9 insertions, 5 deletions
diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
index bfbe0a0988..75773bdbe0 100644
--- a/arch/arm/include/asm/io.h
+++ b/arch/arm/include/asm/io.h
@@ -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);
}
/*
diff --git a/arch/arm/include/asm/types.h b/arch/arm/include/asm/types.h
index ee77c4179f..388058e04c 100644
--- a/arch/arm/include/asm/types.h
+++ b/arch/arm/include/asm/types.h
@@ -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__ */
OpenPOWER on IntegriCloud