2 * include/asm-arm/arch-s3c24a0/dma.h
4 * $Id: dma.h,v 1.2 2005/11/28 03:55:11 gerg Exp $
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.
10 * Based on linux/include/asm-arm/arch-s3c2410/dma.h
14 #ifndef __ASM_ARCH_DMA_H__
15 #define __ASM_ARCH_DMA_H__
19 #define MAX_DMA_ADDRESS 0xffffffff
23 * If MAX_DMA_CHANNELS is zero, It means that this architecuture not use
24 * the regular generic DMA interface provided by kernel.
25 * Why? I don't know. I will investigate S3C24A0 DMA model and generic
26 * DMA interface. But not yet.
28 #define MAX_DMA_CHANNELS 0
30 /* The S3C24A0 has four internal DMA channels. */
31 #define S3C24A0_DMA_CHANNELS 4
33 #define MAX_S3C24A0_DMA_CHANNELS S3C24A0_DMA_CHANNELS
43 typedef void (*dma_callback_t
)(void *buf_id
, int size
);
46 extern int elfin_request_dma(const char *device_id
, dmach_t channel
,
47 dma_callback_t write_cb
, dma_callback_t read_cb
);
48 extern int elfin_dma_queue_buffer(dmach_t channel
, void *buf_id
,
49 dma_addr_t data
, int size
, int write
);
50 extern int elfin_dma_flush_all(dmach_t channel
);
51 extern void elfin_free_dma(dmach_t channel
);
52 extern int elfin_dma_get_current(dmach_t channel
, void **buf_id
, dma_addr_t
*addr
);
53 extern int elfin_dma_stop(dmach_t channel
);
55 #endif /* __ASM_ARCH_DMA_H__ */