xref: /netbsd-src/sys/arch/virt68k/dev/mainbusvar.h (revision f83db12ca6a74a01c1e9efb1a777cfaa84098ec6)
1*f83db12cSthorpej /*	$NetBSD: mainbusvar.h,v 1.1 2024/01/02 07:40:59 thorpej Exp $	*/
2*f83db12cSthorpej 
3*f83db12cSthorpej /*-
4*f83db12cSthorpej  * Copyright (c) 2023 The NetBSD Foundation, Inc.
5*f83db12cSthorpej  * All rights reserved.
6*f83db12cSthorpej  *
7*f83db12cSthorpej  * This code is derived from software contributed to The NetBSD Foundation
8*f83db12cSthorpej  * by Jason R. Thorpe.
9*f83db12cSthorpej  *
10*f83db12cSthorpej  * Redistribution and use in source and binary forms, with or without
11*f83db12cSthorpej  * modification, are permitted provided that the following conditions
12*f83db12cSthorpej  * are met:
13*f83db12cSthorpej  * 1. Redistributions of source code must retain the above copyright
14*f83db12cSthorpej  *    notice, this list of conditions and the following disclaimer.
15*f83db12cSthorpej  * 2. Redistributions in binary form must reproduce the above copyright
16*f83db12cSthorpej  *    notice, this list of conditions and the following disclaimer in the
17*f83db12cSthorpej  *    documentation and/or other materials provided with the distribution.
18*f83db12cSthorpej  *
19*f83db12cSthorpej  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20*f83db12cSthorpej  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21*f83db12cSthorpej  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22*f83db12cSthorpej  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23*f83db12cSthorpej  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24*f83db12cSthorpej  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25*f83db12cSthorpej  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26*f83db12cSthorpej  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27*f83db12cSthorpej  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28*f83db12cSthorpej  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29*f83db12cSthorpej  * POSSIBILITY OF SUCH DAMAGE.
30*f83db12cSthorpej  */
31*f83db12cSthorpej 
32*f83db12cSthorpej #ifndef _VIRT68k_MAINBUSVAR_H_
33*f83db12cSthorpej #define	_VIRT68k_MAINBUSVAR_H_
34*f83db12cSthorpej 
35*f83db12cSthorpej #include <sys/bus.h>
36*f83db12cSthorpej 
37*f83db12cSthorpej struct mainbus_attach_args {
38*f83db12cSthorpej 	const char *	ma_compatible;
39*f83db12cSthorpej 	bus_space_tag_t	ma_st;
40*f83db12cSthorpej 	bus_dma_tag_t	ma_dmat;
41*f83db12cSthorpej 	bus_addr_t	ma_addr;
42*f83db12cSthorpej 	bus_size_t	ma_size;
43*f83db12cSthorpej 	int		ma_irq;
44*f83db12cSthorpej };
45*f83db12cSthorpej 
46*f83db12cSthorpej int	mainbus_compatible_match(const struct mainbus_attach_args *,
47*f83db12cSthorpej 	    const struct device_compatible_entry *);
48*f83db12cSthorpej const struct device_compatible_entry *
49*f83db12cSthorpej 	mainbus_compatible_lookup(const struct mainbus_attach_args *,
50*f83db12cSthorpej 	    const struct device_compatible_entry *);
51*f83db12cSthorpej 
52*f83db12cSthorpej #endif /* _VIRT68k_MAINBUSVAR_H_ */
53