From patchwork Fri Feb 14 05:41:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 236323 List-Id: U-Boot discussion From: yamada.masahiro at socionext.com (Masahiro Yamada) Date: Fri, 14 Feb 2020 14:41:34 +0900 Subject: [PATCH v2 01/11] dma-mapping: fix the prototype of dma_map_single() In-Reply-To: <20200214054144.18315-1-yamada.masahiro@socionext.com> References: <20200214054144.18315-1-yamada.masahiro@socionext.com> Message-ID: <20200214054144.18315-2-yamada.masahiro@socionext.com> Make dma_map_single() return the dma address, and remove the pointless volatile. Signed-off-by: Masahiro Yamada --- Changes in v2: None arch/arm/include/asm/dma-mapping.h | 5 +++-- arch/nds32/include/asm/dma-mapping.h | 5 +++-- arch/riscv/include/asm/dma-mapping.h | 5 +++-- arch/x86/include/asm/dma-mapping.h | 5 +++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h index d20703739fad..d0895a209666 100644 --- a/arch/arm/include/asm/dma-mapping.h +++ b/arch/arm/include/asm/dma-mapping.h @@ -11,6 +11,7 @@ #include #include #include +#include #include #define dma_mapping_error(x, y) 0 @@ -26,8 +27,8 @@ static inline void dma_free_coherent(void *addr) free(addr); } -static inline unsigned long dma_map_single(volatile void *vaddr, size_t len, - enum dma_data_direction dir) +static inline dma_addr_t dma_map_single(void *vaddr, size_t len, + enum dma_data_direction dir) { unsigned long addr = (unsigned long)vaddr; diff --git a/arch/nds32/include/asm/dma-mapping.h b/arch/nds32/include/asm/dma-mapping.h index c8876ceadda6..9387dec34768 100644 --- a/arch/nds32/include/asm/dma-mapping.h +++ b/arch/nds32/include/asm/dma-mapping.h @@ -10,6 +10,7 @@ #include #include #include +#include #include static void *dma_alloc_coherent(size_t len, unsigned long *handle) @@ -18,8 +19,8 @@ static void *dma_alloc_coherent(size_t len, unsigned long *handle) return (void *)*handle; } -static inline unsigned long dma_map_single(volatile void *vaddr, size_t len, - enum dma_data_direction dir) +static inline dma_addr_t dma_map_single(void *vaddr, size_t len, + enum dma_data_direction dir) { unsigned long addr = (unsigned long)vaddr; diff --git a/arch/riscv/include/asm/dma-mapping.h b/arch/riscv/include/asm/dma-mapping.h index 6cc39469590a..eac56f8fbdfa 100644 --- a/arch/riscv/include/asm/dma-mapping.h +++ b/arch/riscv/include/asm/dma-mapping.h @@ -10,6 +10,7 @@ #define __ASM_RISCV_DMA_MAPPING_H #include +#include #include #include #include @@ -28,8 +29,8 @@ static inline void dma_free_coherent(void *addr) free(addr); } -static inline unsigned long dma_map_single(volatile void *vaddr, size_t len, - enum dma_data_direction dir) +static inline dma_addr_t dma_map_single(void *vaddr, size_t len, + enum dma_data_direction dir) { unsigned long addr = (unsigned long)vaddr; diff --git a/arch/x86/include/asm/dma-mapping.h b/arch/x86/include/asm/dma-mapping.h index 900b99b8a69a..7e205e3313ac 100644 --- a/arch/x86/include/asm/dma-mapping.h +++ b/arch/x86/include/asm/dma-mapping.h @@ -11,6 +11,7 @@ #include #include #include +#include #include #define dma_mapping_error(x, y) 0 @@ -26,8 +27,8 @@ static inline void dma_free_coherent(void *addr) free(addr); } -static inline unsigned long dma_map_single(volatile void *vaddr, size_t len, - enum dma_data_direction dir) +static inline dma_addr_t dma_map_single(void *vaddr, size_t len, + enum dma_data_direction dir) { unsigned long addr = (unsigned long)vaddr;