Vineet Gupta | 1162b07 | 2013-01-18 15:12:20 +0530 | [diff] [blame] | 1 | /* |
| 2 | * DMA Mapping glue for ARC |
| 3 | * |
| 4 | * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License version 2 as |
| 8 | * published by the Free Software Foundation. |
| 9 | */ |
| 10 | |
| 11 | #ifndef ASM_ARC_DMA_MAPPING_H |
| 12 | #define ASM_ARC_DMA_MAPPING_H |
| 13 | |
Vineet Gupta | f2e3d55 | 2016-03-16 16:38:57 +0530 | [diff] [blame] | 14 | #ifndef CONFIG_ARC_PLAT_NEEDS_PHYS_TO_DMA |
| 15 | #define plat_dma_to_phys(dev, dma_handle) ((phys_addr_t)(dma_handle)) |
| 16 | #define plat_phys_to_dma(dev, paddr) ((dma_addr_t)(paddr)) |
| 17 | #else |
| 18 | #include <plat/dma.h> |
| 19 | #endif |
| 20 | |
Bart Van Assche | 5299709 | 2017-01-20 13:04:01 -0800 | [diff] [blame] | 21 | extern const struct dma_map_ops arc_dma_ops; |
Vineet Gupta | fc7943d | 2013-01-22 16:53:57 +0530 | [diff] [blame] | 22 | |
Bart Van Assche | 815dd18 | 2017-01-20 13:04:04 -0800 | [diff] [blame^] | 23 | static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus) |
Vineet Gupta | 1162b07 | 2013-01-18 15:12:20 +0530 | [diff] [blame] | 24 | { |
Christoph Hellwig | 052c96d | 2016-01-20 15:01:26 -0800 | [diff] [blame] | 25 | return &arc_dma_ops; |
Vineet Gupta | 1162b07 | 2013-01-18 15:12:20 +0530 | [diff] [blame] | 26 | } |
| 27 | |
Vineet Gupta | 1162b07 | 2013-01-18 15:12:20 +0530 | [diff] [blame] | 28 | #endif |