Skip to content
Snippets Groups Projects
Commit f4f0b740 authored by Aneesh Bansal's avatar Aneesh Bansal Committed by York Sun
Browse files

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: default avatarAneesh Bansal <aneesh.bansal@freescale.com>
Reviewed-by: default avatarYork Sun <yorksun@freescale.com>
parent 7bcb0eb2
No related branches found
No related tags found
No related merge requests found
...@@ -46,7 +46,7 @@ static inline void sync(void) ...@@ -46,7 +46,7 @@ static inline void sync(void)
static inline void * static inline void *
map_physmem(phys_addr_t paddr, unsigned long len, unsigned long flags) 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) ...@@ -59,7 +59,7 @@ static inline void unmap_physmem(void *vaddr, unsigned long flags)
static inline phys_addr_t virt_to_phys(void * vaddr) static inline phys_addr_t virt_to_phys(void * vaddr)
{ {
return (phys_addr_t)(vaddr); return (phys_addr_t)((unsigned long)vaddr);
} }
/* /*
......
...@@ -45,12 +45,16 @@ typedef unsigned long long u64; ...@@ -45,12 +45,16 @@ typedef unsigned long long u64;
#define BITS_PER_LONG 32 #define BITS_PER_LONG 32
#endif /* CONFIG_ARM64 */ #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 u32 dma_addr_t;
typedef unsigned long phys_addr_t; typedef unsigned long phys_addr_t;
typedef unsigned long phys_size_t; typedef unsigned long phys_size_t;
#endif
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment