xref: /netbsd-src/sys/dev/pci/svvar.h (revision 9ddb6ab554e70fb9bbd90c3d96b812bc57755a14)
1 /*      $NetBSD: svvar.h,v 1.7 2011/11/23 23:07:36 jmcneill Exp $ */
2 
3 /*
4  * Copyright (c) 1998 Constantine Paul Sapuntzakis
5  * All rights reserved
6  *
7  * Author: Constantine Paul Sapuntzakis (csapuntz@cvs.openbsd.org)
8  *
9  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted provided that the following conditions
11  * are met:
12  * 1. Redistributions of source code must retain the above copyright
13  *    notice, this list of conditions and the following disclaimer.
14  * 2. Redistributions in binary form must reproduce the above copyright
15  *    notice, this list of conditions and the following disclaimer in the
16  *    documentation and/or other materials provided with the distribution.
17  * 3. The author's name or those of the contributors may be used to
18  *    endorse or promote products derived from this software without
19  *    specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) AND CONTRIBUTORS
22  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
23  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
25  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31  * POSSIBILITY OF SUCH DAMAGE.
32  */
33 
34 struct sv_softc {
35 	struct device sc_dev;		/* base device */
36 	kmutex_t sc_lock;
37 	kmutex_t sc_intr_lock;
38 	void *sc_ih;			/* interrupt vectoring */
39 
40 	bus_space_tag_t sc_iot;
41 	bus_space_handle_t sc_ioh;
42 	bus_space_handle_t sc_dmaa_ioh;
43 	bus_space_handle_t sc_dmac_ioh;
44 	bus_dma_tag_t sc_dmatag;	/* DMA tag */
45 
46 	bus_space_tag_t sc_opliot;
47 	bus_space_handle_t sc_oplioh;
48 
49 	bus_space_tag_t sc_midiiot;
50 	bus_space_handle_t sc_midiioh;
51 
52 	struct sv_dma *sc_dmas;
53 
54 	void	(*sc_pintr)(void *);	/* DMA completion intr handler */
55 	void	*sc_parg;		/* arg for sc_intr() */
56 
57 	void	(*sc_rintr)(void *);	/* DMA completion intr handler */
58 	void	*sc_rarg;		/* arg for sc_intr() */
59 
60 	u_int	sc_record_source;	/* recording source mask */
61 
62 	struct pci_attach_args sc_pa;
63 	char	sc_dmaset;
64 };
65 
66