fwmem.h revision 1.2
1/*	$NetBSD: fwmem.h,v 1.2 2005/12/11 12:22:02 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
38struct fw_xfer *fwmem_read_quad(struct fw_device *, caddr_t, uint8_t,
39	uint16_t, uint32_t, void *, void (*)(struct fw_xfer *));
40struct fw_xfer *fwmem_write_quad(struct fw_device *, caddr_t, uint8_t,
41	uint16_t, uint32_t, void *, void (*)(struct fw_xfer *));
42struct fw_xfer *fwmem_read_block(struct fw_device *, caddr_t, uint8_t,
43	uint16_t, uint32_t, int, void *, void (*)(struct fw_xfer *));
44struct fw_xfer *fwmem_write_block(struct fw_device *, caddr_t, uint8_t,
45	uint16_t, uint32_t, int, void *, void (*)(struct fw_xfer *));
46
47#if defined(__FreeBSD__)
48d_open_t	fwmem_open;
49d_close_t	fwmem_close;
50d_ioctl_t	fwmem_ioctl;
51d_read_t	fwmem_read;
52d_write_t	fwmem_write;
53d_poll_t	fwmem_poll;
54d_mmap_t	fwmem_mmap;
55d_strategy_t	fwmem_strategy;
56#elif defined(__NetBSD__)
57dev_type_open(fwmem_open);
58dev_type_close(fwmem_close);
59dev_type_ioctl(fwmem_ioctl);
60dev_type_read(fwmem_read);
61dev_type_write(fwmem_write);
62dev_type_poll(fwmem_poll);
63dev_type_mmap(fwmem_mmap);
64dev_type_strategy(fwmem_strategy);
65#endif
66