xref: /openbsd-src/sys/arch/hppa/include/autoconf.h (revision b2ea75c1b17e1a9a339660e7ed45cd24946b230e)
1 /*	$OpenBSD: autoconf.h,v 1.10 2001/05/05 22:33:42 art Exp $	*/
2 
3 /*
4  * Copyright (c) 1998 Michael Shalayeff
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  * 1. Redistributions of source code must retain the above copyright
11  *    notice, this list of conditions and the following disclaimer.
12  * 2. Redistributions in binary form must reproduce the above copyright
13  *    notice, this list of conditions and the following disclaimer in the
14  *    documentation and/or other materials provided with the distribution.
15  * 3. All advertising materials mentioning features or use of this software
16  *    must display the following acknowledgement:
17  *	This product includes software developed by Michael Shalayeff.
18  * 4. The name of the author may not be used to endorse or promote products
19  *    derived from this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 
33 #include <machine/bus.h>
34 #include <machine/pdc.h>
35 
36 struct confargs {
37 	const char	*ca_name;	/* device name/description */
38 	bus_space_tag_t	ca_iot;		/* io tag */
39 	int		ca_mod;		/* module number on the bus */
40 	struct iodc_data ca_type;	/* iodc-specific type descrition */
41 	hppa_hpa_t	ca_hpa;		/* module HPA */
42 	bus_dma_tag_t	ca_dmatag;	/* DMA tag */
43 	int		ca_irq;		/* module IRQ */
44 	struct pdc_iodc_read *ca_pdc_iodc_read;
45 };
46 
47 #define	hppacf_irq	cf_loc[0]
48 
49 /* this is used for hppa_knownmodules table
50  * describing known to this port modules,
51  * system boards, cpus, fpus and busses
52  */
53 struct hppa_mod_info {
54 	int	mi_type;
55 	int	mi_sv;
56 	const char *mi_name;
57 };
58 
59 struct device;
60 
61 const char *hppa_mod_info __P((int, int));
62 void	pdc_scanbus __P((struct device *, struct confargs *, int bus, int));
63 int	mbprint __P((void *, const char *));
64 int	mbsubmatch __P((struct device *, void *, void *));
65 void	*cpu_intr_establish __P((int pri, int, int (*handler) __P((void *)),
66 				void *arg, struct device *name));
67 int	clock_intr __P((void *));
68 
69 void	dumpconf	__P((void));
70