Aurelien Jacquiot | 14aa7e8 | 2011-10-04 12:17:19 -0400 | [diff] [blame] | 1 | /* |
| 2 | * Port on Texas Instruments TMS320C6x architecture |
| 3 | * |
| 4 | * Copyright (C) 2004, 2009, 2010, 2011 Texas Instruments Incorporated |
| 5 | * Author: Aurelien Jacquiot <aurelien.jacquiot@ti.com> |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License version 2 as |
| 9 | * published by the Free Software Foundation. |
| 10 | * |
| 11 | */ |
| 12 | #ifndef _ASM_C6X_DMA_MAPPING_H |
| 13 | #define _ASM_C6X_DMA_MAPPING_H |
| 14 | |
Bart Van Assche | 5299709 | 2017-01-20 13:04:01 -0800 | [diff] [blame] | 15 | extern const struct dma_map_ops c6x_dma_ops; |
Christoph Hellwig | 4605f04b | 2016-01-20 15:01:35 -0800 | [diff] [blame] | 16 | |
Bart Van Assche | 815dd18 | 2017-01-20 13:04:04 -0800 | [diff] [blame] | 17 | static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus) |
Aurelien Jacquiot | 14aa7e8 | 2011-10-04 12:17:19 -0400 | [diff] [blame] | 18 | { |
Christoph Hellwig | 4605f04b | 2016-01-20 15:01:35 -0800 | [diff] [blame] | 19 | return &c6x_dma_ops; |
Aurelien Jacquiot | 14aa7e8 | 2011-10-04 12:17:19 -0400 | [diff] [blame] | 20 | } |
| 21 | |
Aurelien Jacquiot | 14aa7e8 | 2011-10-04 12:17:19 -0400 | [diff] [blame] | 22 | extern void coherent_mem_init(u32 start, u32 size); |
Christoph Hellwig | 4605f04b | 2016-01-20 15:01:35 -0800 | [diff] [blame] | 23 | void *c6x_dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, |
Krzysztof Kozlowski | 00085f1 | 2016-08-03 13:46:00 -0700 | [diff] [blame] | 24 | gfp_t gfp, unsigned long attrs); |
Christoph Hellwig | 4605f04b | 2016-01-20 15:01:35 -0800 | [diff] [blame] | 25 | void c6x_dma_free(struct device *dev, size_t size, void *vaddr, |
Krzysztof Kozlowski | 00085f1 | 2016-08-03 13:46:00 -0700 | [diff] [blame] | 26 | dma_addr_t dma_handle, unsigned long attrs); |
Geert Uytterhoeven | 1818065 | 2013-01-27 09:33:22 +0000 | [diff] [blame] | 27 | |
Aurelien Jacquiot | 14aa7e8 | 2011-10-04 12:17:19 -0400 | [diff] [blame] | 28 | #endif /* _ASM_C6X_DMA_MAPPING_H */ |