ARM: Update phys_addr_t depending on CONFIG_PHYS_64BIT
RFC PATCH 1/1 ARM: Update phys_addr_t depending on CONFIG_PHYS_64BIT
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 <[email protected]>
---
- 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(-)
arch/arm/include/asm/io.h +2 -2
@@ -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); }/*
arch/arm/include/asm/types.h +5 -0
@@ -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__ */
Signature · 1 line
2.1.4
RFC PATCH 1/1 ARM: Update phys_addr_t depending on CONFIG_PHYS_64BIT
Quoted 7 lines · Lokesh Vutla
Introduce
CONFIG_PHYS_64BITon ARM to deal with 32 bit ARM platforms with large physical addresses.
This is inspired from commite99ccb488181d0
("Introducephys_size_tand movephys_addr_tintoasm/types.h") done on powerpc.Signed-off-by Lokesh Vutla <[email protected]>
Reviewed-by Tom Rini <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151022/dc4756c1/attachment.sig>