xref: /netbsd-src/sys/dev/ieee1394/fwmem.h (revision 8b0f9554ff8762542c4defc4f70e1eb76fb508fa)
1 /*	$NetBSD: fwmem.h,v 1.3 2007/03/04 06:02:05 christos Exp $	*/
2 /*-
3  * Copyright (C) 2002-2003
4  * 	Hidetoshi Shimokawa. All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  * 1. Redistributions of source code must retain the above copyright
10  *    notice, this list of conditions and the following disclaimer.
11  * 2. Redistributions in binary form must reproduce the above copyright
12  *    notice, this list of conditions and the following disclaimer in the
13  *    documentation and/or other materials provided with the distribution.
14  * 3. All advertising materials mentioning features or use of this software
15  *    must display the following acknowledgement:
16  *
17  *	This product includes software developed by Hidetoshi Shimokawa.
18  *
19  * 4. Neither the name of the author nor the names of its contributors
20  *    may be used to endorse or promote products derived from this software
21  *    without specific prior written permission.
22  *
23  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33  * SUCH DAMAGE.
34  *
35  * $FreeBSD: /repoman/r/ncvs/src/sys/dev/firewire/fwmem.h,v 1.8 2005/01/06 01:42:41 imp Exp $
36  */
37 
38 struct fw_xfer *fwmem_read_quad(struct fw_device *, void *, uint8_t,
39 	uint16_t, uint32_t, void *, void (*)(struct fw_xfer *));
40 struct fw_xfer *fwmem_write_quad(struct fw_device *, void *, uint8_t,
41 	uint16_t, uint32_t, void *, void (*)(struct fw_xfer *));
42 struct fw_xfer *fwmem_read_block(struct fw_device *, void *, uint8_t,
43 	uint16_t, uint32_t, int, void *, void (*)(struct fw_xfer *));
44 struct fw_xfer *fwmem_write_block(struct fw_device *, void *, uint8_t,
45 	uint16_t, uint32_t, int, void *, void (*)(struct fw_xfer *));
46 
47 #if defined(__FreeBSD__)
48 d_open_t	fwmem_open;
49 d_close_t	fwmem_close;
50 d_ioctl_t	fwmem_ioctl;
51 d_read_t	fwmem_read;
52 d_write_t	fwmem_write;
53 d_poll_t	fwmem_poll;
54 d_mmap_t	fwmem_mmap;
55 d_strategy_t	fwmem_strategy;
56 #elif defined(__NetBSD__)
57 dev_type_open(fwmem_open);
58 dev_type_close(fwmem_close);
59 dev_type_ioctl(fwmem_ioctl);
60 dev_type_read(fwmem_read);
61 dev_type_write(fwmem_write);
62 dev_type_poll(fwmem_poll);
63 dev_type_mmap(fwmem_mmap);
64 dev_type_strategy(fwmem_strategy);
65 #endif
66