OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [include/] [asm-arm/] [mach/] [dma.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1276 phoenix
/*
2
 *  linux/include/asm-arm/mach/dma.h
3
 *
4
 *  Copyright (C) 1998-2000 Russell King
5
 *
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.
9
 *
10
 *  This header file describes the interface between the generic DMA handler
11
 *  (dma.c) and the architecture-specific DMA backends (dma-*.c)
12
 */
13
 
14
struct dma_struct;
15
typedef struct dma_struct dma_t;
16
 
17
struct dma_ops {
18
        int     (*request)(dmach_t, dma_t *);           /* optional */
19
        void    (*free)(dmach_t, dma_t *);              /* optional */
20
        void    (*enable)(dmach_t, dma_t *);            /* mandatory */
21
        void    (*disable)(dmach_t, dma_t *);           /* mandatory */
22
        int     (*residue)(dmach_t, dma_t *);           /* optional */
23
        int     (*setspeed)(dmach_t, dma_t *, int);     /* optional */
24
        char    *type;
25
};
26
 
27
struct dma_struct {
28
        struct scatterlist buf;         /* single DMA                   */
29
        int             sgcount;        /* number of DMA SG             */
30
        struct scatterlist *sg;         /* DMA Scatter-Gather List      */
31
 
32
        unsigned int    active:1;       /* Transfer active              */
33
        unsigned int    invalid:1;      /* Address/Count changed        */
34
        unsigned int    using_sg:1;     /* using scatter list?          */
35
        dmamode_t       dma_mode;       /* DMA mode                     */
36
        int             speed;          /* DMA speed                    */
37
 
38
        unsigned int    lock;           /* Device is allocated          */
39
        const char      *device_id;     /* Device name                  */
40
 
41
        unsigned int    dma_base;       /* Controller base address      */
42
        int             dma_irq;        /* Controller IRQ               */
43
        struct scatterlist cur_sg;      /* Current controller buffer    */
44
 
45
        struct dma_ops  *d_ops;
46
};
47
 
48
/* Prototype: void arch_dma_init(dma)
49
 * Purpose  : Initialise architecture specific DMA
50
 * Params   : dma - pointer to array of DMA structures
51
 */
52
extern void arch_dma_init(dma_t *dma);
53
 
54
extern void isa_init_dma(dma_t *dma);

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.