fwohcivar.h revision 108276
1177633Sdfr/*
2177633Sdfr * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi SHimokawa
3261046Smav * All rights reserved.
4261046Smav *
5261046Smav * Redistribution and use in source and binary forms, with or without
6177633Sdfr * modification, are permitted provided that the following conditions
7261046Smav * are met:
8261046Smav * 1. Redistributions of source code must retain the above copyright
9261046Smav *    notice, this list of conditions and the following disclaimer.
10261046Smav * 2. Redistributions in binary form must reproduce the above copyright
11261046Smav *    notice, this list of conditions and the following disclaimer in the
12261046Smav *    documentation and/or other materials provided with the distribution.
13261046Smav * 3. All advertising materials mentioning features or use of this software
14261046Smav *    must display the acknowledgement as bellow:
15261046Smav *
16261046Smav *    This product includes software developed by K. Kobayashi and H. Shimokawa
17261046Smav *
18261046Smav * 4. The name of the author may not be used to endorse or promote products
19261046Smav *    derived from this software without specific prior written permission.
20261046Smav *
21261046Smav * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22261046Smav * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
23261046Smav * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24261046Smav * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
25261046Smav * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26261046Smav * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27261046Smav * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28261046Smav * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
29177633Sdfr * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
30177633Sdfr * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31177633Sdfr * POSSIBILITY OF SUCH DAMAGE.
32177633Sdfr *
33177633Sdfr * $FreeBSD: head/sys/dev/firewire/fwohcivar.h 108276 2002-12-26 03:17:59Z simokawa $
34177633Sdfr *
35177633Sdfr */
36177633Sdfrtypedef struct fwohci_softc {
37177633Sdfr	struct firewire_comm fc;
38177633Sdfr	bus_space_tag_t bst;
39177633Sdfr	bus_space_handle_t bsh;
40177633Sdfr	void *ih;
41177633Sdfr#if __FreeBSD_version < 500000
42177633Sdfr	void *ih_cam;
43177633Sdfr#endif
44177633Sdfr
45177633Sdfr	struct resource *bsr;
46177633Sdfr	struct resource *irq_res;
47177633Sdfr	struct fwohci_dbch{
48177633Sdfr		u_int ndb;
49184588Sdfr		u_int ndesc;
50184588Sdfr		caddr_t dummy;
51184588Sdfr		STAILQ_HEAD(, fwohcidb_tr) db_trq;
52177633Sdfr		struct fwohcidb_tr *top, *bottom, *pdb_tr;
53177633Sdfr		struct fw_xferq xferq;
54177633Sdfr		struct {
55177633Sdfr			int len;
56177633Sdfr			int hlen;
57177633Sdfr			int plen;
58177633Sdfr			caddr_t buf;
59177633Sdfr		} frag;
60177633Sdfr		int flags;
61177633Sdfr#define	FWOHCI_DBCH_FULL	(1<<1)
62177633Sdfr		int buf_offset;
63177633Sdfr	} arrq, arrs, atrq, atrs, it[OHCI_DMA_ITCH], ir[OHCI_DMA_IRCH];
64177633Sdfr	u_int maxrec;
65177633Sdfr	u_int32_t *cromptr;
66177633Sdfr	u_int32_t intmask;
67177633Sdfr} fwohci_softc_t;
68177633Sdfrvoid fwohci_intr __P((void *arg));
69177633Sdfrint fwohci_init __P((struct fwohci_softc *, device_t));
70177633Sdfrint fwohci_shutdown __P((device_t dev));
71177633Sdfr