xref: /netbsd-src/sys/arch/hp300/dev/frodovar.h (revision ce099b40997c43048fb78bd578195f81d2456523)
1*ce099b40Smartin /*	$NetBSD: frodovar.h,v 1.9 2008/04/28 20:23:19 martin Exp $	*/
22d397943Sthorpej 
32d397943Sthorpej /*-
42d397943Sthorpej  * Copyright (c) 1997 The NetBSD Foundation, Inc.
52d397943Sthorpej  * All rights reserved.
62d397943Sthorpej  *
72d397943Sthorpej  * This code is derived from software contributed to The NetBSD Foundation
82d397943Sthorpej  * by Jason R. Thorpe.
92d397943Sthorpej  *
102d397943Sthorpej  * Redistribution and use in source and binary forms, with or without
112d397943Sthorpej  * modification, are permitted provided that the following conditions
122d397943Sthorpej  * are met:
132d397943Sthorpej  * 1. Redistributions of source code must retain the above copyright
142d397943Sthorpej  *    notice, this list of conditions and the following disclaimer.
152d397943Sthorpej  * 2. Redistributions in binary form must reproduce the above copyright
162d397943Sthorpej  *    notice, this list of conditions and the following disclaimer in the
172d397943Sthorpej  *    documentation and/or other materials provided with the distribution.
182d397943Sthorpej  *
192d397943Sthorpej  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
202d397943Sthorpej  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
212d397943Sthorpej  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
222d397943Sthorpej  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
232d397943Sthorpej  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
242d397943Sthorpej  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
252d397943Sthorpej  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
262d397943Sthorpej  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
272d397943Sthorpej  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
282d397943Sthorpej  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
292d397943Sthorpej  * POSSIBILITY OF SUCH DAMAGE.
302d397943Sthorpej  */
31a155715dSthorpej 
32a155715dSthorpej /*
33a155715dSthorpej  * Copyright (c) 1997 Michael Smith.  All rights reserved.
34a155715dSthorpej  *
35a155715dSthorpej  * Redistribution and use in source and binary forms, with or without
36a155715dSthorpej  * modification, are permitted provided that the following conditions
37a155715dSthorpej  * are met:
38a155715dSthorpej  * 1. Redistributions of source code must retain the above copyright
39a155715dSthorpej  *    notice, this list of conditions and the following disclaimer.
40a155715dSthorpej  * 2. Redistributions in binary form must reproduce the above copyright
41a155715dSthorpej  *    notice, this list of conditions and the following disclaimer in the
42a155715dSthorpej  *    documentation and/or other materials provided with the distribution.
43a155715dSthorpej  *
44a155715dSthorpej  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
45a155715dSthorpej  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
46a155715dSthorpej  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
47a155715dSthorpej  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
48a155715dSthorpej  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
49a155715dSthorpej  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
50a155715dSthorpej  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
51a155715dSthorpej  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
52a155715dSthorpej  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
53a155715dSthorpej  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
54a155715dSthorpej  * SUCH DAMAGE.
55a155715dSthorpej  */
56a155715dSthorpej 
57a155715dSthorpej /*
58a155715dSthorpej  * Autoconfiguration definitions and prototypes for the Frodo ASIC in
59a155715dSthorpej  * the HP9000/4xx series.
60a155715dSthorpej  */
61a155715dSthorpej 
62a155715dSthorpej /*
63a155715dSthorpej  * Arguments used to attach Frodo subdevices.
64a155715dSthorpej  */
65a155715dSthorpej struct frodo_attach_args {
66a155715dSthorpej 	const char *fa_name;	/* device name */
6763b14eb5Stsutsui 	bus_space_tag_t fa_bst;	/* bus space tag */
6863b14eb5Stsutsui 	int	fa_base;	/* Frodo base address */
69a155715dSthorpej 	int	fa_offset;	/* offset from Frodo base */
70a155715dSthorpej 	int	fa_line;	/* Frodo interrupt line */
71a155715dSthorpej };
72a155715dSthorpej 
7363b14eb5Stsutsui /*
7463b14eb5Stsutsui  * Structure used to describe a device for autoconfiguration purposes.
7563b14eb5Stsutsui  */
7663b14eb5Stsutsui struct frodo_device {
7763b14eb5Stsutsui 	const char *fd_name;	/* device name */
7863b14eb5Stsutsui 	int	fd_offset;	/* offset from Frodo base */
7963b14eb5Stsutsui 	int	fd_line;	/* Frodo interrupt line */
8063b14eb5Stsutsui };
8163b14eb5Stsutsui 
8273997cc3Skleink #include "locators.h"
83ca1bba15Sjtk #define	frodocf_offset		cf_loc[FRODOCF_OFFSET]
84ca1bba15Sjtk #define	FRODO_UNKNOWN_OFFSET	FRODOCF_OFFSET_DEFAULT
85a155715dSthorpej 
86440f7c7bStsutsui void	frodo_intr_establish(device_t, int (*func)(void *), void *, int, int);
87440f7c7bStsutsui void	frodo_intr_disestablish(device_t, int);
888ca927b4Sthorpej void	frodo_init_bus_space(bus_space_tag_t);
89