815dd18788
Introduce a new architecture-specific get_arch_dma_ops() function that takes a struct bus_type * argument. Add get_dma_ops() in <linux/dma-mapping.h>. Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Juergen Gross <jgross@suse.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: linux-arch@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Russell King <linux@armlinux.org.uk> Cc: x86@kernel.org Signed-off-by: Doug Ledford <dledford@redhat.com>
34 lines
1007 B
C
34 lines
1007 B
C
/*
|
|
* 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 const struct dma_map_ops c6x_dma_ops;
|
|
|
|
static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
|
|
{
|
|
return &c6x_dma_ops;
|
|
}
|
|
|
|
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, unsigned long attrs);
|
|
void c6x_dma_free(struct device *dev, size_t size, void *vaddr,
|
|
dma_addr_t dma_handle, unsigned long attrs);
|
|
|
|
#endif /* _ASM_C6X_DMA_MAPPING_H */
|