xref: /freebsd/sys/dev/firewire/fwmem.h (revision 77ee030b5fe6848e5c50ae2f0013bf43f6ad0c28)
13c60ba66SKatsushi Kobayashi /*
277ee030bSHidetoshi Shimokawa  * Copyright (C) 2002-2003
33c60ba66SKatsushi Kobayashi  * 	Hidetoshi Shimokawa. All rights reserved.
43c60ba66SKatsushi Kobayashi  *
53c60ba66SKatsushi Kobayashi  * Redistribution and use in source and binary forms, with or without
63c60ba66SKatsushi Kobayashi  * modification, are permitted provided that the following conditions
73c60ba66SKatsushi Kobayashi  * are met:
83c60ba66SKatsushi Kobayashi  * 1. Redistributions of source code must retain the above copyright
93c60ba66SKatsushi Kobayashi  *    notice, this list of conditions and the following disclaimer.
103c60ba66SKatsushi Kobayashi  * 2. Redistributions in binary form must reproduce the above copyright
113c60ba66SKatsushi Kobayashi  *    notice, this list of conditions and the following disclaimer in the
123c60ba66SKatsushi Kobayashi  *    documentation and/or other materials provided with the distribution.
133c60ba66SKatsushi Kobayashi  * 3. All advertising materials mentioning features or use of this software
143c60ba66SKatsushi Kobayashi  *    must display the following acknowledgement:
153c60ba66SKatsushi Kobayashi  *
163c60ba66SKatsushi Kobayashi  *	This product includes software developed by Hidetoshi Shimokawa.
173c60ba66SKatsushi Kobayashi  *
183c60ba66SKatsushi Kobayashi  * 4. Neither the name of the author nor the names of its contributors
193c60ba66SKatsushi Kobayashi  *    may be used to endorse or promote products derived from this software
203c60ba66SKatsushi Kobayashi  *    without specific prior written permission.
213c60ba66SKatsushi Kobayashi  *
223c60ba66SKatsushi Kobayashi  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
233c60ba66SKatsushi Kobayashi  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
243c60ba66SKatsushi Kobayashi  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
253c60ba66SKatsushi Kobayashi  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
263c60ba66SKatsushi Kobayashi  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
273c60ba66SKatsushi Kobayashi  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
283c60ba66SKatsushi Kobayashi  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
293c60ba66SKatsushi Kobayashi  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
303c60ba66SKatsushi Kobayashi  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
313c60ba66SKatsushi Kobayashi  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
323c60ba66SKatsushi Kobayashi  * SUCH DAMAGE.
333c60ba66SKatsushi Kobayashi  *
343c60ba66SKatsushi Kobayashi  * $FreeBSD$
353c60ba66SKatsushi Kobayashi  */
363c60ba66SKatsushi Kobayashi 
37f90ce7b1SHidetoshi Shimokawa struct fw_xfer *fwmem_read_quad(struct fw_device *, caddr_t, u_int8_t,
3898e6731bSHidetoshi Shimokawa 	u_int16_t, u_int32_t, void (*)(struct fw_xfer *));
39f90ce7b1SHidetoshi Shimokawa struct fw_xfer *fwmem_write_quad(struct fw_device *, caddr_t, u_int8_t,
40f90ce7b1SHidetoshi Shimokawa 	u_int16_t, u_int32_t, u_int32_t, void (*)(struct fw_xfer *));
41f90ce7b1SHidetoshi Shimokawa struct fw_xfer *fwmem_read_block(struct fw_device *, caddr_t, u_int8_t,
4298e6731bSHidetoshi Shimokawa 	u_int16_t, u_int32_t, int, void (*)(struct fw_xfer *));
438a45d99bSHidetoshi Shimokawa struct fw_xfer *fwmem_write_block(struct fw_device *, caddr_t, u_int8_t,
448a45d99bSHidetoshi Shimokawa 	u_int16_t, u_int32_t, int, char *, void (*)(struct fw_xfer *));
45f90ce7b1SHidetoshi Shimokawa 
463c60ba66SKatsushi Kobayashi d_open_t	fwmem_open;
473c60ba66SKatsushi Kobayashi d_close_t	fwmem_close;
483c60ba66SKatsushi Kobayashi d_ioctl_t	fwmem_ioctl;
493c60ba66SKatsushi Kobayashi d_read_t	fwmem_read;
503c60ba66SKatsushi Kobayashi d_write_t	fwmem_write;
513c60ba66SKatsushi Kobayashi d_poll_t	fwmem_poll;
523c60ba66SKatsushi Kobayashi d_mmap_t	fwmem_mmap;
53