xref: /netbsd-src/sys/arch/dreamcast/dev/g2/gapspcivar.h (revision 4b1cae5595f4da9c8621f0e78ec08b1845a3676c)
1*4b1cae55Sthorpej /*	$NetBSD: gapspcivar.h,v 1.4 2023/12/02 22:42:02 thorpej Exp $	*/
226cf6921Sthorpej 
326cf6921Sthorpej /*-
426cf6921Sthorpej  * Copyright (c) 2001 Marcus Comstedt
526cf6921Sthorpej  * All rights reserved.
626cf6921Sthorpej  *
726cf6921Sthorpej  * Redistribution and use in source and binary forms, with or without
826cf6921Sthorpej  * modification, are permitted provided that the following conditions
926cf6921Sthorpej  * are met:
1026cf6921Sthorpej  * 1. Redistributions of source code must retain the above copyright
1126cf6921Sthorpej  *    notice, this list of conditions and the following disclaimer.
1226cf6921Sthorpej  * 2. Redistributions in binary form must reproduce the above copyright
1326cf6921Sthorpej  *    notice, this list of conditions and the following disclaimer in the
1426cf6921Sthorpej  *    documentation and/or other materials provided with the distribution.
1526cf6921Sthorpej  * 3. All advertising materials mentioning features or use of this software
1626cf6921Sthorpej  *    must display the following acknowledgement:
1726cf6921Sthorpej  *	This product includes software developed by Marcus Comstedt.
1826cf6921Sthorpej  * 4. Neither the name of The NetBSD Foundation nor the names of its
1926cf6921Sthorpej  *    contributors may be used to endorse or promote products derived
2026cf6921Sthorpej  *    from this software without specific prior written permission.
2126cf6921Sthorpej  *
2226cf6921Sthorpej  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
2326cf6921Sthorpej  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
2426cf6921Sthorpej  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
2526cf6921Sthorpej  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
2626cf6921Sthorpej  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
2726cf6921Sthorpej  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
2826cf6921Sthorpej  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
2926cf6921Sthorpej  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
3026cf6921Sthorpej  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
3126cf6921Sthorpej  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
3226cf6921Sthorpej  * POSSIBILITY OF SUCH DAMAGE.
3326cf6921Sthorpej  */
3426cf6921Sthorpej 
3526cf6921Sthorpej #ifndef _DREAMCAST_GAPSPCIVAR_H_
3626cf6921Sthorpej #define	_DREAMCAST_GAPSPCIVAR_H_
3726cf6921Sthorpej 
38*4b1cae55Sthorpej #include <sys/vmem.h>
39*4b1cae55Sthorpej 
4026cf6921Sthorpej struct gaps_softc {
41b1361f43Stsutsui 	device_t sc_dev;
4226cf6921Sthorpej 	bus_space_tag_t sc_memt;
43fc7cc523Smarcus 	bus_space_handle_t sc_gaps_memh;
4426cf6921Sthorpej 	bus_space_handle_t sc_pci_memh;
4526cf6921Sthorpej 	bus_space_handle_t sc_dma_memh;
4626cf6921Sthorpej 	struct dreamcast_pci_chipset sc_pc;
4726cf6921Sthorpej 	struct dreamcast_bus_dma_tag sc_dmat;
4826cf6921Sthorpej 	paddr_t sc_dmabase;
49fc7cc523Smarcus 	size_t sc_dmasize;
50*4b1cae55Sthorpej 	vmem_t *sc_dma_arena;
5126cf6921Sthorpej };
5226cf6921Sthorpej 
5326cf6921Sthorpej void	gaps_pci_init(struct gaps_softc *);
5426cf6921Sthorpej void	gaps_dma_init(struct gaps_softc *);
5526cf6921Sthorpej 
5626cf6921Sthorpej #endif /* _DREAMCAST_GAPSPCIVAR_H_ */
57