xtensa: implement dma_to_phys and phys_to_dma
authorMax Filippov <jcmvbkbc@gmail.com>
Sat, 7 Nov 2015 03:59:51 +0000 (06:59 +0300)
committerMax Filippov <jcmvbkbc@gmail.com>
Sun, 8 Nov 2015 22:25:38 +0000 (01:25 +0300)
This fixes the following build error seen in -next:

  drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c:143:2: error:
  implicit declaration of function 'dma_to_phys'

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
arch/xtensa/include/asm/dma-mapping.h

index 4427f38b634e62a90b629fc11d68b25d70c34ba6..66c9ba261e30b694713bc7861bba33ef5ee356b6 100644 (file)
@@ -35,4 +35,14 @@ static inline struct dma_map_ops *get_dma_ops(struct device *dev)
 void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
                    enum dma_data_direction direction);
 
+static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr)
+{
+       return (dma_addr_t)paddr;
+}
+
+static inline phys_addr_t dma_to_phys(struct device *dev, dma_addr_t daddr)
+{
+       return (phys_addr_t)daddr;
+}
+
 #endif /* _XTENSA_DMA_MAPPING_H */