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