dma-mapping: fix the prototype of dma_map_single()
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 14 Feb 2020 07:40:17 +0000 (16:40 +0900)
committerPeng Fan <peng.fan@nxp.com>
Wed, 19 Feb 2020 13:27:30 +0000 (21:27 +0800)
Make dma_map_single() return the dma address, and remove the
pointless volatile.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
arch/arm/include/asm/dma-mapping.h
arch/nds32/include/asm/dma-mapping.h
arch/riscv/include/asm/dma-mapping.h
arch/x86/include/asm/dma-mapping.h

index d20703739fad24824c6299c4f8c505b565e56ac5..d0895a2096668e4923aff31de120e50ab6c6c559 100644 (file)
@@ -11,6 +11,7 @@
 #include <asm/cache.h>
 #include <cpu_func.h>
 #include <linux/dma-direction.h>
+#include <linux/types.h>
 #include <malloc.h>
 
 #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;
 
index c8876ceadda6a2e1eae73515ad8b9b2aef1e531e..9387dec3476880c4bc6a6574a5db94932af4a439 100644 (file)
@@ -10,6 +10,7 @@
 #include <asm/cache.h>
 #include <cpu_func.h>
 #include <linux/dma-direction.h>
+#include <linux/types.h>
 #include <malloc.h>
 
 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;
 
index 6cc39469590a047f121e0b481816f4f4e319d86e..eac56f8fbdfaa3e884675f071cad4009d54039af 100644 (file)
@@ -10,6 +10,7 @@
 #define __ASM_RISCV_DMA_MAPPING_H
 
 #include <common.h>
+#include <linux/types.h>
 #include <asm/cache.h>
 #include <cpu_func.h>
 #include <linux/dma-direction.h>
@@ -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;
 
index 900b99b8a69a194f5b3f1203829a65f62222b302..7e205e3313acb4b569ec62afe8aa1bb4d2fbff38 100644 (file)
@@ -11,6 +11,7 @@
 #include <asm/cache.h>
 #include <cpu_func.h>
 #include <linux/dma-direction.h>
+#include <linux/types.h>
 #include <malloc.h>
 
 #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;