Message ID | 1445524177-15905-1-git-send-email-lokeshvutla@ti.com |
---|---|
State | RFC |
Delegated to: | Albert ARIBAUD |
Headers | show |
On Thu, Oct 22, 2015 at 07:59:37PM +0530, Lokesh Vutla wrote: > Introduce CONFIG_PHYS_64BIT on ARM to deal with 32 bit ARM platforms > with large physical addresses. > This is inspired from commit e99ccb488181d0 > ("Introduce phys_size_t and move phys_addr_t into asm/types.h") done on > powerpc. > > Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h index bfbe0a0..75773bd 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 ee77c41..58dfada 100644 --- a/arch/arm/include/asm/types.h +++ b/arch/arm/include/asm/types.h @@ -49,8 +49,13 @@ typedef unsigned long long u64; typedef u32 dma_addr_t; +#ifdef CONFIG_PHYS_64BIT +typedef unsigned long long phys_addr_t; +typedef unsigned long long phys_size_t; +#else typedef unsigned long phys_addr_t; typedef unsigned long phys_size_t; +#endif #endif /* __KERNEL__ */
Introduce CONFIG_PHYS_64BIT on ARM to deal with 32 bit ARM platforms with large physical addresses. This is inspired from commit e99ccb488181d0 ("Introduce phys_size_t and move phys_addr_t into asm/types.h") done on powerpc. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> --- - This is needed for platforms like TI's DRA7 which support memory upto 4GB arch/arm/include/asm/io.h | 4 ++-- arch/arm/include/asm/types.h | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-)