blob: 266f11c9bd593e58775d12a5dac214817da3110e [file] [log] [blame]
Vineet Gupta1162b072013-01-18 15:12:20 +05301/*
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 Guptaf2e3d552016-03-16 16:38:57 +053014#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
Christoph Hellwig052c96d2016-01-20 15:01:26 -080021extern struct dma_map_ops arc_dma_ops;
Vineet Guptafc7943d2013-01-22 16:53:57 +053022
Christoph Hellwig052c96d2016-01-20 15:01:26 -080023static inline struct dma_map_ops *get_dma_ops(struct device *dev)
Vineet Gupta1162b072013-01-18 15:12:20 +053024{
Christoph Hellwig052c96d2016-01-20 15:01:26 -080025 return &arc_dma_ops;
Vineet Gupta1162b072013-01-18 15:12:20 +053026}
27
Vineet Gupta1162b072013-01-18 15:12:20 +053028#endif