dmavar.h revision 1.4.42.1 1 1.4.42.1 skrll /* $NetBSD: dmavar.h,v 1.4.42.1 2005/01/24 08:34:47 skrll Exp $ */
2 1.1 jeremy
3 1.1 jeremy /*
4 1.1 jeremy * Copyright (c) 1994 Peter Galbavy. All rights reserved.
5 1.1 jeremy * Redistribution and use in source and binary forms, with or without
6 1.1 jeremy * modification, are permitted provided that the following conditions
7 1.1 jeremy * are met:
8 1.1 jeremy * 1. Redistributions of source code must retain the above copyright
9 1.1 jeremy * notice, this list of conditions and the following disclaimer.
10 1.1 jeremy * 2. Redistributions in binary form must reproduce the above copyright
11 1.1 jeremy * notice, this list of conditions and the following disclaimer in the
12 1.1 jeremy * documentation and/or other materials provided with the distribution.
13 1.1 jeremy * 3. All advertising materials mentioning features or use of this software
14 1.1 jeremy * must display the following acknowledgement:
15 1.1 jeremy * This product includes software developed by Peter Galbavy.
16 1.1 jeremy * 4. The name of the author may not be used to endorse or promote products
17 1.1 jeremy * derived from this software without specific prior written permission.
18 1.1 jeremy *
19 1.1 jeremy * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20 1.1 jeremy * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21 1.1 jeremy * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22 1.1 jeremy * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23 1.1 jeremy * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24 1.1 jeremy * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 1.1 jeremy * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 1.1 jeremy * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 1.1 jeremy * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 1.1 jeremy * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 1.1 jeremy */
30 1.1 jeremy
31 1.1 jeremy struct dma_softc {
32 1.1 jeremy struct device sc_dev; /* us as a device */
33 1.3 gwr struct ncr53c9x_softc *sc_esp; /* my scsi */
34 1.4 gwr volatile struct dma_regs *sc_regs; /* the registers */
35 1.1 jeremy int sc_active; /* DMA active ? */
36 1.1 jeremy u_int sc_rev; /* revision */
37 1.1 jeremy int sc_burst; /* DVMA burst size in effect */
38 1.1 jeremy caddr_t sc_dvmakaddr; /* DVMA cookies */
39 1.1 jeremy caddr_t sc_dvmaaddr; /* */
40 1.1 jeremy u_long sc_dmasaddr; /* Slave address */
41 1.1 jeremy size_t sc_dmasize;
42 1.1 jeremy caddr_t *sc_dmaaddr;
43 1.1 jeremy size_t *sc_dmalen;
44 1.3 gwr #if 0
45 1.1 jeremy void (*reset)(struct dma_softc *); /* reset routine */
46 1.1 jeremy int (*intr)(struct dma_softc *); /* interrupt ! */
47 1.1 jeremy int (*setup)(struct dma_softc *, caddr_t *, size_t *, int, size_t *);
48 1.3 gwr #endif
49 1.1 jeremy };
50 1.1 jeremy
51 1.4 gwr #define DMACSR(sc) ((sc)->sc_regs->csr)
52 1.4 gwr #define DMADDR(sc) ((sc)->sc_regs->addr)
53 1.4 gwr #define DMACNT(sc) ((sc)->sc_regs->bcnt)
54 1.1 jeremy
55 1.4.42.1 skrll struct dma_softc * espdmafind(int);
56 1.3 gwr
57 1.4.42.1 skrll void dma_reset(struct dma_softc *);
58 1.4.42.1 skrll int dma_setup(struct dma_softc *, caddr_t *, size_t *, int, size_t *);
59 1.1 jeremy
60 1.4.42.1 skrll int espdmaintr(struct dma_softc *);
61