summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/s5l8700/dma-target.h
blob: 6bb3a92bbdc99e7ec812463be6d6ab8d1005213b (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
36
37
38
39
40
41
/***************************************************************************
 *             __________               __   ___.
 *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
 *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
 *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
 *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
 *                     \/            \/     \/    \/            \/
 * $Id$
 *
 * Copyright © 2009 Bertrik Sikken
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
 * KIND, either express or implied.
 *
 ****************************************************************************/

#include <stdlib.h>

/* generic DMA definitions */
#define DMA_IO_TO_MEM       0
#define DMA_MEM_TO_IO       1

/* IISOUT DMA settings */
#define DMA_IISOUT_CHANNEL  0
#define DMA_IISOUT_SELECT   0
#define DMA_IISOUT_DSIZE    1   /* 1 = 16-bit/transfer */
#define DMA_IISOUT_BLEN     0   /* 0 = 1 transfer/burst */

void dma_init(void);

void dma_setup_channel(int channel, int sel, int dir, int dsize, int blen,
                       void *addr, size_t size, void (*callback)(void));

void dma_enable_channel(int channel);
void dma_disable_channel(int channel);