All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] arm/asm: Data types defined for 64 bit Physical Address
@ 2015-09-09  8:45 Gong Qianyu
  2015-09-12  7:36 ` Albert ARIBAUD
  0 siblings, 1 reply; 2+ messages in thread
From: Gong Qianyu @ 2015-09-09  8:45 UTC (permalink / raw)
  To: u-boot

From: Aneesh Bansal <aneesh.bansal@freescale.com>

Data types and I/O functions have been defined for 64 bit
addresses in ARM.

Signed-off-by: Aneesh Bansal <aneesh.bansal@freescale.com>
Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com>
---
 arch/arm/include/asm/io.h    |  4 +++-
 arch/arm/include/asm/types.h | 13 ++++++++-----
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
index bfbe0a0..44fd273 100644
--- a/arch/arm/include/asm/io.h
+++ b/arch/arm/include/asm/io.h
@@ -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);
 }
 
 /*
@@ -183,9 +183,11 @@ static inline void __raw_readsl(unsigned long addr, void *data, int longlen)
 #define in_le32(a)	in_arch(l,le32,a)
 #define in_le16(a)	in_arch(w,le16,a)
 
+#define out_be64(a,v)	out_arch(q,be64,a,v)
 #define out_be32(a,v)	out_arch(l,be32,a,v)
 #define out_be16(a,v)	out_arch(w,be16,a,v)
 
+#define in_be64(a)	in_arch(q,be64,a)
 #define in_be32(a)	in_arch(l,be32,a)
 #define in_be16(a)	in_arch(w,be16,a)
 
diff --git a/arch/arm/include/asm/types.h b/arch/arm/include/asm/types.h
index ee77c41..d87f955 100644
--- a/arch/arm/include/asm/types.h
+++ b/arch/arm/include/asm/types.h
@@ -45,12 +45,15 @@ typedef unsigned long long u64;
 #define BITS_PER_LONG 32
 #endif	/* CONFIG_ARM64 */
 
-/* Dma addresses are 32-bits wide.  */
-
+#ifdef CONFIG_PHYS_64BIT
+typedef u64 dma_addr_t;
+typedef u64 phys_addr_t;
+typedef u64 phys_size_t;
+#else
 typedef u32 dma_addr_t;
-
-typedef unsigned long phys_addr_t;
-typedef unsigned long phys_size_t;
+typedef u32 phys_addr_t;
+typedef u32 phys_size_t;
+#endif
 
 #endif /* __KERNEL__ */
 
-- 
2.1.0.27.g96db324

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [PATCH] arm/asm: Data types defined for 64 bit Physical Address
  2015-09-09  8:45 [U-Boot] [PATCH] arm/asm: Data types defined for 64 bit Physical Address Gong Qianyu
@ 2015-09-12  7:36 ` Albert ARIBAUD
  0 siblings, 0 replies; 2+ messages in thread
From: Albert ARIBAUD @ 2015-09-12  7:36 UTC (permalink / raw)
  To: u-boot

Hello Gong Qianyu,

On Wed, 9 Sep 2015 16:45:25 +0800, Gong Qianyu
<Qianyu.Gong@freescale.com> wrote:
> From: Aneesh Bansal <aneesh.bansal@freescale.com>
> 
> Data types and I/O functions have been defined for 64 bit
> addresses in ARM.
> 
> Signed-off-by: Aneesh Bansal <aneesh.bansal@freescale.com>
> Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com>
> ---
>  arch/arm/include/asm/io.h    |  4 +++-
>  arch/arm/include/asm/types.h | 13 ++++++++-----
>  2 files changed, 11 insertions(+), 6 deletions(-)

I suspect this is needed for some other patch(es) actually using these
new types. Please post a series where the patch adding types and the
patch(es) which use them, otherwise this patch is simply dead code.

Amicalement,
-- 
Albert.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-09-12  7:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-09  8:45 [U-Boot] [PATCH] arm/asm: Data types defined for 64 bit Physical Address Gong Qianyu
2015-09-12  7:36 ` Albert ARIBAUD

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.