diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2015-05-21 07:26:00 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-05-22 08:00:48 +0200 |
commit | 9e7d9a5f2ac5dd56e5b3718ea44049907170898b (patch) | |
tree | 6314dc456270c4f8c44b8a42cc31a0d454abf7e8 /include | |
parent | 6984e82c84e7c1b5390bd4d7450d89814e3840f1 (diff) | |
download | barebox-9e7d9a5f2ac5dd56e5b3718ea44049907170898b.tar.gz barebox-9e7d9a5f2ac5dd56e5b3718ea44049907170898b.tar.xz |
dma: Use generic place for dma_addr_t typedef
Instead of letting all architectures define their own dma_addr_t use
a common place in include/linux/types.h and use a Kconfig symbol that
architectures can select to define the width of dma_addr_t. The same
is done in the Kernel.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/types.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/types.h b/include/linux/types.h index c11e148c90..9871a66a11 100644 --- a/include/linux/types.h +++ b/include/linux/types.h @@ -158,6 +158,13 @@ typedef __u32 __bitwise __wsum; #define __aligned_be64 __be64 __attribute__((aligned(8))) #define __aligned_le64 __le64 __attribute__((aligned(8))) +/* A dma_addr_t can hold any valid DMA or bus address for the platform */ +#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT +typedef u64 dma_addr_t; +#else +typedef u32 dma_addr_t; +#endif /* dma_addr_t */ + #ifdef CONFIG_PHYS_ADDR_T_64BIT typedef u64 phys_addr_t; typedef u64 phys_size_t; |