bus_private.h revision 93070
193070Stmm/*-
293070Stmm * Copyright (c) 1997, 1998 Justin T. Gibbs.
393070Stmm * Copyright (c) 2002 by Thomas Moestl <tmm@FreeBSD.org>.
493070Stmm * All rights reserved.
593070Stmm *
693070Stmm * Redistribution and use in source and binary forms, with or without
793070Stmm * modification, are permitted provided that the following conditions
893070Stmm * are met:
993070Stmm * 1. Redistributions of source code must retain the above copyright
1093070Stmm *    notice, this list of conditions and the following disclaimer.
1193070Stmm * 2. Redistributions in binary form must reproduce the above copyright
1293070Stmm *    notice, this list of conditions and the following disclaimer in the
1393070Stmm *    documentation and/or other materials provided with the distribution.
1493070Stmm *
1593070Stmm * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
1693070Stmm * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
1793070Stmm * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
1893070Stmm * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
1993070Stmm * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2093070Stmm * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
2193070Stmm * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
2293070Stmm * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
2393070Stmm * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
2493070Stmm * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2593070Stmm *
2693070Stmm *	from: FreeBSD: src/sys/i386/i386/busdma_machdep.c,v 1.25 2002/01/05
2793070Stmm *
2893070Stmm * $FreeBSD: head/sys/sparc64/include/bus_private.h 93070 2002-03-24 02:50:53Z tmm $
2993070Stmm */
3093070Stmm
3193070Stmm#ifndef	_MACHINE_BUS_PRIVATE_H_
3293070Stmm#define	_MACHINE_BUS_PRIVATE_H_
3393070Stmm
3493070Stmm#include <sys/queue.h>
3593070Stmm
3693070Stmmstruct bus_dmamap {
3793070Stmm	bus_dma_tag_t	dmat;
3893070Stmm	void		*buf;		/* unmapped buffer pointer */
3993070Stmm	bus_size_t	buflen;		/* unmapped buffer length */
4093070Stmm	bus_addr_t	start;		/* start of mapped region */
4193070Stmm	struct resource *res;		/* associated resource */
4293070Stmm	bus_size_t	dvmaresv;	/* reseved DVMA memory */
4393070Stmm	STAILQ_ENTRY(bus_dmamap)	maplruq;
4493070Stmm	int		onq;
4593070Stmm};
4693070Stmm
4793070Stmm#endif /* !_MACHINE_BUS_PRIVATE_H_ */
48