summaryrefslogtreecommitdiff
path: root/arch/c6x/include/asm/dma-mapping.h
blob: f881e425d44263db9e28deeee40e25ade469f71b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
 *  Port on Texas Instruments TMS320C6x architecture
 *
 *  Copyright (C) 2004, 2009, 2010, 2011 Texas Instruments Incorporated
 *  Author: Aurelien Jacquiot <aurelien.jacquiot@ti.com>
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License version 2 as
 *  published by the Free Software Foundation.
 *
 */
#ifndef _ASM_C6X_DMA_MAPPING_H
#define _ASM_C6X_DMA_MAPPING_H

/*
 * DMA errors are defined by all-bits-set in the DMA address.
 */
#define DMA_ERROR_CODE ~0

extern struct dma_map_ops c6x_dma_ops;

static inline struct dma_map_ops *get_dma_ops(struct device *dev)
{
	return &c6x_dma_ops;
}

#include <asm-generic/dma-mapping-common.h>

extern void coherent_mem_init(u32 start, u32 size);
void *c6x_dma_alloc(struct device *dev, size_t size, dma_addr_t *handle,
		gfp_t gfp, struct dma_attrs *attrs);
void c6x_dma_free(struct device *dev, size_t size, void *vaddr,
		dma_addr_t dma_handle, struct dma_attrs *attrs);

#endif	/* _ASM_C6X_DMA_MAPPING_H */