xref: /netbsd-src/sys/arch/sun68k/include/autoconf.h (revision 4a193f31ace319e4b0d7c811aef58b59745e338e)
1*4a193f31Stsutsui /*	$NetBSD: autoconf.h,v 1.10 2008/07/01 15:15:34 tsutsui Exp $	*/
2c1c742b4Sfredette 
3c1c742b4Sfredette /*-
4c1c742b4Sfredette  * Copyright (c) 1996 The NetBSD Foundation, Inc.
5c1c742b4Sfredette  * All rights reserved.
6c1c742b4Sfredette  *
7c1c742b4Sfredette  * This code is derived from software contributed to The NetBSD Foundation
8c1c742b4Sfredette  * by Adam Glass, Gordon W. Ross, and Matthew Fredette.
9c1c742b4Sfredette  *
10c1c742b4Sfredette  * Redistribution and use in source and binary forms, with or without
11c1c742b4Sfredette  * modification, are permitted provided that the following conditions
12c1c742b4Sfredette  * are met:
13c1c742b4Sfredette  * 1. Redistributions of source code must retain the above copyright
14c1c742b4Sfredette  *    notice, this list of conditions and the following disclaimer.
15c1c742b4Sfredette  * 2. Redistributions in binary form must reproduce the above copyright
16c1c742b4Sfredette  *    notice, this list of conditions and the following disclaimer in the
17c1c742b4Sfredette  *    documentation and/or other materials provided with the distribution.
18c1c742b4Sfredette  *
19c1c742b4Sfredette  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20c1c742b4Sfredette  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21c1c742b4Sfredette  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22c1c742b4Sfredette  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23c1c742b4Sfredette  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24c1c742b4Sfredette  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25c1c742b4Sfredette  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26c1c742b4Sfredette  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27c1c742b4Sfredette  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28c1c742b4Sfredette  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29c1c742b4Sfredette  * POSSIBILITY OF SUCH DAMAGE.
30c1c742b4Sfredette  */
31c1c742b4Sfredette 
32c1c742b4Sfredette /*
33c1c742b4Sfredette  * Autoconfiguration information.
34c1c742b4Sfredette  * (machdep parts of driver/kernel interface)
35c1c742b4Sfredette  */
36c1c742b4Sfredette 
37c1c742b4Sfredette #include <machine/bus.h>
38c1c742b4Sfredette #include <machine/promlib.h>
39c1c742b4Sfredette 
40fef1479cSfredette /* Attach arguments presented by mainbus_attach() */
41fef1479cSfredette struct mainbus_attach_args {
42fef1479cSfredette 	bus_space_tag_t	ma_bustag;	/* parent bus tag */
43fef1479cSfredette 	bus_dma_tag_t	ma_dmatag;
44fef1479cSfredette 	const char	*ma_name;	/* device name */
45fef1479cSfredette 	bus_addr_t	ma_paddr;	/* physical address */
46fef1479cSfredette 	int		ma_pri;		/* priority (IPL) */
47c1c742b4Sfredette };
48c1c742b4Sfredette 
49fef1479cSfredette /* Aliases for other buses */
50fef1479cSfredette #define	obio_attach_args	mainbus_attach_args
51fef1479cSfredette #define	oba_bustag		ma_bustag
52fef1479cSfredette #define	oba_dmatag		ma_dmatag
53fef1479cSfredette #define	oba_name		ma_name
54fef1479cSfredette #define	oba_paddr		ma_paddr
55fef1479cSfredette #define	oba_pri			ma_pri
56fef1479cSfredette 
57fef1479cSfredette #define	obmem_attach_args	mainbus_attach_args
58fef1479cSfredette #define	obma_bustag		ma_bustag
59fef1479cSfredette #define	obma_dmatag		ma_dmatag
60fef1479cSfredette #define	obma_name		ma_name
61fef1479cSfredette #define	obma_paddr		ma_paddr
62fef1479cSfredette #define	obma_pri		ma_pri
63fef1479cSfredette 
64c1c742b4Sfredette /* Locator aliases */
65c1c742b4Sfredette #define	LOCATOR_OPTIONAL	(0)
66c1c742b4Sfredette #define	LOCATOR_REQUIRED	(1)
67c1c742b4Sfredette #define	LOCATOR_FORBIDDEN	(2)
68c1c742b4Sfredette 
69*4a193f31Stsutsui int sun68k_bus_search(device_t, cfdata_t, const int *, void *);
7010b1a7beSchs int sun68k_bus_print(void *, const char *);
71aa54c659Stsutsui 
72aa54c659Stsutsui extern struct sun68k_bus_dma_tag mainbus_dma_tag;
73aa54c659Stsutsui extern struct sun68k_bus_space_tag mainbus_space_tag;
74